Fix GPS modem selection and add a GPS-only time source

This commit is contained in:
Luxferre committed 2026-11-10 13:18:14 +02:00
1 parent eaf08abcd4
commit a50c01b416
18 files changed
+682 -16

No files matched your search

+5
View File
@@ -13,6 +13,11 @@ Release versions follow the `<year-letter><MM><DD>` format (where `2026` is `a`,
Work since `a1108` has focused on reliable 2720 Flip hardware support and a reproducible boot/flash path. Earlier incremental and superseded diagnostic entries are consolidated here.
### GPS reception and GPS-only system time
- **GPS never produced a fix**: `bananarchy-gps`, `gps.so` and the new helpers all used `mmcli -m any`, which is ambiguous on the dual-SIM QMI stack of the 2720 Flip and can resolve to a modem without a Location interface. `/usr/bin/bananarchy-gps-modem.sh` now lists the modems, prefers the one advertising `gps-nmea`, enables the modem plus `3gpp`, `gps-nmea`, `gps-raw` and a 2 s refresh rate, and falls back to `any` only when nothing is enumerated. `gps.so`, the CLI (`status|nmea|watch|enable|disable|modem`) and the time helper share this resolver, so `nokia-argon` keeps its single-modem behaviour.
- **Config -> Time source and Config -> Sync GPS time**: `~/.config/sxmo/time_source` selects `network` (default) or `gps`. With GPS selected, `/usr/bin/bananarchy-gps-time-sync.sh` stops `chronyd`, `bananarchy-time-sync.sh` declines all boot/network-up/force NTP bursts, and the datetime is set solely from a valid GNSS UTC/RMC fix (`date -u -s`, `hwclock -w -u`, status bar refresh), including a boot-time sync. `bananarchy-sync-gps-time.sh` is the user-facing one-shot action with a notification. `scripts/test-gps-time-sync.py` verifies ISO and RMC parsing, chronyd/NTP isolation, source switching, the notification wrapper and CLI modem resolution with stubbed commands; `check-rebuild.sh` guards the rebuilt `gps.so` and `dmenu.so`.
### Charger plug/unplug battery icon
- **Charge icon stayed unchanged on VBUS transitions**: `85-bananarchy-battery.rules` treated every PM8916 event as a capacity change, but `sxmo_hook_battery.sh` caches `state:percentage` and the charger `online` / battery `status` sysfs attributes can still hold the old value while the uevent is delivered. The cache therefore swallowed exactly the plug/unplug event the user wanted to see. Charger events now run `/usr/bin/bananarchy-battery-charge-event.sh`, which forces an immediate `sxmo_hook_battery.sh force` republish (the forced path removes the icon file so `sxmo_status.sh` cannot skip an unchanged value), then re-reads sysfs after two seconds; `flock` coalesces the uevent burst. A generic `ENV{POWER_SUPPLY_ONLINE}` rule covers firmware revisions that publish VBUS on a separate USB/Mains supply. `scripts/test-battery-charge-event.py` validates the immediate + delayed refresh with a stubbed hook, and `check-rebuild.sh` guards the rules, helper and overlay installation. `nokia-argon` keeps the same capacity-change path.