It's a common trick to force a value into a boolean: so if settings.record is not set, value still becomes false (instead of undefined).
Another difference seems to be that the run app callbacks actually use v, while the idle warning just toggles the saved value, maybe that causes problems?
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
It's a common trick to force a value into a boolean: so if
settings.record
is not set,value
still becomesfalse
(instead ofundefined
).Another difference seems to be that the run app callbacks actually use
v
, while the idle warning just toggles the saved value, maybe that causes problems?