InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.63k stars 902 forks source link

Colors invert randomly #1984

Closed Rathmox closed 1 month ago

Rathmox commented 5 months ago

Verification

What happened?

Colors inverted for no apparent reason

What should happen instead?

Colors should stay the same

Reproduction steps

?

More details?

Looks similar to #1022 but did not happen when charging Happened on 2 different Infinitime watches IMG_20240119_193153_564 IMG_20240119_193202_507

Version

1.14.0

Companion app

No response

KaffeinatedKat commented 5 months ago

yea i'm really not sure why this happens, and i've seen it occur multiple times while working with the display driver. My best guess is there is some issue with how we are writing to the LCD control register, and accidentally (perhaps an overflow) writing the command to invert the colors. I'll have to do some investigation to be sure though

riban-bw commented 5 months ago

I have seen this happen. Would a (temporary) work-around be to assert the flag to not invert colours when accessing a screen, e.g. watchface / info.

DEPSUT commented 4 months ago

This has happened to me, but I know a way of reproducing this issue.

You need to turn on lower wrist to put the watch to sleep and go to the paint app, then just keep holding the screen and lower it until the screen turns off, and after you turn the screen on again, all the colors are inverted, I have attached a video showing it.

It may have something to do with the issue #1992

https://github.com/InfiniTimeOrg/InfiniTime/assets/77130196/e7b14534-f661-42e3-80b6-b7260d171014

KaffeinatedKat commented 4 months ago

I can reproduce this as well. This issue seems to also be the roots of the issue we're experiencing with #1869 (https://github.com/InfiniTimeOrg/InfiniTime/pull/1869#issuecomment-1915865847). There is some kind of issue with how the display is being controlled (SPI), which is causing unexpected behavior with the display

mark9064 commented 4 months ago

Having a consistent repro is amazing, thanks!!!!

Rathmox commented 2 months ago

I managed to trigger this bug by turning off and on multiple times the watch. I never managed to reproduce it though.

JF002 commented 1 month ago

I've just merged @2046 #2046 ! This issue will hopefully not occur again :) Thanks to @mark9064 for their great work!

Saarsk commented 3 weeks ago

I've just merged @2046!

I think maybe you didn't intend to @ the user 2046 but instead refer to #2046? :)

JF002 commented 2 weeks ago

I think maybe you didn't intend to @ the user 2046 but instead refer to #2046? :)

You're right, thanks for letting me know about this typo (and sorry to user 2046 for the unexpected ping :) ).