From 852d3148243107937633836dd0c5f1424c31bf96 Mon Sep 17 00:00:00 2001 From: Chris Bailey Date: Sun, 17 Jan 2021 18:02:57 -0500 Subject: [PATCH] Fix bug in reset that wasn't setting status properly Removed setting the `_status_last` to the return value as the return result isn't just the status field. The `_transceive` function is actually setting the `_status_last` as part of the function so there is no need to do anything additional in reset --- adafruit_mlx90393.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_mlx90393.py b/adafruit_mlx90393.py index 448a388..258c438 100755 --- a/adafruit_mlx90393.py +++ b/adafruit_mlx90393.py @@ -386,7 +386,7 @@ def reset(self): if self._debug: print("Resetting sensor") time.sleep(2) - self._status_last = self._transceive(bytes([_CMD_RT])) + self._transceive(bytes([_CMD_RT])) # burn a read post reset try: self.magnetic