In certain cases with mmeowlink, self.data is a blank bytearray as there is no
radio data returned. Attempting to access the 0th element raises 'IndexError:
bytearray index out of range' in this case.
This change adds a simple guard clause to avoid the exception. When the correct
data is actually set in the data array on the second attempt, the code works as
expected and the temporary basal report stores the correct data.
In certain cases with mmeowlink, self.data is a blank bytearray as there is no radio data returned. Attempting to access the 0th element raises 'IndexError: bytearray index out of range' in this case.
This change adds a simple guard clause to avoid the exception. When the correct data is actually set in the data array on the second attempt, the code works as expected and the temporary basal report stores the correct data.