Bayley Wang
/
foc-ed_in_the_bot_compact
robot
BREMS/BREMSStructs.h
- Committer:
- bwang
- Date:
- 2017-04-25
- Revision:
- 120:57b6f3b1356b
- Parent:
- 70:5e39beeb4a21
- Child:
- 121:de10418bf2c2
File content as of revision 120:57b6f3b1356b:
#ifndef __BREMS_STRUCTS_H #define __BREMS_STRUCTS_H #include "mbed.h" #include "FastPWM.h" #include "PwmIn.h" #include "PositionSensor.h" typedef struct { FastPWM *a, *b, *c; DigitalOut *en; PwmIn *throttle_in; PositionSensorEncoder *pos; Serial *pc; } IOStruct; typedef struct { float adval1, adval2, adval3; float vbus; float p_mech2, last_p_mech2, w2; float p_mech, last_p_mech, w; float ia_supp_offset, ib_supp_offset; } ReadDataStruct; typedef struct { float ia, ib, alpha, beta, d, q, vd, vq, valpha, vbeta, p; } FOCStruct; typedef struct { float d_integral, q_integral; float last_d, last_q; float d_ref, q_ref; float d_filtered, q_filtered; float torque_percent; } ControlStruct; #endif