Closed BenjaminSoelberg closed 6 years ago
I had a quick stab at this, it seems that due to the high rate of runs through the main loop the symbol appears to be perpetually on :(
the change is not ready for a pull (drivers and openchronos.c references modules/dbg.h which is against openchronos design)
i was thinking we can add a debug menu where we can see the number of main loop executions/interrupts
I think your problem is that you turn the segment on and off in the same run, so it is either on or off for an unequal amount of time.
I would suggest that you try xoring a bool and use that value as segment state, once for each run loop. I did that as a POC and it seemed to work just fine :-)
I'll try that, looks like you mentioned we have the 20Hz timer is always up and running :S
Yes, the 20 hz timer is always running which is unfortunately as the runloop is executed 20 times a sec then. Im working on some code that reduces the mainloop count to about once every sec most of the time.
Side note: The 20hz timer is now only running when needed. So the mainloop is called about once every sec plus one every about 4 sec.
side note: the 0.244 hz timer is now optional and the temp module now uses the 1 sec event.
... say by turning the heart symbol on/off after each main loop execution. Should be a debug config option. Useful when debugging to show the freq of the runloop