Skip to content

Commit

Permalink
Fix to display historic COB-value (from OpenAps) when scolling back i…
Browse files Browse the repository at this point in the history
…n time

Copied from 7aa606d
  • Loading branch information
bjornoleh committed Dec 9, 2023
1 parent 5b440b7 commit cf2f412
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/plugins/cob.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,10 @@ function init (ctx) {
var when = new Date(lastCarbs.mills).toLocaleString();
var amount = lastCarbs.carbs + 'g';
info.push({ label: translate('Last Carbs'), value: amount + ' @ ' + when });
displayCob = Math.round(sbx.properties.openaps.lastSuggested.COB);
}

sbx.pluginBase.updatePillText(sbx, {
sbx.pluginBase.updatePillText(cob, {
value: displayCob + 'g'
, label: translate('COB')
, info: info
Expand Down

0 comments on commit cf2f412

Please sign in to comment.