From 6212a6275a2678f9512656c450a7ffa9ef14c084 Mon Sep 17 00:00:00 2001 From: Daniel Thompson Date: Thu, 31 Dec 2020 09:31:47 +0000 Subject: [PATCH] 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 --- wasp/drivers/bma421.py | 4 +--- 1 file changed, 1 insertion(+), 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()