Modified some pins config stuff for stormcore hardware

This commit is contained in:
Jeffrey M. Friesen 2020-07-21 09:42:31 -07:00
parent f41a54c23d
commit 7e212b58d4
5 changed files with 21 additions and 13 deletions

View File

@ -508,10 +508,10 @@ static THD_FUNCTION(smart_switch_thread, arg) {
case SWITCH_TURNED_ON:
if (smart_switch_is_pressed()) {
millis_switch_pressed++;
switch_bright = 1.0;
switch_bright = 0.5;
} else {
millis_switch_pressed = 0;
switch_bright = 0.5;
switch_bright = 1.0;
}
if (millis_switch_pressed > SMART_SWITCH_MSECS_PRESSED_OFF) {

View File

@ -54,11 +54,11 @@
#define SWITCH_PRECHARGED_GPIO GPIOE
#define SWITCH_PRECHARGED_PIN 2
#define SWITCH_LED_3_GPIO GPIOD
#define SWITCH_LED_3_PIN 15
#define SWITCH_LED_3_PIN 11
#define SWITCH_LED_2_GPIO GPIOD
#define SWITCH_LED_2_PIN 10
#define SWITCH_LED_1_GPIO GPIOD
#define SWITCH_LED_1_PIN 11
#define SWITCH_LED_1_PIN 15
#define LED_PWM1_ON() palClearPad(SWITCH_LED_1_GPIO,SWITCH_LED_1_PIN)
#define LED_PWM1_OFF() palSetPad(SWITCH_LED_1_GPIO,SWITCH_LED_1_PIN)
@ -390,6 +390,9 @@
#ifndef MCCONF_M_DRV8301_OC_ADJ
#define MCCONF_M_DRV8301_OC_ADJ 14
#endif
#ifndef MCCONF_L_DUTY_START
#define MCCONF_L_DUTY_START 0.9 // Start limiting current at this duty cycle
#endif
// Setting limits
#ifdef HW_HAS_DUAL_PARALLEL
#define HW_LIM_CURRENT -300.0, 300.0
@ -404,7 +407,7 @@
#define MCCONF_L_MAX_ABS_CURRENT 200.0 // The maximum absolute current above which a fault is generated
#endif
#endif
#define HW_LIM_CURRENT_IN -150.0, 150.0
#define HW_LIM_CURRENT_IN -100.0, 100.0
#define HW_LIM_VIN 6.0, 94.0
#define HW_LIM_ERPM -200e3, 200e3
#define HW_LIM_DUTY_MIN 0.0, 0.1

View File

@ -235,20 +235,20 @@
#define MCCONF_L_IN_CURRENT_MIN -60.0 // Input current limit in Amperes (Lower)
#endif
#ifndef MCCONF_L_MAX_ABS_CURRENT
#define MCCONF_L_MAX_ABS_CURRENT 160.0 // The maximum absolute current above which a fault is generated
#define MCCONF_L_MAX_ABS_CURRENT 200.0 // The maximum absolute current above which a fault is generated
#endif
#ifndef MCCONF_DEFAULT_MOTOR_TYPE
#define MCCONF_DEFAULT_MOTOR_TYPE MOTOR_TYPE_FOC
#endif
#ifndef MCCONF_FOC_F_SW
#define MCCONF_FOC_F_SW 20000.0
#ifndef MCCONF_L_DUTY_START
#define MCCONF_L_DUTY_START 0.9 // Start limiting current at this duty cycle
#endif
// Setting limits
#define HW_LIM_CURRENT -120.0, 120.0
#define HW_LIM_CURRENT_IN -100.0, 100.0
#define HW_LIM_CURRENT_ABS 0.0, 160.0
#define HW_LIM_CURRENT_ABS 0.0, 200.0
#define HW_LIM_VIN 6.0, 92.0
#define HW_LIM_ERPM -200e3, 200e3
#define HW_LIM_DUTY_MIN 0.0, 0.1

View File

@ -505,10 +505,10 @@ static THD_FUNCTION(smart_switch_thread, arg) {
case SWITCH_TURNED_ON:
if (smart_switch_is_pressed()) {
millis_switch_pressed++;
switch_bright = 1.0;
switch_bright = 0.5;
} else {
millis_switch_pressed = 0;
switch_bright = 0.5;
switch_bright = 1.0;
}
if (millis_switch_pressed > SMART_SWITCH_MSECS_PRESSED_OFF) {

View File

@ -45,11 +45,11 @@
#define SWITCH_PRECHARGED_GPIO GPIOE
#define SWITCH_PRECHARGED_PIN 2
#define SWITCH_LED_3_GPIO GPIOD
#define SWITCH_LED_3_PIN 15
#define SWITCH_LED_3_PIN 11
#define SWITCH_LED_2_GPIO GPIOD
#define SWITCH_LED_2_PIN 10
#define SWITCH_LED_1_GPIO GPIOD
#define SWITCH_LED_1_PIN 11
#define SWITCH_LED_1_PIN 15
#define LED_PWM1_ON() palClearPad(SWITCH_LED_1_GPIO,SWITCH_LED_1_PIN)
#define LED_PWM1_OFF() palSetPad(SWITCH_LED_1_GPIO,SWITCH_LED_1_PIN)
@ -381,6 +381,11 @@
#ifndef MCCONF_L_MAX_ABS_CURRENT
#define MCCONF_L_MAX_ABS_CURRENT 200.0 // The maximum absolute current above which a fault is generated
#endif
#ifndef MCCONF_L_DUTY_START
#define MCCONF_L_DUTY_START 0.9 // Start limiting current at this duty cycle
#endif
// Setting limits
#define HW_LIM_CURRENT -150.0, 150.0
#define HW_LIM_CURRENT_IN -120.0, 120.0