From 17e062999b214938d737b35cf23b1ec3ec5dbcb0 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 4 Aug 2024 19:51:55 +0100 Subject: [PATCH] add power fake for sim --- sim/fakes/power.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 sim/fakes/power.py diff --git a/sim/fakes/power.py b/sim/fakes/power.py new file mode 100644 index 0000000..20bc42e --- /dev/null +++ b/sim/fakes/power.py @@ -0,0 +1,31 @@ + + +def Off(): + return + +def BatteryChargeState(): + return "Not Charging" + +def BatteryLevel(): + return 95.0 + +def Enable5V(): + return + +def Fault(): + return {'Charge': 'Normal', 'Battery': 'Normal', 'Boost': 'Normal'} + +def SupplyCapabilities(): + return [ ('fixed', 3000, 5)] + +def Icharge(): + return 0.0 + +def Vbat(): + return 3.7 + +def Vin(): + return 5.0 + +def Vsys(): + return 4.2 \ No newline at end of file