public static bool batteryIsOk(float Temperature, float StateOfCharge, float ChargeRate) { BatteryFactor batteryFactor = new BatteryFactor(); bool optimumTemperatureLimit = batteryFactor.CheckBatteryCondition("Temperature", minTemperatureLimit, maxTemperatureLimit, Temperature); bool optimumStateOfCharge = batteryFactor.CheckBatteryCondition("State of Charge", minStateOfCharge, maxStateOfCharge, StateOfCharge); bool optimumChargeRate = batteryFactor.CheckBatteryCondition("Charge Rate", minChargeRate, maxChargeRate, ChargeRate); return(optimumTemperatureLimit && optimumStateOfCharge && optimumChargeRate); }
public static bool CheckTemperature(float TemperatureValue, string Language) { if (Language == "German") { BatteryOk = BatteryFactor.CheckBatteryStatus("Temperatur", MinTemperatureLimit, MaxTemperatureLimit, TemperatureValue); } if (Language == "English") { BatteryOk = BatteryFactor.CheckBatteryStatus("Temperature", MinTemperatureLimit, MaxTemperatureLimit, TemperatureValue); } return(BatteryOk); }
public static bool CheckChargeRate(float ChargeRateValue, string Language) { if (Language == "German") { BatteryOk = BatteryFactor.CheckBatteryStatus("Ladestrom", MinChargeRate, MaxChargeRate, ChargeRateValue); } if (Language == "English") { BatteryOk = BatteryFactor.CheckBatteryStatus("Charge Rate", MinChargeRate, MaxChargeRate, ChargeRateValue); } return(BatteryOk); }
public static bool CheckStateOfCharge(float StateOfCharge, string language) { if (language == "German") { BatteryOk = BatteryFactor.CheckBatteryStatus("Ladezustand", MinStateOfCharge, MaxStateOfCharge, StateOfCharge); } if (language == "English") { BatteryOk = BatteryFactor.CheckBatteryStatus("State Of Charge", MinStateOfCharge, MaxStateOfCharge, StateOfCharge); } return(BatteryOk); }