Update settings.js

pull/651/head
nujw 2021-01-26 15:22:52 +13:00 committed by GitHub
parent 3d84579eae
commit 3b6f57d0ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -35,10 +35,16 @@
require('Storage').write('settings.json',settings);
}
function setColour(c) {
settings['colour'] = c;
require('Storage').write('settings.json',settings);
}
const appMenu = {
'': {'title': 'GPS Speed Alt'},
'< Back': back,
"Units" : function() { E.showMenu(unitsMenu); },
"Colours" : function() { E.showMenu(colMenu); },
"Power Saving Timeout" : function() { E.showMenu(dimDelayMenu); },
"Power Saving Brightness" : function() { E.showMenu(dimLevelMenu); }
};
@ -75,6 +81,14 @@
"20%" : function() { setDimLevel(0.2); },
"0%" : function() { setDimLevel(0); }
};
const colMenu = {
'': {'title': 'Colours'},
'< Back': back,
'Default' : function() { setColor(0); },
"Bright" : function() { setColor(1); },
"Night" : function() { setColor(2); }
};
E.showMenu(appMenu)