orin-status: clean poweroff when the UPS pack stays low while discharging
/ crosscheck (push) Successful in 0s
Rust (L4T) / Clippy, test, build, glibc (push) Successful in 14s

--poweroff-below V --poweroff-after N (deployed: 11.0 V, 30 readings at 1/s).
Charging or a missing reading restarts the count. Publishes 'stopping' first;
poweroff through svc-gw's polkit grant, no sudo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DDwfd6Ki8UfG4hK6W5YpJz
This commit is contained in:
2026-10-14 08:32:17 +09:00
parent 90d011f3a4
commit f77676f1e2
4 changed files with 112 additions and 14 deletions
+3 -1
View File
@@ -11,7 +11,9 @@ User=mikkeli
SupplementaryGroups=i2c
# The ELM's address, for elm_connected; without the file nothing is reported.
EnvironmentFile=-/etc/default/yukart-elm
ExecStart=/usr/local/bin/yukart-orin-status --elm ${ELM_ADDR}
# Below 11.0 V while discharging for 30 s (about 10 % left at the Orin's load): power off
# cleanly, through the polkit grant svc-gw installs (50-yukart-gw-power.pkla), not sudo.
ExecStart=/usr/local/bin/yukart-orin-status --elm ${ELM_ADDR} --poweroff-below 11.0 --poweroff-after 30
Restart=always
RestartSec=2