openaps / decocare

python serial driver for mm comlink2 protocol
Other
27 stars 29 forks source link

bolus ack is incorrect #4

Open kenstack opened 8 years ago

kenstack commented 8 years ago

when bolusing the command is received but the ack response is incorrect

{'recieved': False, '_type': 'BolusRequest'}

I believe line 478 of commands.py is incorrect
received = True if self.data[0] is 0x0c else False

I think it should be similar to the basal ack 
received = True if (len(self.data) > 0 and self.data[0] is 0) else False

but I dont know enough about the data being received to verify, and it looks from the bolus ack that the 0x0c was not unintentional, so I cant be sure
bewest commented 8 years ago

Linked to this: https://github.com/oskarpearson/mmeowlink/issues/22