From 3b6f57d0eef3c8978bf4dfab8a1d58bc82a38444 Mon Sep 17 00:00:00 2001 From: nujw Date: Tue, 26 Jan 2021 15:22:52 +1300 Subject: [PATCH] Update settings.js --- apps/speedalt/settings.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/apps/speedalt/settings.js b/apps/speedalt/settings.js index 6bee7b4b4..6f7b67180 100644 --- a/apps/speedalt/settings.js +++ b/apps/speedalt/settings.js @@ -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)