public async void StopDischarge()
        {
            chargerUpdateTimer.Stop();

            batteryService.DisengageContactors();

            if (!await batteryService.WaitUntilContactorsDisengage(2000))
            {
                return;
            }

            CanPacket canPacket = new CanPacket(0x508);

            canPacket.SetByte(7, 0x0);
            canControl.ComponentCanService.SetCanToSendAt10Hertz(canPacket);

            isDischarging = false;
        }
Ejemplo n.º 2
0
        public async Task <bool> StopCharge()
        {
            ChargerService.StopCharge();

            if (!await ChargerService.WaitUntilChargerStopped(3000))
            {
                return(false);
            }

            BatteryService.DisengageContactors();

            if (!await BatteryService.WaitUntilContactorsDisengage(3000))
            {
                return(false);
            }

            StopTimer();

            return(true);
        }