diff options
| author | Daniel Thompson <daniel@redfelineninja.org.uk> | 2021-06-19 07:22:20 (GMT) |
|---|---|---|
| committer | Daniel Thompson <daniel@redfelineninja.org.uk> | 2021-06-19 07:22:20 (GMT) |
| commit | f221e2f8a4e52f0d14e7d59ceddf65785195129a (patch) | |
| tree | 03ff97f097f40ae0f20b4eac2cb686aa791f1300 /wasp/drivers/battery.py | |
| parent | 33ff7dc91e33f503f9855e01b4255fe43b548516 (diff) | |
rtc: Undo the once-per-second wake up
So... waking up once per second turns out to be a dumb idea because it
regresses the stop watch and HRS tools (which now also only wake up once
per second).
Undo this change but sprinkle a few more micropython.native decorations
on methods used on the wakeup path to minimise power.
Fixes: fb18705b9b9cc ("manager/rtc: Experimental power saving technique")
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'wasp/drivers/battery.py')
| -rw-r--r-- | wasp/drivers/battery.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/wasp/drivers/battery.py b/wasp/drivers/battery.py index 5bf06cd..e866920 100644 --- a/wasp/drivers/battery.py +++ b/wasp/drivers/battery.py @@ -4,6 +4,7 @@ """Generic lithium ion battery driver ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ +import micropython from machine import Pin, ADC class Battery(object): @@ -26,6 +27,7 @@ class Battery(object): self._charging = charging self._power = power + @micropython.native def charging(self): """Get the charging state of the battery. |
