Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
gwk1 committed Dec 15, 2024
1 parent 45586a2 commit 40d2d23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Software/src/battery/BMW-SBOX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ void send_can_shunt() {
datalayer.shunt.contactors_engaged = false;
SBOX_100.data.u8[0]=0x55; // All open
if (datalayer.system.status.battery_allows_contactor_closing &&
datalayer.system.status.inverter_allows_contactor_closing && !datalayer.system.settings.equipment_stop_active && ( measured_voltage_mV => MINIMUM_INPUT_VOLTAGE*1000)) {
datalayer.system.status.inverter_allows_contactor_closing && !datalayer.system.settings.equipment_stop_active && ( datalayer.shunt.measured_voltage_mV => MINIMUM_INPUT_VOLTAGE*1000)) {
contactorStatus = PRECHARGE;
}
}
Expand Down Expand Up @@ -135,7 +135,7 @@ void send_can_shunt() {
break;

case POSITIVE:
if (currentTime - negativeStartTime >= NEGATIVE_CONTACTOR_TIME_MS && (measured_voltage_mV * MAX_PRECHARGE_RESISTOR_VOLTAGE_RATIO < measured_outvoltage_mV)) {
if (currentTime - negativeStartTime >= NEGATIVE_CONTACTOR_TIME_MS && (measured_voltage_mV * MAX_PRECHARGE_RESISTOR_VOLTAGE_PERCENT < dataalyer.shunt.measured_outvoltage_mV)) {
SBOX_100.data.u8[0]=0xAA; // Precharge + Negative + Positive
positiveStartTime = currentTime;
contactorStatus = PRECHARGE_OFF;
Expand Down

0 comments on commit 40d2d23

Please sign in to comment.