Fixed startup boost scaling

This commit is contained in:
Benjamin Vedder 2015-07-04 20:05:49 +02:00
parent d07d65a5ca
commit ae41d14390
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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);