Skip to content
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

fix: strengthen lcd buffer protection #4550

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

3djc
Copy link
Collaborator

@3djc 3djc commented Jan 16, 2024

Improve LCD buffer protection by checking negative x/y values

This fixes #4544

NB:

  • this should be applied to 2.9.x too

@pfeerick pfeerick added bug 🪲 Something isn't working B&W Related generally to black and white LCD radios labels Jan 16, 2024
@pfeerick
Copy link
Member

pfeerick commented Jan 16, 2024

What was the actual step to reproduce this... as I wasn't able to do it on my X7 or TX12MK2? And can wind it (offset) all the way up to 100, or down to -100 without issue... just wondering what the missing piece of the puzzle is to repo the issue. 😕

@pfeerick pfeerick added this to the 2.9.3 milestone Jan 16, 2024
@3djc
Copy link
Collaborator Author

3djc commented Jan 16, 2024

2.9.2, ail input, raise offset, crash. It draws at negative y value

ok on simu obviously, but crashes x7

@3djc
Copy link
Collaborator Author

3djc commented Jan 16, 2024

Adding debug in void drawFunction(FnFuncP fn, uint8_t offset) here:

image

produces negative Y values

image

@philmoz
Copy link
Collaborator

philmoz commented Jan 16, 2024

Posted an additional fix in the issue.

@pfeerick
Copy link
Member

Well, since I'm talking about hardware... nice to know simu doesn't have any problem with it 🤪 It seems the 2.10 PR I had on the X7 was immune to this. 2.9.2 isn't though, and the channel doesn't matter (as it obviously shouldn't). Still interesting that the TX12MK2 on 2.9.2 doesn't have any issue... maybe something different with the F4, as the TLite is also susceptible to this? 🤯

Anyway, I'll leave this till tomorrow to let you make any further changes... to be merged before nightly unless you mark it otherwise...

@3djc
Copy link
Collaborator Author

3djc commented Jan 16, 2024

well, you are writing outside LCD buffer, but there is not saying where you actually write, its a bit random, can depend on radio, compiler, ..

@pfeerick pfeerick merged commit 3235293 into main Jan 17, 2024
39 checks passed
@pfeerick pfeerick deleted the 3djc/strengthen-lcd-bufffer-protection branch January 17, 2024 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B&W Related generally to black and white LCD radios bug 🪲 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Taranis Qx7 crash when set input offset to high positive value
3 participants