We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Just like in the title, tested on Android Pixel+Spirit Combo and emulator+virtual pump, latest version of AAPS 3.3.1.0
Whatever the temp basal actually is, the endpoint will always return 0.
0
Current behavior, given basal rate 90:
GET http://127.0.0.1:28891/sgv.json?brief_mode=true&count=1 [ { "tbr": 0 // other fields irrelevant } ]
Expected behavior, given basal rate 90:
GET http://127.0.0.1:28891/sgv.json?brief_mode=true&count=1 [ { "tbr": 90 // other fields irrelevant } ]
Simple POC fix I did is just a copy & paste from XDrip plugin like so:
--- a/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/garmin/LoopHubImpl.kt +++ b/plugins/sync/src/main/kotlin/app/aaps/plugins/sync/garmin/LoopHubImpl.kt @@ -89,8 +91,8 @@ class LoopHubImpl @Inject constructor( /** Returns the factor by which the basal rate is currently raised (> 1) or lowered (< 1). */ override val temporaryBasal: Double get() { - val apsResult = loop.lastRun?.constraintsProcessed - return if (apsResult == null) Double.NaN else apsResult.percent / 100.0 + val tbr = processedTbrEbData.getTempBasalIncludingConvertedExtended(System.currentTimeMillis())?.rate + return if (tbr == null) Double.NaN else tbr / 100.0 } override val lowGlucoseMark get() = profileUtil.convertToMgdl(
Unit tests didn't catch that because they are mocked at higher level.
Should I create PR? Please advise, have a nice day 🙂
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Just like in the title, tested on Android Pixel+Spirit Combo and emulator+virtual pump, latest version of AAPS 3.3.1.0
Whatever the temp basal actually is, the endpoint will always return
0
.Current behavior, given basal rate 90:
Expected behavior, given basal rate 90:
Simple POC fix I did is just a copy & paste from XDrip plugin like so:
Unit tests didn't catch that because they are mocked at higher level.
Should I create PR? Please advise, have a nice day 🙂
The text was updated successfully, but these errors were encountered: