mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-10-15 02:49:54 +00:00
ui: admin telemetry decoder, battery % from board curves, PowerPolicy
- admin screen: telemetry via upstream LPPDataHelpers (ported; fixed its 1-byte humidity size), every field, per-channel, signed current (helpers/ui/telemetry_text) - battery %: both UIs show ZephyrBoard::getBattPercent() (discharge curve / fuel gauge) instead of a linear 3.0-4.2 V estimate - app/PowerPolicy: low-battery auto-shutdown + v-contact alert + autoshutdown CLI on every companion (headless too); under 2000 mV counts as no battery; default 3200 mV, stored 3300 migrated once - one time_sync.c for both UIs; ui_push_radio_state() for all roles - repeater admin screen in its own file; handleInput split per mode - dead UI code removed; companion help fits one reply frame
This commit is contained in:
@@ -135,6 +135,7 @@ protected:
|
||||
def("wake", _p->wake_on_msg);
|
||||
def("scr_off", _p->screen_off_secs);
|
||||
def("auto_off_mv", _p->auto_shutdown_mv);
|
||||
def("aoff_set", _p->auto_shutdown_set);
|
||||
def("vc_en", _p->v_contact_enabled);
|
||||
def("vc_flags", _p->v_contact_flags);
|
||||
def("vbat_mv", _p->v_battery_alert_mv);
|
||||
@@ -316,9 +317,13 @@ bool companionPrefsFromJson(NodePrefs &p, Stream &in)
|
||||
NodePrefs t = p;
|
||||
CompanionJson j(&t);
|
||||
|
||||
/* Absent keys keep the caller's value: clear the marker first, so a file
|
||||
* from before it existed is recognised (NodePrefs.h). */
|
||||
t.auto_shutdown_set = 0;
|
||||
if (!j.load(in)) {
|
||||
return false;
|
||||
}
|
||||
auto_shutdown_upgrade(&t);
|
||||
saneRadio(t);
|
||||
sanitizeNodePrefs(&t);
|
||||
p = t;
|
||||
|
||||
Reference in New Issue
Block a user