You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Senors.poll will fail when it advances past the end of the sample data with an IndexError.
Instead it might be better to loop back to the beginning (sensors.py, line 233)
def poll(self):
"""Pulls data from the pressure and flow sensors"""
datum = tuple((self._fake_data.pressures[self._data_index],
self._fake_data.flow_rates[self._data_index])
for _ in range(NUMBER_OF_PATIENTS))
self._data_index = (self._data_index + 1) % len(self._fake_data)
return datum