Commit Graph
17 Commits
Author SHA1 Message Date
liquidraver f06c472e87 usb: unify companion + repeater CDC ACM init, drop boot waits
Single ZephyrUSBCDC module owns the usbd context, 1200-baud DFU
detection, and DTR transitions for both roles. The boot banner
now blocks on a k_event signalled by the usbd_msg_callback when
DTR transitions high — host attached → wakes immediately; no host
→ bounded timeout (2 s repeater, 1 s companion). Replaces the
fixed k_sleep delays in both mains.

Deletes the companion's 10 s DTR-polling work — line state changes
arrive as events now, same callback handles disconnect (resets V3
parser, flips active_iface) and DFU touch (reboots to bootloader).

Side effect: prod companion no longer enumerates a phantom CDC ACM
port (CONFIG_LOG=n skips the whole stack instead of auto-initing
an unused device).
2026-05-27 09:04:32 +02:00
liquidraver 094ea6e8a3 joystick UI:
- track real RTC sync source on the joystick Time screen
- gate joystick-only UI helpers behind stub headers so non-joystick builds skip the extra code without #ifdef at every call site.
2026-05-22 11:38:51 +02:00
liquidraver 322460fa78 joystick UI:
make UI show actual time source
2026-05-22 11:29:25 +02:00
liquidraver 3a35fec8b3 ui: make housekeeping refresh path on-demand
Stop doing UI work nobody asked for. The 5 s housekeeping tick was
reading env sensors (I2C, 10-50 ms), the battery ADC (regulator
toggle + 8 samples, every 60 s), and re-rendering the display
unconditionally — all while the display might be off and nothing
on-air had requested any of it.

Now:
- render_sensors() reads env sensors only when the user is on
  that page (event-driven, never fires during idle)
- battery refresh is lazy on ui_pages_render() with a 30 s
  freshness guard; explicit ui_set_battery() calls also count
- the unconditional OLED rerender from housekeeping is gone;
  real state changes (messages, BLE, button press) still fire
  schedule_render() directly

Telemetry / stats paths read fresh ADC + sensors on demand and
were never using the UI cache, so over-the-air consumers are
unaffected.
2026-05-20 22:10:14 +02:00
liquidraver a6764820d3 repeater housekeeping bugfix 2026-04-24 12:23:15 +02:00
liquidraver 7876ae79c3 make CAD retry jittery, sync prefs load to companion-style 2026-04-18 22:21:57 +02:00
Enot (ded) Skelly a3e47b93cf load radio settings from prefs for repeaters 2026-04-17 13:26:11 -07:00
Rastislav Vysoky da22b127c3 sx1276 2026-04-07 19:05:32 +02:00
liquidraver a1dddbea75 Repeater GPS: separate advert vs telemetry position, persist last fix
GPS fixes no longer overwrite prefs lat/lon — adverts use only
manually-set coordinates (via gps setloc or companion app)

Precise GPS position served via telemetry requests only
getNodeLat()/getNodeLon() returns live GPS fix

Last good fix persisted to /lfs/gps_pos — survives reboots

| Command | Description |
|---------|-------------|
| `gps` | Show GPS status (`on` or `off`) |
| `gps on` | Enable GPS module |
| `gps off` | Disable GPS module |
| `gps setloc` | Update stored latitude/longitude from current GPS fix |
| `gps advert` | Show current location advertising policy |
| `gps advert none` | Do not include location in advertisements |
| `gps advert share` | Include live GPS location in advertisements |
| `gps advert prefs` | Include stored lat/lon from prefs in advertisements |
2026-04-01 11:06:09 +02:00
liquidraver 0e5e71563c logging cleanup 2026-03-29 09:51:53 +02:00
liquidraver a4e96fa6e6 separate main events from housekeeping ones 2026-03-04 21:08:21 +01:00
liquidraver 225b59e0e5 rx duty cycle rework 2026-02-27 08:51:39 +01:00
liquidraver 501d4ce459 duty cycle off, sx erratas 2026-02-25 20:40:39 +01:00
liquidraver 89bee0959f fix repeater advert coordinates 2026-02-23 15:20:50 +01:00
liquidraver b6bc46b921 ESP OTA first implementation 2026-02-22 13:09:18 +01:00
liquidraver dcd8a03c5b Add Station G2 2026-02-20 22:40:56 +01:00
liquidraver 8d1823d0b6 First iteration that seems to work 2026-02-20 12:43:13 +01:00