From f2dac546d0df3c9400733afe485f74507c51c137 Mon Sep 17 00:00:00 2001 From: RallyBlock <50393307+RallyBlock@users.noreply.github.com> Date: Thu, 22 Oct 2026 14:34:41 -0700 Subject: [PATCH] Add a README so the app and the Pelican install are explained on the repo. --- README.md | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..83f433d --- /dev/null +++ b/README.md @@ -0,0 +1,68 @@ +# Pit Log + +Pit Log is an offline-first Android app for hobby stock and thunder car asphalt ovals. It keeps race nights, tire pressures, tire heat, and the car's setup on the phone. Two phones can share a car through the sync server. + +Pressures are PSI. Tire heat is °F, read inside, middle, then outside. + +## On the phone + +The gear icon opens **Car**. A new install already has the server address filled in: + +`http://sync.sleepingliongames.com:27017` + +**Sync on its own** sends a save right away, checks about every 30 seconds while the app is open, and about every 15 minutes while it is closed. **Sync now** sends every car on the phone. + +Each car has its own token, shown on the **Car** screen. **Share token** sends that string to another phone. On the other phone, paste it under **Add a car from a token**. That phone then syncs that car. A different car gets a different token. + +**Remove from this phone** takes the car off that phone only. The other phone and the server keep it. + +The book icon opens the setup guide. **Car setup** on the home screen is the original setup for the selected car, plus a log of later changes. A race night keeps its own chassis sheet. + +## Sync server + +The server is one small Python program, `sync/pitlog_sync.py`. It listens on the Pelican allocation port and stores each car token in its own database file. `GET /health` returns `{"ok":true}`. + +Phones use plain HTTP. The address above is the live server. + +### Pelican + +Import this egg into a nest on the panel: + +https://git.ny.daprogs.com/RallyBlock/Pit-Log-App/raw/branch/main/sync/egg-pitlog.yaml + +Create a server from **Pit Log sync**. Use the Python 3.13 image, one port, and leave **Token** blank. The startup command is: + +```text +/usr/local/bin/python /home/container/pitlog_sync.py +``` + +Start the server. The console prints `Pit Log sync listening` and the port. Phones use `http://` plus the allocation address and that port. + +A reinstall downloads `pitlog_sync.py` again from this repo. If the panel wipes server files, the phones still have their logs and send them on the next sync. + +## Build + +The Android package is `com.racingapp.pitlog`. It needs an Android SDK and JDK 17 or newer. Put the SDK location in `local.properties`: + +```text +sdk.dir=C\:\\Users\\you\\AppData\\Local\\Android\\Sdk +``` + +That file stays off git. From the project root: + +```text +gradlew.bat assembleDebug +``` + +Build output is written to `D:\RacingAPP-build` so it stays out of a synced project folder. The debug APK is: + +`D:\RacingAPP-build\app\outputs\apk\debug\app-debug.apk` + +APK files are gitignored. + +## Layout + +- `app/` is the Android app. +- `sync/pitlog_sync.py` is the sync server. +- `sync/egg-pitlog.yaml` is the Pelican egg. +- `preview/` holds screen pictures used while looking at the UI.