InfiniTimeOrg / InfiniTime

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

Increase screen drawing speed #1186

Closed devnoname120 closed 2 years ago

devnoname120 commented 2 years ago

Verification

What happened?

Horizontal animations are incredibly slow.

https://user-images.githubusercontent.com/37774658/173192207-9c88b4e2-4b0e-4d6a-ac0b-500455d212b3.mp4

Compare with the speed & smoothness of the implementation in Oxide OS:

https://user-images.githubusercontent.com/2824100/174473340-6e279014-1fb4-4006-9d1e-daaec94a944d.mp4

What should happen instead?

No response

Reproduction steps

More details?

Example: horizontal sliding animations. Currently it's super laggy and unnatural. See https://github.com/InfiniTimeOrg/InfiniTime/pull/1173.

See working implementation for Oxide OS.

Version

95ff285

Companion app

Gadgetbridge 0.67.1

Riksu9000 commented 2 years ago

The video is of vertical scrolling with the watch turned sideways. The limiting factor of screen updating is the SPI interface. There is a somewhat hacky way to increase the speed further #806.

devnoname120 commented 2 years ago

@Riksu9000 My bad, thanks for your correction. 🙏

devnoname120 commented 2 years ago

@Riksu9000 Did someone try to send command 36h to switch columns and rows and see if vertical scrolling becomes horizontal scrolling in this mode?

https://www.hpinfotech.ro/ILI9340.pdf#page=127

It may require redrawing the screen once before rotating but then we could use vertical scrolling to actually do horizontal scrolling in a smooth manner.


Edit: from this datasheet:

image

The behavior is unspecified so it would be worth trying it out to see what happens.

JF002 commented 2 years ago

I haven't tried to switch the orientation of the display for the animation yet. I assume that we'll need to refresh the whole display twice and that the result won't be as fast as expected, but I might be wrong. As you said : it is worth to be tested!