Skip to content

Commit 0fedf55

Browse files
author
jantje
committed
#1268 menu options env vars must be set the latest
build ino on all boards failed 44 out of 1066 After this fix it should be more
1 parent ef636ab commit 0fedf55

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

io.sloeber.core/src/io/sloeber/core/api/BoardDescription.java

+12-9
Original file line numberDiff line numberDiff line change
@@ -893,16 +893,7 @@ public Map<String, String> getEnvVars() {
893893

894894

895895

896-
Map<String, String> options = getOptions();
897896

898-
KeyValueTree rootData = myTxtFile.getData();
899-
KeyValueTree menuData = rootData.getChild(getBoardID() + DOT + MENU);
900-
for (Entry<String, String> curOption : options.entrySet()) {
901-
String menuID = curOption.getKey();
902-
String SelectedMenuItemID = curOption.getValue();
903-
KeyValueTree curSelectedMenuItem = menuData.getChild(menuID + DOT + SelectedMenuItemID);
904-
allVars.putAll(curSelectedMenuItem.toKeyValues(ERASE_START, false));
905-
}
906897
allVars.putAll(getEnvVarsConfig());
907898
allVars.put(ENV_KEY_JANTJE_BOARD_NAME, getBoardName());
908899
allVars.put(ENV_KEY_JANTJE_BOARDS_FILE, getReferencingBoardsFile().toString());
@@ -956,8 +947,20 @@ public Map<String, String> getEnvVars() {
956947
}
957948
}
958949

950+
// boards setiings not comming from menu selections
959951
allVars.putAll(myTxtFile.getAllBoardEnvironVars(getBoardID()));
960952

953+
// board settings from menu selections
954+
Map<String, String> options = getOptions();
955+
KeyValueTree rootData = myTxtFile.getData();
956+
KeyValueTree menuData = rootData.getChild(getBoardID() + DOT + MENU);
957+
for (Entry<String, String> curOption : options.entrySet()) {
958+
String menuID = curOption.getKey();
959+
String SelectedMenuItemID = curOption.getValue();
960+
KeyValueTree curSelectedMenuItem = menuData.getChild(menuID + DOT + SelectedMenuItemID);
961+
allVars.putAll(curSelectedMenuItem.toKeyValues(ERASE_START, false));
962+
}
963+
961964
// add the stuff that comes with the plugin that is marked as post
962965
allVars.putAll(pluginPostProcessingPlatformTxt.getAllEnvironVars(EMPTY));
963966
allVars.putAll(pluginPostProcessingBoardsTxt.getEnvVarsTxt());

0 commit comments

Comments
 (0)