NOT FINISHED YET!!! My first try to get a self built fully working Quadrocopter based on an mbed, a self built frame and some other more or less cheap parts.
Diff: RC/RC_Channel.cpp
- Revision:
- 37:34917f7c10ae
- Parent:
- 35:2a9465fedb99
diff -r 128c55793728 -r 34917f7c10ae RC/RC_Channel.cpp --- a/RC/RC_Channel.cpp Wed Jun 12 10:26:18 2013 +0000 +++ b/RC/RC_Channel.cpp Wed Jun 12 16:42:32 2013 +0000 @@ -19,7 +19,8 @@ { if(time == -100) return time; - return scale * (float)(time) + offset; // calibration of the readings + float result = scale * (float)(time) + offset; // calibration of the readings + return (result > 490 && result < 510) ? 500 : result; // make the middle of the stickpositions non drifting } void RC_Channel::rise()