From d62793f9a2d6d04a1e8681fbcffbc6ccb309f8f4 Mon Sep 17 00:00:00 2001 From: Fisch Date: Sat, 28 Dec 2019 14:19:44 +0100 Subject: [PATCH] change hoverbrett to voltage mode --- Inc/config.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Inc/config.h b/Inc/config.h index b97b012..a6b6e74 100644 --- a/Inc/config.h +++ b/Inc/config.h @@ -192,11 +192,21 @@ // ############################### MOTOR CONTROL ######################### // Control selections #define CTRL_TYP_SEL 2 // [-] Control type selection: 0 = Commutation , 1 = Sinusoidal, 2 = FOC Field Oriented Control (default) -#define CTRL_MOD_REQ 1 // [-] Control mode request: 0 = Open mode, 1 = VOLTAGE mode (default), 2 = SPEED mode, 3 = TORQUE mode. Note: SPEED and TORQUE modes are only available for FOC! +//#define CTRL_MOD_REQ 3 // [-] Control mode request: 0 = Open mode, 1 = VOLTAGE mode (default), 2 = SPEED mode, 3 = TORQUE mode. Note: SPEED and TORQUE modes are only available for FOC! +#ifdef BOBBYCAR_PCB_FRONT + #define CTRL_MOD_REQ 3 //torque +#endif +#ifdef BOBBYCAR_PCB_REAR + #define CTRL_MOD_REQ 3 //torque +#endif +#ifdef HOVERBRETT + #define CTRL_MOD_REQ 1 //voltage +#endif + #define DIAG_ENA 1 // [-] Motor Diagnostics enable flag: 0 = Disabled, 1 = Enabled (default) // Limitation settings -#define I_MOT_MAX 15 // [A] Maximum motor current limit +#define I_MOT_MAX 14 // [A] Maximum motor current limit #define I_DC_MAX 17 // [A] Maximum DC Link current limit (This is the final current protection. Above this value, current chopping is applied. To avoid this make sure that I_DC_MAX = I_MOT_MAX + 2A) #define N_MOT_MAX 1000 // [rpm] Maximum motor speed limit