16.06.2020, 04:13
(15.06.2020, 11:59)Daniel. Wrote: It is full script, Set 'visdim', 0 to turn it offThank you for your reply. It seems to me that the browser needs to be refreshed for this to take effect. Is that right? Can we make it immediate (not requiring a refresh)?
I have the following code:
Code:
-- Set screen dimming on/off
require('uci')
if (event.getvalue() == true) then
log('Auto dimming on')
uci.set('genohm-scada', 'core', 'visdimopacity', 80)
uci.set('genohm-scada', 'core', 'visdim', 1)
else
log('Auto dimming off')
uci.set('genohm-scada', 'core', 'visdimopacity', 80)
uci.set('genohm-scada', 'core', 'visdim', 0)
end
uci.commit('genohm-scada')
I trigger this script with a toggle button on a Visualisation screen. While it works, it does need a refresh, so my question above remains. Can we make it take effect immediately?
Thanks!