-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[FL-3880] Fix cumulative error in infrared signals #3823
Conversation
Compiled f7 firmware for commit |
If you want to preserve the remainder of the division, isn't https://en.cppreference.com/w/c/numeric/math/div or |
The code was already dealing in floats ( |
Ah, I see. In this case you can likely use |
Proper rounding (up and down) is preferable in this case because it spreads extra pulses more evenly across time. Suppose we get an intended duration of 3.9 pulses, which will turn into 3 this time and 1 extra pulse next time if we use |
* Correct for pulse duration cumulative discrepancy * Add infrared test application * Build infrared_test_app for f7 only Co-authored-by: あく <alleteam@gmail.com>
What's new
Verification
./fbt launch APPSRC=infrared_test
Checklist (For Reviewer)