Repository navigation
2.5.25: switch between your cars (issue #52) - #65
Merged
Merged
Conversation
A car button beside the style button lists the user's cars; tapping one switches to it and the app takes that car's own settings: the car, where it was sold, protocol, typed-in VIN, adapter, Dashboard tiles, graphs, custom readings and Android Auto readings. Units, styles and alerts stay shared. Add a car opens the car sheet (closing it without saving goes back to the previous car); Edit cars gives a nickname or removes a car. Switching while connected asks to disconnect first. The app's settings keep holding the chosen car's copy, so the rest of the app is unchanged; CarProfiles saves and swaps the per-car copies. Backups carry the list, every value checked with the backup's own rules (Bluetooth adapters never leave the phone; each car's VIN only when the user includes it). Restoring joins the backup's list with the phone's, keeping this phone's adapter for the same car; an older backup's car joins the list instead of replacing the chosen car. Tour: two cars via debug-only demo_car_add / demo_cars_clear extras, the list, a switch, and Add a car closed without saving. Live preview has the car button and sheet too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iBpQooTxKueeKXA8sku3b
CalmAussie
marked this pull request as ready for review
December 1, 2026 15:08
Design gate: the app name no longer gets cut short on most phones. AM/PM on the top bar's clock is drawn at 60 % size, as phone clocks do, and the app name autosizes from 22sp down to 16sp before the ellipsis is used. Count badge text 11sp. Tour: one more shot at 360dp wide. Pen test note: restoring a backup with 20 cars no longer pushes out cars that are only on this phone; the backup's last cars are left out instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iBpQooTxKueeKXA8sku3b
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iBpQooTxKueeKXA8sku3b
…nd argument Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iBpQooTxKueeKXA8sku3b
…00dp, 22sp from 400dp) The design check of the 360dp tour shot found the clock at 22sp beside an app name that had autosized down to 15-16sp. Both now take @dimen/top_bar_title; the name keeps its autosize (down to 14sp) for large font sizes. The tour also takes the 360dp shot in Race telemetry, whose heading font is condensed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iBpQooTxKueeKXA8sku3b
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by George · project thread
What this adds
Switch between your cars (idea from issue #52). A car button sits in the home screen's top bar, next to the style button, with a small count once there are two or more cars. It opens Your cars: each car with the adapter used with it, the chosen one ticked. Tap a car to switch; the screen is rebuilt with that car's settings.
Each car keeps its own: make, year, model and engine, where it was sold, protocol, a typed-in VIN, the adapter (Bluetooth or Wi-Fi), Dashboard tiles, graphs, custom readings and Android Auto readings. Units, styles, alerts and the histories stay shared (code history was already kept per car).
How it works
The app's settings keep holding the chosen car's copy, so nothing else in the app changed how it reads them.
CarProfiles(pure Kotlin, JVM-tested) keeps the list and works out the swaps;CarGaragesaves them on the phone.Backups: the list (
car_profiles) and the chosen car (active_car) are backed up. Every value inside the list is checked with the backup's existing rules, so a crafted backup can't slip in a public Wi-Fi address or a non read-only custom reading, and Bluetooth adapters never leave the phone. Each car's VIN goes in only when the user includes the VIN. Restoring joins the backup's list with the phone's and keeps this phone's Bluetooth adapter for the same car; an older backup's car joins the list instead of replacing the chosen car.Tests
CarProfilesTest(14 tests: add, switch and back, unfinished add, remove, cap of 20, nicknames, bad lines, backups with and without VIN, value checks, restore merge).CarProfilesTest+BackupFileTestpass on the JVM.demo_car_add/demo_cars_clear, shoots the car button, the list, the switch, and Add a car closed without saving (Pit lane and Asphalt).preview/index.html) has the car button and sheets.Version 2.5.25.
Generated by Claude Code