Test the set param mode
Diff: structs.h
- Revision:
- 37:c0f352d6e8e3
- Parent:
- 34:51647c6c500d
- Child:
- 45:26801179208e
diff -r d88fd41f60a6 -r c0f352d6e8e3 structs.h --- a/structs.h Fri Mar 02 15:24:00 2018 +0000 +++ b/structs.h Fri Apr 13 13:50:54 2018 +0000 @@ -8,6 +8,7 @@ typedef struct{ DigitalOut *enable; + DigitalOut *led; FastPWM *pwm_u, *pwm_v, *pwm_w; } GPIOStruct; @@ -16,7 +17,7 @@ }COMStruct; typedef struct{ - int adc1_raw, adc2_raw; + int adc1_raw, adc2_raw, adc3_raw; float i_a, i_b, i_c; float v_bus; float theta_mech, theta_elec; @@ -31,19 +32,19 @@ int loop_count; int timeout; int mode; + int ovp_flag; float p_des, v_des, kp, kd, t_ff; float cogging[128]; } ControllerStruct; typedef struct{ - float vel_1; - float vel_1_old; - float vel_1_est; - float vel_2; - float vel_2_old; - float vel_2_est; - float ts; - float est; - } VelocityEstimatorStruct; + float theta_m, theta_est; + float thetadot_m, thetadot_est; + float i_d_m, i_d_est; + float i_q_m, i_q_est; + float i_d_dot, i_q_dot; + float e_d, e_q; + float e_d_int, e_q_int; + } ObserverStruct; #endif