@@ -21,7 +21,8 @@ public class Programmers extends TxtFile {
21
21
super (programmersFile );
22
22
}
23
23
24
- private static Programmers [] fromBoards (IPath referencingPlatformPath , IPath referencedPlatformPath ) {
24
+ private static Programmers [] fromBoards (IPath referencingPlatformPath , IPath referencedPlatformPath ,
25
+ IPath arduinoPlatformPath ) {
25
26
HashSet <File > BoardsFiles = new HashSet <>();
26
27
BoardsFiles .add (referencingPlatformPath .append (programmersFileName1 ).toFile ());
27
28
BoardsFiles .add (referencingPlatformPath .append (programmersFileName2 ).toFile ());
@@ -35,7 +36,11 @@ private static Programmers[] fromBoards(IPath referencingPlatformPath, IPath ref
35
36
i .remove ();
36
37
}
37
38
}
38
-
39
+ if ((BoardsFiles .size () == 0 ) && (referencedPlatformPath == null ) && (arduinoPlatformPath != null )) {
40
+ if (arduinoPlatformPath .append (programmersFileName1 ).toFile ().exists ()) {
41
+ BoardsFiles .add (arduinoPlatformPath .append (programmersFileName1 ).toFile ());
42
+ }
43
+ }
39
44
Programmers ret [] = new Programmers [BoardsFiles .size ()];
40
45
int i = 0 ;
41
46
for (File file : BoardsFiles ) {
@@ -49,8 +54,7 @@ private static Programmers[] fromBoards(IPath referencingPlatformPath, IPath ref
49
54
public static String [] getUploadProtocols (BoardDescriptor boardsDescriptor ) {
50
55
String [] ret = new String [1 ];
51
56
ret [0 ] = Defaults .getDefaultUploadProtocol ();
52
- Programmers allProgrammers [] = fromBoards (boardsDescriptor .getreferencingPlatformPath (),
53
- boardsDescriptor .getReferencedUploadPlatformPath ());
57
+ Programmers allProgrammers [] = fromBoards (boardsDescriptor );
54
58
for (Programmers curprogrammer : allProgrammers ) {
55
59
ret = curprogrammer .getAllNames (ret );
56
60
}
@@ -60,7 +64,7 @@ public static String[] getUploadProtocols(BoardDescriptor boardsDescriptor) {
60
64
61
65
public static Programmers [] fromBoards (BoardDescriptor boardsDescriptor ) {
62
66
return fromBoards (boardsDescriptor .getreferencingPlatformPath (),
63
- boardsDescriptor .getReferencedUploadPlatformPath ());
67
+ boardsDescriptor .getReferencedUploadPlatformPath (), boardsDescriptor . getArduinoPlatformPath () );
64
68
}
65
69
66
70
}
0 commit comments