Shared trip: one itinerary per server (data/trip.json, GET/PUT /api/trip, routed server-side), the route panel edits it when logged in and polls other screens' changes in without moving the camera; the GNSS simulation skips trips under 1 km and starts elsewhere when it can't get on from a road island; the car's server updates itself from a topbar button (SELF_UPDATE=1: newer main with CI passed → bin/update-maptool.sh via maptool-update.path); Android Auto and the trip's next steps in TODO
This commit is contained in:
1 parent
5f4c7c6ee8
commit
17891c53b5
16 files changed
+513
-5
No files matched your search
@@ -191,6 +191,40 @@ Its `.env` adds:
|
||||
never on brick, where every request comes from the proxy.
|
||||
* `TAKEOUT_HOST_DIR` — an empty directory (the Takeout import is brick's).
|
||||
* `SYNC_SERVER_URL` (`https://map.priesol.net`) and `SYNC_TOKEN`: it's a sync client.
|
||||
* `SELF_UPDATE=1` — the update button (below).
|
||||
|
||||
=== Updates (a button, not CI)
|
||||
|
||||
CI deploys brick only: the car's server is often offline, and a deploy
|
||||
mustn't restart it mid-drive. Instead it checks Gitea itself (every
|
||||
10 min while online; the repo is public, no token): when `main` has a
|
||||
newer commit whose CI passed, a ⟳ button shows in the topbar; a click
|
||||
writes `data/update/request.json`, `maptool-update.path` starts
|
||||
`bin/update-maptool.sh` (as root — the container writes `data/` as root),
|
||||
which downloads that commit's archive from Gitea, swaps it into `build/`
|
||||
(the previous one stays as `build.old/`), restarts maptool and reports in
|
||||
`data/update/status.json`; the page reloads on the new revision.
|
||||
|
||||
----
|
||||
# /etc/systemd/system/maptool-update.path
|
||||
[Unit]
|
||||
Description=Update maptool when the app asks
|
||||
[Path]
|
||||
PathExists=/srv/podman/maptool/data/update/request.json
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
# /etc/systemd/system/maptool-update.service
|
||||
[Unit]
|
||||
Description=Update maptool to the commit the app asked for
|
||||
After=network-online.target
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/srv/podman/maptool/build/bin/update-maptool.sh
|
||||
----
|
||||
|
||||
`systemctl enable --now maptool-update.path`. Back by hand:
|
||||
`mv build build.bad && mv build.old build`, restart.
|
||||
|
||||
=== Library sync (both ways, OsmAnd-style)
|
||||
|
||||
|
||||
Reference in new issue
Block a user