Bayley Wang
/
foc-ed_in_the_bot_compact
robot
BREMS/BREMSStructs.h
- Committer:
- bwang
- Date:
- 2017-05-04
- Revision:
- 155:7c6005933d4c
- Parent:
- 154:0a22dcf91577
- Child:
- 179:935f9d78d936
- Child:
- 180:a783a972a867
File content as of revision 155:7c6005933d4c:
#ifndef __BREMS_STRUCTS_H #define __BREMS_STRUCTS_H #include "mbed.h" #include "FastPWM.h" #include "PwmIn.h" #include "PositionSensor.h" #include "Filter.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_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; float vd_decouple, vq_decouple; } 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; MedianFilter *throttle_filter, *velocity_filter; } ControlStruct; #endif