I'm trying to compile a watch face that includes the following code to change the background colour as a simple low battery warning:
g.setBgColor((bngl && E.getBattery()<10)?63488:(g.theme.bg))
When compiled this gives:
WARNING: Function marked with "compiled" uploaded in source form [ COMPILER MESSAGE ] : Error: Infer(unforced) kept changing stuff
If the line is commented out the warning doesn't appear and the compiled version runs.
What causes the error and is there a way around it? Thanks in advance.
@BillV started
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.
I'm trying to compile a watch face that includes the following code to change the background colour as a simple low battery warning:
When compiled this gives:
If the line is commented out the warning doesn't appear and the compiled version runs.
What causes the error and is there a way around it? Thanks in advance.