Drop "On battery for", clarify the remaining-estimate label
Build and push server image / build-and-push (push) Successful in 38s
Build and push server image / build-and-push (push) Successful in 38s
"On battery for" was clutter next to the actual number people care about. Relabeled "Est. remaining" to "Est. battery life left" and dropped the now-unused on_battery_since field from the /queue response. battery_estimate_s itself is unchanged -- it still needs 2h of span and a 2% drop within the current discharge cycle (reset on any 5%+ jump, i.e. a recharge or reflash) before it'll show anything. A frame that's been power-cycled/reflashed recently won't have an estimate yet; that's expected, not a regression.
This commit is contained in:
@@ -207,7 +207,6 @@ def api_queue(
|
||||
"firmware_available": cfg.firmware_available_version,
|
||||
"battery_percent": cfg.battery_percent,
|
||||
"battery_as_of": cfg.battery_as_of,
|
||||
"on_battery_since": cfg.battery_history[0][0] if cfg.battery_history else None,
|
||||
"battery_estimate_s": battery_estimate_s(cfg),
|
||||
"controller_id": cfg.controlled_by_user_id,
|
||||
"controller": (
|
||||
@@ -240,7 +239,6 @@ def api_queue(
|
||||
if snapshot["battery_percent"] >= 0
|
||||
else None
|
||||
),
|
||||
"on_battery_since": snapshot["on_battery_since"],
|
||||
"battery_estimate_s": snapshot["battery_estimate_s"],
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user