public void BrickUpdater_04_00_Update_Test_004() { var Command = new Command_04_00(); Command.ResData = new byte[8]; Command.ResData[4] = 0xFF; Command.ResData[5] = 0x7F; Command.ResData[6] = 0x00; Command.ResData[7] = 0x00; var Brick = Ev3Brick.GetInstance(); var Updater = new BrickUpdater_04_00(); Updater.Update(Command, Brick); Assert.AreEqual(32767, Brick.Battery.Voltage); Assert.AreEqual(0, Brick.Battery.Current); }
public void BrickUpdater_04_00_Update_Test_001() { var Command = new Command_04_00(); Command.ResData = new byte[8]; Command.ResData[4] = 0x01; Command.ResData[5] = 0x02; Command.ResData[6] = 0x03; Command.ResData[7] = 0x04; var Brick = Ev3Brick.GetInstance(); var Updater = new BrickUpdater_04_00(); Updater.Update(Command, Brick); Assert.AreEqual(0x0201, Brick.Battery.Voltage); Assert.AreEqual(0x0403, Brick.Battery.Current); }