Open cjo20 opened 8 years ago
Can you PR this against the openaps/decocare repo as well? Not sure which branch, but that same file is at https://github.com/openaps/decocare/blob/master/decocare/commands.py#L296 in master.
Done here: https://github.com/openaps/decocare/pull/2
Merged openaps/decocare#2 and tested. Confirmed it allows setting a 0.6U/hr temp, whereas without this fix it ended up at 0.575U/hr. 👍 for merge
Per https://github.com/openaps/decocare/pull/1 it looks like this branch is no longer used by openaps, so it's up to @bewest whether he wants to try to keep it in sync with openaps/decocare or not.
Basal rates weren't being set correctly in the pump (e.g. 0.6u/hr was being set as 0.575u/hr)
if rate = 0.6:
If the user is trying to set a basal rate that the pump can support, this should always result in better behaviour than the current code. oref0 dev should only try to set supported rates.
If users try to set basal rates not supported by the pump, it could end up setting a rate up to 0.0125u/hr more than they requested.