openaps / openaps

deprecated repo, formerly tools for exploring DIY openaps, but no longer used in current modern OpenAPS builds. see https://openaps.readthedocs.io/en/latest/ for current build instructions
MIT License
467 stars 179 forks source link

High carb ratios on x23 pumps are off by 10x #111

Open scottleibrand opened 7 years ago

scottleibrand commented 7 years ago

On x23 pumps with carb ratios set > 25 grams / U, openaps reads the carb ratio incorrectly as 0.26, 0.27, etc.

$ openaps use 523 read_carb_ratios
{
  "units": "grams",
  "first": 1,
  "schedule": [
    {
      "q": 0,
      "start": "00:00:00",
      "r": 100,
      "ratio": 10.0,
      "offset": 0,
      "i": 0,
      "x": 0
    },
    {
      "q": 1,
      "start": "23:30:00",
      "r": 4,
      "ratio": 0.26,
      "offset": 1410,
      "i": 47,
      "x": 1
    }
  ]
}

What other info would be useful to collect to correct the decoding here?

Mackwe commented 7 years ago

Hi! Just checked my 754 (WW 2.6A) It has this exact problem. The thing is: The pump cannot be set to a carb ratio below 1:1, which should mean anything below 0 is suppoed to be x100 (.25 is 25 etc). Will double check the decoding issues and get back to you! Thanks!