Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: CANnucleo FastPWM3 mbed
Fork of Hobbyking_Cheetah_Compact by
structs.h
00001 #ifndef STRUCTS_H 00002 #define STRUCTS_H 00003 00004 //#include "CANnucleo.h" 00005 #include "mbed.h" 00006 #include "FastPWM.h" 00007 00008 00009 typedef struct{ 00010 DigitalOut *enable; 00011 PwmOut *pwm_u, *pwm_v, *pwm_w; 00012 } GPIOStruct; 00013 00014 typedef struct{ 00015 00016 }COMStruct; 00017 00018 typedef struct{ 00019 int adc1_raw, adc2_raw; 00020 float i_a, i_b, i_c; 00021 float v_bus; 00022 float theta_mech, theta_elec; 00023 float dtheta_mech, dtheta_elec; 00024 float i_d, i_q; 00025 float v_d, v_q; 00026 float dtc_u, dtc_v, dtc_w; 00027 float v_u, v_v, v_w; 00028 float d_int, q_int; 00029 int adc1_offset, adc2_offset; 00030 float i_d_ref, i_q_ref; 00031 int loop_count; 00032 } ControllerStruct; 00033 00034 typedef struct{ 00035 float vel_1; 00036 float vel_1_old; 00037 float vel_1_est; 00038 float vel_2; 00039 float vel_2_old; 00040 float vel_2_est; 00041 float ts; 00042 float est; 00043 } VelocityEstimatorStruct; 00044 00045 #endif
Generated on Tue Aug 2 2022 05:17:53 by
