N K
/
foc-ed_in_the_bot_compact
last working
Fork of foc-ed_in_the_bot_compact by
Diff: config.h
- Revision:
- 8:70122bad5f90
- Parent:
- 7:caebf421f288
diff -r caebf421f288 -r 70122bad5f90 config.h --- a/config.h Wed Mar 30 06:50:11 2016 +0000 +++ b/config.h Sat Apr 23 21:29:32 2016 +0000 @@ -1,7 +1,7 @@ #ifndef __CONFIG_H #define __CONFIG_H -#define set_dtc(phase, value) *phase = 1.0f - (value) +#define set_dtc(phase, value) *phase = (value) #define PWMA PA_8 #define PWMB PA_9 @@ -25,9 +25,9 @@ #define I_OFFSET (AVDD * R_DOWN * R_UP / (R_DOWN * R_UP + R_BIAS * (R_DOWN + R_UP))) #define I_SCALE (R_BIAS * R_DOWN * I_SCALE_RAW / (R_DOWN * R_UP + R_BIAS * (R_DOWN + R_UP))) -#define K_LOOP 0.02f -#define KI_BASE 0.008f -#define BUS_VOLTAGE 20.0f +#define K_LOOP 0.02 +#define KI_BASE 0.008 +#define BUS_VOLTAGE 20.0 #define KP (K_LOOP / BUS_VOLTAGE) #define KI (KI_BASE * K_LOOP / BUS_VOLTAGE)