Explorar el Código

Display total data in statPanel when less than 24 hours instead of 0 values.

Jon Mårtensson hace 3 años
padre
commit
3b90d2788d
Se han modificado 1 ficheros con 8 adiciones y 0 borrados
  1. 8 0
      FreeAPS/Sources/APS/APSManager.swift

+ 8 - 0
FreeAPS/Sources/APS/APSManager.swift

@@ -967,6 +967,14 @@ final class BaseAPSManager: APSManager, Injectable {
                     }
                 }
             }
+
+            // If less then 24 hours of glucose data, use total instead
+            if bg_1 == 0 {
+                bg_1 = bg_total
+                bgArray_1 = bgArrayForTIR
+                end1 = true
+                nr_bgs_1 = nr_bgs
+            }
         }
 
         if nr_bgs > 0 {