Skip to content
Snippets Groups Projects
Commit 06ae02ad authored by moon2's avatar moon2 :speech_balloon:
Browse files

widget: inclinometer: None fix

parent a28f1345
No related branches found
No related tags found
1 merge request!733widget: inclinometer: None fix
Pipeline #13248 passed
...@@ -144,6 +144,8 @@ class Inclinometer(Widget): ...@@ -144,6 +144,8 @@ class Inclinometer(Widget):
return self._pitch_buf[index] return self._pitch_buf[index]
def _filter(self, getter): def _filter(self, getter):
if self._acc_buf is None:
return None
ret = 0 # do NOT initialize as complex to make the hack below work ret = 0 # do NOT initialize as complex to make the hack below work
index = self._next_index index = self._next_index
for _ in range(self._filter_len): for _ in range(self._filter_len):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment