V1.7
This commit is contained in:
@ -49,13 +49,13 @@ void sm_update(){
|
||||
// state.current_state = state.target_state = STATE_ERROR;
|
||||
|
||||
if (state.current_state == STATE_INACTIVE){
|
||||
base_offset = module.auxVoltages[0];
|
||||
CURRENT_MEASUREMENT = (module.auxVoltages[0] > 2494) ? (module.auxVoltages[0] - (2494.0)) * (300.0) : 0;
|
||||
} else {
|
||||
CURRENT_MEASUREMENT = (module.auxVoltages[0] > 2477) ? (module.auxVoltages[0] - (2477.0)) * (4600.0) : 0;
|
||||
}
|
||||
|
||||
CURRENT_MEASUREMENT = roundf((module.auxVoltages[0] - base_offset) * 350);
|
||||
CURRENT_MEASUREMENT_ON = (module.auxVoltages[1] > 2400);
|
||||
RELAY_ESC_SIDE_VOLTAGE = module.auxVoltages[2] * 11.711;
|
||||
RELAY_BAT_SIDE_VOLTAGE = module.auxVoltages[3] * 11.711; // the calculation says the factor is 11. 11.711 yields the better result
|
||||
RELAY_ESC_SIDE_VOLTAGE = module.auxVoltages[2] * 15.98;
|
||||
RELAY_BAT_SIDE_VOLTAGE = module.auxVoltages[3] * 15.98; // the calculation says the factor is 11. 11.711 yields the better result
|
||||
|
||||
|
||||
switch (state.current_state) {
|
||||
|
||||
Reference in New Issue
Block a user