Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: SBUS.cpp
- Revision:
- 11:afe8c7d2cdf0
- Parent:
- 10:ac27dfde496e
- Child:
- 12:ac222684f449
--- a/SBUS.cpp Sat Jul 13 02:10:29 2019 +0000 +++ b/SBUS.cpp Sat Jul 13 02:14:09 2019 +0000 @@ -76,8 +76,8 @@ void SBUS::convertReceivedData() { for(int i = 0; i < 4; i++) { float buf; - if(channel[i] > (stickNeutralValue + 11)) buf = ((channel[i] - stickNeutralValue) / (float)(stickMaximumValue - stickNeutralValue)); - else if(channel[i] < (stickNeutralValue - 11)) buf = -((channel[i] - stickNeutralValue) / (float)(stickMinimumValue - stickNeutralValue)); + if(channel[i] > (stickNeutralValue + 15)) buf = ((channel[i] - stickNeutralValue) / (float)(stickMaximumValue - stickNeutralValue)); + else if(channel[i] < (stickNeutralValue - 15)) buf = -((channel[i] - stickNeutralValue) / (float)(stickMinimumValue - stickNeutralValue)); else buf = 0.0f; buf = (int)(buf*100)/100.0f; buf = (buf > 1.0f) ? 1.0f : buf;