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:
- 9:0c412933b84f
- Parent:
- 8:1294344216eb
- Child:
- 10:ac27dfde496e
diff -r 1294344216eb -r 0c412933b84f SBUS.cpp
--- a/SBUS.cpp Fri Jul 05 10:54:41 2019 +0000
+++ b/SBUS.cpp Fri Jul 05 11:13:47 2019 +0000
@@ -79,6 +79,7 @@
if(channel[i] > stickNeutralValue) buf = ((channel[i] - stickNeutralValue) / (float)(stickMaximumValue - stickNeutralValue));
else buf = -((channel[i] - stickNeutralValue) / (float)(stickMinimumValue - stickNeutralValue));
buf = (int)(buf*100)/100.0f;
+ buf = (buf > 1.0f) ? 1.0f : buf;
switch(i) {
case right_RL:
stickValue[analog_rx] = buf;