Luka Slapnik / sbus_decode
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;