The unified diff between revisions [4f22e7ef..] and [bfc9e27f..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'stick.c'
# # old_revision [4f22e7ef7d3064e3b51a5b868a4722f3f13c747b] # new_revision [bfc9e27f5c40da31ae4269394aaf0545e5856a70] # # patch "stick.c" # from [57244f98d116ac872a524b6de2c760af161fd0a0] # to [b9e45330f5b727359eb7de7892d2d9e20543cdb0] # ============================================================ --- stick.c 57244f98d116ac872a524b6de2c760af161fd0a0 +++ stick.c b9e45330f5b727359eb7de7892d2d9e20543cdb0 @@ -12,9 +12,9 @@ #include "timer.h" #include "trig.h" #include "motor.h" -#include "wmp.h" #include "status.h" #include "watchdog.h" +#include "log.h" #define TWO_PI 6.28318531f #define PI 3.14159265f @@ -105,12 +105,24 @@ void stick_input(void) { void stick_input(void) { float x, y, z, throttle; + unsigned int xi, yi, zi, throttlei; + if (timer_allvalid()) { - x = timer_input(0); - y = timer_input(1); - throttle = timer_input(2); - z = timer_input(3); + xi = timer_input(0); + yi = timer_input(1); + throttlei = timer_input(2); + zi = timer_input(3); + log_put_uint16(xi); + log_put_uint16(yi); + log_put_uint16(throttlei); + log_put_uint16(zi); + + x = xi; + y = yi; + throttle = throttlei; + z = zi; + #ifdef STICK_DEBUG_CALIBRATE if ((stick_counter % 100) == 0) stick_debug_calibrate(); @@ -140,6 +152,10 @@ void stick_input(void) { if (throttle < 0.0) throttle = 0.0; } else { + log_put_uint16(0); + log_put_uint16(0); + log_put_uint16(0); + log_put_uint16(0); x = 0.0f; y = 0.0f; z = 0.0f;