The unified diff between revisions [4f22e7ef..] and [9ca449dd..] is displayed below. It can also be downloaded as a raw diff.
This diff has been restricted to the following files: 'motor.c'
# # old_revision [4f22e7ef7d3064e3b51a5b868a4722f3f13c747b] # new_revision [9ca449dd7941ad52e33bdcb5c28b2ba35d54219a] # # patch "motor.c" # from [3772a98b596df907c16e491694c952392f804893] # to [743afb567c758bd114cb1dd29f25081f3454108c] # ============================================================ --- motor.c 3772a98b596df907c16e491694c952392f804893 +++ motor.c 743afb567c758bd114cb1dd29f25081f3454108c @@ -5,6 +5,7 @@ #include "dcm.h" #include "uart.h" #include "status.h" +#include "log.h" float integral[3] = {0.0f, 0.0f, 0.0f}; float last[3]; @@ -33,7 +34,7 @@ void motor_pid_update(float troll, float { float derivative[3]; float out[3]; - float motor[3]; + float motor[4]; float roll, pitch, yaw; float error, max_error; float min_motor; @@ -145,6 +146,11 @@ void motor_pid_update(float troll, float set_thrust(1, motor[1]); set_thrust(2, motor[2]); set_thrust(3, motor[3]); + + log_put_uint16((unsigned int) (motor[0] * 65535)); + log_put_uint16((unsigned int) (motor[1] * 65535)); + log_put_uint16((unsigned int) (motor[2] * 65535)); + log_put_uint16((unsigned int) (motor[3] * 65535)); } void motor_kill(void) {