UCSolarCarTeam / Epsilon-Embedded-Software

4 stars 1 forks source link

SFT-134 Fix ProtectionTripping to use chargeSense instead of orionChargeSense #153

Closed bill-luu closed 4 years ago

bill-luu commented 4 years ago

Previously, the inccorectly named chargeSense variable in updateChargeAllowanceTask refered to the orion ChargeEnableSense pin, for the orionBMS to communicate if it wants the charge pin on. However, it's usage in

            // If the charge contactor is off, but we are still charging, trip
            if (!chargeSense && orionStatus.packCurrent < 0)
            {
                protectionTripping = 1;
            }

Communicates that it wants the actual charge contactor sense! This should explain why Colton was able to charge the car past the internal Aux BMS limit when the charge contactor disenaged, as it was actually waiting for the higher Orion Limit to hit.