openenergymonitor / emonpi

Raspberry Pi Based Energy Monitor. Hardware, Firmware & related software for the PI.
https://guide.openenergymonitor.org/setup
270 stars 113 forks source link

lock updateLCD() process to avoid LCD corruption if interrupted #134

Closed glynhudson closed 2 years ago

glynhudson commented 2 years ago

Hi Bruce, thanks for your comment. That's interesting this 'fix' was contributed by a user who was having issues with the LCD getting corrupted, but they had increased the LCD data update rate to once per second and were seeing issues with button presses interrupting the display update causing corruption. This is not something we've experienced, possibly because the LCD update much slower.

Sorry, I don't recall the select loop was removed, I don't think this is something I would have done? I'm happy to explore other solutions, putting the lock in the LCD code sounds like a good idea.