1
0
Fork 0

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>
This commit is contained in:
Daniel Thompson 2020-12-31 09:31:47 +00:00
parent bb1bee8feb
commit 6212a6275a

View file

@ -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()