NSC: fix ui status
This commit is contained in:
parent
0243c56b65
commit
86b8d763e6
1 changed files with 6 additions and 6 deletions
|
@ -63,11 +63,11 @@ class ProcessedDeviceStatusDataImpl @Inject constructor(
|
||||||
// Removed here. Same value is in StatusLights
|
// Removed here. Same value is in StatusLights
|
||||||
// if (pumpData.reservoirDisplayOverride != "") string.append(pumpData.reservoirDisplayOverride).append("$insulinUnit ")
|
// if (pumpData.reservoirDisplayOverride != "") string.append(pumpData.reservoirDisplayOverride).append("$insulinUnit ")
|
||||||
// else if (fields.contains("reservoir")) string.append(pumpData.reservoir.toInt()).append("$insulinUnit ")
|
// else if (fields.contains("reservoir")) string.append(pumpData.reservoir.toInt()).append("$insulinUnit ")
|
||||||
if (fields.contains("battery") && pumpData.isPercent) string.append(pumpData.percent).append("% ")
|
if (pumpData.isPercent) string.append(pumpData.percent).append("% ")
|
||||||
if (fields.contains("battery") && !pumpData.isPercent) string.append(Round.roundTo(pumpData.voltage, 0.001)).append(" ")
|
if (!pumpData.isPercent) string.append(Round.roundTo(pumpData.voltage, 0.001)).append(" ")
|
||||||
if (fields.contains("clock")) string.append(dateUtil.minAgo(rh, pumpData.clock)).append(" ")
|
string.append(dateUtil.minAgo(rh, pumpData.clock)).append(" ")
|
||||||
if (fields.contains("status")) string.append(pumpData.status).append(" ")
|
string.append(pumpData.status).append(" ")
|
||||||
if (fields.contains("device")) string.append(device).append(" ")
|
//string.append(device).append(" ")
|
||||||
string.append("</span>") // color
|
string.append("</span>") // color
|
||||||
return HtmlHelper.fromHtml(string.toString())
|
return HtmlHelper.fromHtml(string.toString())
|
||||||
}
|
}
|
||||||
|
@ -144,7 +144,7 @@ class ProcessedDeviceStatusDataImpl @Inject constructor(
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
val pair = iterator.next() as Map.Entry<*, *>
|
val pair = iterator.next() as Map.Entry<*, *>
|
||||||
val uploader = pair.value as ProcessedDeviceStatusData.Uploader
|
val uploader = pair.value as ProcessedDeviceStatusData.Uploader
|
||||||
if (minBattery > uploader.battery) {
|
if (minBattery >= uploader.battery) {
|
||||||
minBattery = uploader.battery
|
minBattery = uploader.battery
|
||||||
found = true
|
found = true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue