Modified Motor Driver Firmware to include Flash + Thermal
Dependencies: FastPWM3 mbed-dev-STM-lean
Diff: main.cpp
- Revision:
- 67:96a4052a1705
- Parent:
- 66:3947255b18c5
- Child:
- 68:edfdbd0db876
diff -r 3947255b18c5 -r 96a4052a1705 main.cpp --- a/main.cpp Fri Jan 29 20:39:36 2021 +0000 +++ b/main.cpp Tue Feb 09 16:30:11 2021 +0000 @@ -26,7 +26,7 @@ #include "math_ops.h" #include "current_controller_config.h" #include "hw_config.h" -#include "motor_config_U12.h" // need to choose between two files here, one for U10 and one for U12 +#include "motor_config_U10.h" // need to choose between two files here, one for U10 and one for U12 #include "stm32f4xx_flash.h" #include "FlashWriter.h" #include "user_config.h" @@ -82,7 +82,8 @@ else if(state == MOTOR_MODE){ unpack_cmd(rxMsg, &controller); } - pack_reply(&txMsg, controller.theta_mech, controller.dtheta_mech, controller.i_q_filt*KT_OUT); // multiply theta, dtheta_mech by GR here? + //pack_reply(&txMsg, controller.theta_mech, controller.dtheta_mech, controller.i_q_filt*KT_OUT); // multiply theta, dtheta_mech by GR here? + pack_reply(&txMsg, controller.v_q, controller.dtheta_mech, controller.i_q_filt*KT_OUT); //pack_reply(&txMsg, 3.14159f, 6.28318f, 1.00f); // test values can.write(txMsg); }