-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gui: animated qr #55
gui: animated qr #55
Conversation
I think it would be better to extend QRCode class defined in We could add a method to set max size, and if QR code text is larger than that size - add two arrows on the right and left sides of the qr code. When you click on the arrow - next / prev part of the QR code is shown. What do you think? |
ace454d
to
0a87018
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the approach as you suggested.
0a87018
to
bf35101
Compare
4869799
to
3234473
Compare
3234473
to
8e3e562
Compare
I force pushed the implementation which now works the same as cryptoadvance/specter-desktop#104 What should we do with animations in simulator mode? It doesnt look to have a timer. |
self.set_event_cb(QrA.qr_cb) | ||
|
||
def is_qr_big(self, message): | ||
QrA.isQRtoobig = len(message) >= 850 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I set the limit at 850 which may be even lower. It needs more testing. The thing is drawing the qr takes alot of RAM, more than 10 times of the qr payload. One thing i noticed also, we can draw a 1KB qrcode in a 300x300 label most of the times but not into a 480x480 label because it requires that much more RAM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think to solve it we could move lvgl buffer to SDRAM in the display driver.
I opened a corresponding issue: diybitcoinhardware/f469-disco#8
For now let's just live with this limitation.
We can write a simple scheduler where we can register / unregister callbacks. Maybe even look at Here is a pure python implementation: Recently We can rebase to the latest version of micropython and check that nothing breaks, but I think we should start with pure python implementation. |
For now I just used ticks.diff for simulator and for stm32 with the .update function, so the code is the same. Is that ok? In simulator i notice this qr width glitching, it doesnt happen on hardware though: Its a consequence of the fact that i have to adapt the qr width after i draw it. Will ponder on this one a bit... |
Looks good! I will test a bit and merge :) |
Tested works great, I didn't see any width glitches in the simulator. With cryptoadvance/specter-desktop#118 we can use it in specter-desktop. Now we can sign and display large transactions! Awesome! |
You mean pressing OK button while animation is running? Weird, I havent noticed that at all. Mine has never lagged and works blazingly fast. |
This should also go into the release, i guess? I'd suggest to quickly merge it and then test everything together?! |
I agree, works great, I don't see a reason not to merge :) |
close #48
Status
Ready for review
Edit
New implementation force pushed which resembles cryptoadvance/specter-desktop#104