summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-12-31 09:31:47 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-12-31 09:31:47 (GMT)
commit6212a6275a2678f9512656c450a7ffa9ef14c084 (patch)
treeb7f4240e5c23756e746b9b016a359e8d87c1b3e3
parentbb1bee8feb9640c4a5db3013312731df5ffebc77 (diff)
drivers: bma421: Switch over to reset_step_counter()
Currently the bma421 driver simple re-initializes the sensor when asked to set the step counter to zero. Switch over to the proper function for this. Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
-rw-r--r--wasp/drivers/bma421.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/wasp/drivers/bma421.py b/wasp/drivers/bma421.py
index 1fb16dc..4901462 100644
--- a/wasp/drivers/bma421.py
+++ b/wasp/drivers/bma421.py
@@ -48,6 +48,4 @@ class BMA421:
def steps(self, value):
if value != 0:
raise ValueError()
- # TODO: There is a more efficient way to reset the step counter
- # but I haven't looked it up yet!
- self.reset()
+ self._dev.reset_step_counter()