コード例 #1
0
        static int Main()
        {
            TestBatteryStatus batterystatus = new TestBatteryStatus();


            batterystatus.CheckBatteryStatus(-1, 20, 0.3f);
            batterystatus.CheckBatteryStatus(1, 22, 0.4f);
            batterystatus.CheckBatteryStatus(100, 82, 0.1f);
            batterystatus.CheckBatteryStatus(1, 22, 0.4f);

            return(0);
        }
コード例 #2
0
        public static void CheckChargeRate(float chargeRate)
        {
            BatteryStates batteryChargeRate = CheckBatteryCondition(chargeRate, Constants.minChargeRate, Constants.maxChargeRate);

            TestBatteryStatus.DisplayBatteryCondition("Charge Rate", batteryChargeRate);
        }
コード例 #3
0
        public static void CheckTemperature(float temperature)
        {
            BatteryStates batteryTemperature = CheckBatteryCondition(temperature, Constants.minTemperature, Constants.maxTemperature);

            TestBatteryStatus.DisplayBatteryCondition("Temperature", batteryTemperature);
        }
コード例 #4
0
        public static void CheckChargeState(float soc)
        {
            BatteryStates batteryChargeState = CheckBatteryCondition(soc, Constants.minStateOfCharge, Constants.maxStateOfCharge);

            TestBatteryStatus.DisplayBatteryCondition("State of charge", batteryChargeState);
        }
コード例 #5
0
 static int Main()
 {
     TestBatteryStatus.CheckBatteryCondition(25, 70, 0.7f);
     TestBatteryStatus.CheckBatteryCondition(40, 60, 0.4f);
     return(0);
 }