Tuned generic thresholds

This commit is contained in:
Thomas Kolb 2020-04-12 17:30:08 +02:00
parent 5e1bfc2d78
commit c00f9f2f74

View file

@ -18,7 +18,7 @@
#include "debug.h" #include "debug.h"
#define CONV_PWM_PERIOD 360 #define CONV_PWM_PERIOD 360
#define CONV_PWM_MAX (98*CONV_PWM_PERIOD/100) #define CONV_PWM_MAX (90*CONV_PWM_PERIOD/100)
#define TIM_CH_CONV TIM_OC1 #define TIM_CH_CONV TIM_OC1
#define TIM_CH_BOOTSTRAP TIM_OC2 #define TIM_CH_BOOTSTRAP TIM_OC2
@ -601,9 +601,9 @@ int main(void)
// //
// If the battery voltage is below LOAD_LOW_VOLTAGE_THRESHOLD, the battery // If the battery voltage is below LOAD_LOW_VOLTAGE_THRESHOLD, the battery
// voltage is monitored more closely during idle mode. // voltage is monitored more closely during idle mode.
fxp_t LOAD_ON_THRESHOLD = fxp_from_float(13.500f); fxp_t LOAD_ON_THRESHOLD = fxp_from_float(13.800f);
fxp_t LOAD_OFF_THRESHOLD = fxp_from_float(12.500f); fxp_t LOAD_OFF_THRESHOLD = fxp_from_float(12.500f);
fxp_t LOAD_LOW_VOLTAGE_THRESHOLD = fxp_from_float(12.600f); fxp_t LOAD_LOW_VOLTAGE_THRESHOLD = fxp_from_float(12.550f);
// Calculated values // Calculated values
//fxp_t VIN_SCALE = fxp_from_float(3.3f * (100 + 10.0f) / 10.0f / 4095.0f); //fxp_t VIN_SCALE = fxp_from_float(3.3f * (100 + 10.0f) / 10.0f / 4095.0f);