freeaps icon indicating copy to clipboard operation
freeaps copied to clipboard

handling of eventualBG

Open mountrcg opened this issue 1 year ago • 2 comments

eventualBG from suggestion (rT in oref) receives a special treatment as there was a mistake in oref that did not convert eventualBG via oref function convert_bg(eventualBG,profile) into whatever user had chosen as BG unit. It was always handed over as an Integer in mg/dL. Fixing this in oref will issue errors in fax due to:

  1. https://github.com/ivalkou/freeaps/blob/3a2908c5cf664b5cb1fed2e63aadc89a3bd81761/FreeAPS/Sources/Models/Suggestion.swift#L7
  2. https://github.com/ivalkou/freeaps/blob/3a2908c5cf664b5cb1fed2e63aadc89a3bd81761/FreeAPS/Sources/Modules/Home/HomeStateModel.swift#L43
  3. https://github.com/ivalkou/freeaps/blob/3a2908c5cf664b5cb1fed2e63aadc89a3bd81761/FreeAPS/Sources/Services/WatchManager/WatchManager.swift#L143

I am easily able to fix 1 and 2, but not 3 and the resulting issues in https://github.com/ivalkou/freeaps/blob/3a2908c5cf664b5cb1fed2e63aadc89a3bd81761/FreeAPS/Sources/Modules/Home/View/HomeRootView.swift#L241

mountrcg avatar Dec 08 '22 07:12 mountrcg

there is also a typo in 3. as func is called evetualBGString instead of eventualBGString

mountrcg avatar Dec 08 '22 07:12 mountrcg

Just as an FYI, but this code base has been dead / unmaintained for over a year now ... this project was forked to, and renamed as, iAPS, where all current development is being done.

I heavily recommend to anyone still using FreeAPS X, migrate to the maintained code base, where features are being constantly added, and bugs are constantly being fixed.

High probabillity that the bug / issue reported above has long been fixed.

scrappy avatar Nov 08 '23 10:11 scrappy