#405 #340 rtu and supervisor configurator control of theme and color mode

This commit is contained in:
Mikayla Fischler
2024-03-07 19:23:46 -05:00
parent 48a8eadc55
commit fc7896ebd3
16 changed files with 373 additions and 62 deletions

View File

@@ -43,6 +43,9 @@ function supervisor.load_config()
config.LogPath = settings.get("LogPath")
config.LogDebug = settings.get("LogDebug")
config.FrontPanelTheme = settings.get("FrontPanelTheme")
config.ColorMode = settings.get("ColorMode")
local cfv = util.new_validator()
cfv.assert_type_int(config.UnitCount)
@@ -81,6 +84,11 @@ function supervisor.load_config()
cfv.assert_type_str(config.LogPath)
cfv.assert_type_bool(config.LogDebug)
cfv.assert_type_int(config.FrontPanelTheme)
cfv.assert_range(config.FrontPanelTheme, 1, 2)
cfv.assert_type_int(config.ColorMode)
cfv.assert_range(config.ColorMode, 1, 4)
return cfv.valid()
end