mirror of https://github.com/rusefi/bldc.git
Fixed startup boost scaling
This commit is contained in:
parent
d07d65a5ca
commit
ae41d14390
|
@ -27,7 +27,7 @@
|
|||
|
||||
// Firmware version
|
||||
#define FW_VERSION_MAJOR 1
|
||||
#define FW_VERSION_MINOR 6
|
||||
#define FW_VERSION_MINOR 7
|
||||
|
||||
#include "datatypes.h"
|
||||
|
||||
|
@ -53,7 +53,7 @@
|
|||
//#define HW_VERSION_BW
|
||||
//#define HW_VERSION_40
|
||||
//#define HW_VERSION_45
|
||||
#define HW_VERSION_46
|
||||
#define HW_VERSION_46 // Also for 4.7
|
||||
//#define HW_VERSION_R2
|
||||
//#define HW_VERSION_VICTOR_R1A
|
||||
|
||||
|
|
2
mcpwm.c
2
mcpwm.c
|
@ -2017,7 +2017,7 @@ void mcpwm_adc_int_handler(void *p, uint32_t flags) {
|
|||
// Compute error
|
||||
const float error = current_set - (direction ? current_nofilter : -current_nofilter);
|
||||
float step = error * conf.cc_gain * voltage_scale;
|
||||
const float start_boost = conf.cc_startup_boost_duty / voltage_scale;
|
||||
const float start_boost = conf.cc_startup_boost_duty * voltage_scale;
|
||||
|
||||
// Do not ramp too much
|
||||
utils_truncate_number(&step, -conf.cc_ramp_step_max, conf.cc_ramp_step_max);
|
||||
|
|
Loading…
Reference in New Issue