forked from EFeru/hoverboard-firmware-hack-FOC
DC Link converted to fixed-point
This commit is contained in:
@@ -123,15 +123,13 @@
|
||||
|
||||
#define DELAY_TIM_FREQUENCY_US 1000000
|
||||
|
||||
#define MOTOR_AMP_CONV_DC_AMP 0.02f // A per bit (12) on ADC.
|
||||
|
||||
#define MILLI_R (R * 1000)
|
||||
#define MILLI_PSI (PSI * 1000)
|
||||
#define MILLI_V (V * 1000)
|
||||
|
||||
#define NO 0
|
||||
#define YES 1
|
||||
#define ABS(a) (((a) < 0.0f) ? -(a) : (a))
|
||||
#define ABS(a) (((a) < 0) ? -(a) : (a))
|
||||
#define LIMIT(x, lowhigh) (((x) > (lowhigh)) ? (lowhigh) : (((x) < (-lowhigh)) ? (-lowhigh) : (x)))
|
||||
#define SAT(x, lowhigh) (((x) > (lowhigh)) ? (1.0f) : (((x) < (-lowhigh)) ? (-1.0f) : (0.0f)))
|
||||
#define SAT2(x, low, high) (((x) > (high)) ? (1.0f) : (((x) < (low)) ? (-1.0f) : (0.0f)))
|
||||
|
Reference in New Issue
Block a user