dclaar / purple_air

Code for displaying Air Quality from a Purple Air device
MIT License
6 stars 4 forks source link

Data disappears after rotating device #8

Closed csadams closed 4 years ago

csadams commented 4 years ago

Occasionally, when I move the device around causing the screen to flip, it will get into a state where it's missing the background color and AQI numbers, though the heart, mode letter, heart and animated snake are still there... see pic. I can make it do this pretty consistently by rotating the device back and forth for a few seconds. Sometimes it sticks, as shown in the pic, sometimes it just flashes dark for a fraction of a second, and then goes back to normal.

PXL_20201002_214115572

dclaar commented 4 years ago

Fixed it, at a small price that you can't rotate while in the sub-modes. Setting the orientation blanks the screen, and when the code that writes the little letter ran, it would check for rotation and then erase the screen.