コード例 #1
0
        public void CheckMaxBreachLevel(float chargeLevel, float actualValue, float maxValue)
        {
            float chargeRate = maxValue - chargeLevel;

            if (chargeRate <= actualValue && actualValue <= maxValue)
            {
                Warnings.ChargePeak = Constants.PeakDischarge;
                BatteryMessages.DisplayWarningMessage(Warnings.ChargePeak, _reporter);
            }
        }
コード例 #2
0
        public void CheckMinBreachLevel(float chargeLevel, float ActualValue, float minValue)
        {
            float chargeRate = chargeLevel + minValue;

            if (minValue <= ActualValue && ActualValue <= chargeRate)
            {
                Warnings.Discharge = Constants.LowDischarge;
                BatteryMessages.DisplayWarningMessage(Warnings.Discharge, _reporter);
            }
        }