1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-02-06 01:08:25 +01:00

Merge branch 'patch-6' of https://github.com/NicoHood/Arduino into master

This commit is contained in:
Cristian Maglie 2015-09-29 18:49:11 +02:00
commit e4bd514ee9
2 changed files with 17 additions and 4 deletions

View File

@ -70,8 +70,23 @@ public class LegacyTargetPlatform implements TargetPlatform {
// Load boards // Load boards
try { try {
Map<String, PreferencesMap> boardsPreferences = new PreferencesMap( PreferencesMap bPrefs = new PreferencesMap(
boardsFile).firstLevelMap(); boardsFile);
// Allow overriding values in boards.txt. This allows changing
// boards.txt (e.g. to add user-specific items to a menu), without
// having to modify boards.txt (which, when running from git,
// prevents files being marked as changed).
File localboardsFile = new File(folder, "boards.local.txt");
try {
if (localboardsFile.exists() && localboardsFile.canRead()) {
bPrefs.load(localboardsFile);
}
} catch (IOException e) {
throw new TargetPlatformException(
format(tr("Error loading {0}"), localboardsFile.getAbsolutePath()), e);
}
Map<String, PreferencesMap> boardsPreferences = bPrefs.firstLevelMap();
// Create custom menus for this platform // Create custom menus for this platform
PreferencesMap menus = boardsPreferences.get("menu"); PreferencesMap menus = boardsPreferences.get("menu");

View File

@ -50,8 +50,6 @@ int PUSB_GetDescriptor(int8_t t);
bool PUSB_Setup(USBSetup& setup, u8 i); bool PUSB_Setup(USBSetup& setup, u8 i);
void PUSB_Begin();
#endif #endif
#endif #endif