Skip to content

Commit 5fe66f6

Browse files
malysclaude
andcommitted
feat(route): every road is a row, and the one chosen is the one handed over
CP-057 rule 6 was never met: the comparison card was text, and Go always sent the routed road. The second ORS road and the motorway-free road are now rows like the routed one, chained, with their charge against it and its band. One button per road re-plans the screen on it - stops, charger search, speed what-if, drift companion - and Go hands that road's pathway to the car. Past 100 km as the crow flies the second road is not asked for: ORS refuses the whole request there, so it cost a refused request and a retry. The card says so, and labels every figure estimated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent c54e29e commit 5fe66f6

7 files changed

Lines changed: 354 additions & 185 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ All notable changes follow [Keep a Changelog](https://keepachangelog.com/en/1.1.
1212
- **The consumption model trains on SWI68.** The 2026-10-16 bundle refused it for a negative
1313
weather term alone; the fit now drops that term instead, so the eco verdict, speed what-if,
1414
route what-if and energy breakdown can fill in.
15+
- **Route choices can be chosen (CP-057).** The second road the routing service sends back is a
16+
row of the comparison, with its stops and its charge against the routed road; one button per
17+
road re-plans the screen on it, and *Go* hands that road to the car. Past 100 km the second
18+
road is no longer asked for, which saves a refused request and its retry.
1519
- **"This vehicle never publishes battery power" is gone on SWI68.** The pack fallback reads it;
1620
the screens now say it is not validated yet.
1721

‎README.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,9 @@ temporary file on USB. No archive copy accumulates on AAOS.
140140
(see [Configuration](#configuration)); without one, every other screen still works.
141141
- On that same plan: what slowing down would change. Where the road ahead is fast, the app
142142
shows what 130, 120, 110, 100 and 90 km/h would save in charge and cost in minutes, and
143-
names the mildest slowdown that removes the charging stop. A second road comes back with the
144-
same request and is compared on distance, time and charge. It never recommends a speed.
143+
names the mildest slowdown that removes the charging stop. A second road, and a motorway-free
144+
one when the plan needs a stop, are compared on distance, time and charge; pick one and the
145+
plan and the hand-off to the car follow it. It never recommends a speed or a road.
145146
- A battery page: the pack's state of health measured rather than declared, how long since its
146147
charge gauge last had a full charge to anchor itself on, what the pack has been subjected to,
147148
and what the last charge cost — points gained, duration, and approximate energy and mean power

‎app/src/main/java/com/evsuite/chargepilot/ChargeStopActivity.kt‎

Lines changed: 301 additions & 171 deletions
Large diffs are not rendered by default.

‎app/src/main/res/layout/activity_charge_stop.xml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,16 @@
172172
android:textAppearance="@style/Text.EV.Body"
173173
android:visibility="gone" />
174174

175+
<!-- One button per road, filled in code. Choosing one re-plans the trip on it, and
176+
"Go" then hands that road to the car (CP-057 rule 6). -->
177+
<LinearLayout
178+
android:id="@+id/roadChoiceActions"
179+
android:layout_width="1400dp"
180+
android:layout_height="wrap_content"
181+
android:layout_marginTop="@dimen/spacing_sm"
182+
android:orientation="horizontal"
183+
android:visibility="gone" />
184+
175185
<TextView
176186
android:id="@+id/chargeStopAttribution"
177187
android:layout_width="1400dp"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- One road of CP-057's comparison. Outlined, a 72dp target, and the chosen one says so in
3+
its label rather than in a colour. -->
4+
<com.google.android.material.button.MaterialButton xmlns:android="http://schemas.android.com/apk/res/android"
5+
style="@style/Widget.EV.Button.Outlined"
6+
android:layout_width="0dp"
7+
android:layout_height="wrap_content"
8+
android:layout_weight="1"
9+
android:layout_marginEnd="@dimen/spacing_md"
10+
android:minHeight="72dp" />

‎app/src/main/res/values-fr/strings.xml‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,6 @@ Consommation %6$s %% par km</string>
304304
<string name="charge_stop_grade">Montée et descente : %1$s %% de charge estimés, ± %2$s. Modélisé d’après le profil de l’itinéraire, jamais mesuré.</string>
305305
<string name="route_what_if_headline">À %1$d km/h vous n’auriez pas besoin de recharger, pour environ %2$d min de plus sur la route.</string>
306306
<string name="route_what_if_row">%1$d km/h sur %2$s km · +%3$d min · économise %4$s à %5$s %% de charge estimés</string>
307-
<string name="route_what_if_alternative">Par %1$s : %2$s km, %3$s min, %4$s à %5$s %% de charge estimés.</string>
308-
<string name="route_what_if_alternative_unnamed">Autre route : %1$s km, %2$s min, %3$s à %4$s %% de charge estimés.</string>
309307
<string name="route_what_if_unavailable_model">Ralentir : pas de comparaison. Ce micrologiciel n’a jamais entraîné de modèle de consommation.</string>
310308
<string name="route_what_if_unavailable_temperature">Ralentir : pas de comparaison. Aucune température extérieure exploitable.</string>
311309
<string name="route_what_if_unavailable_road">Ralentir : pas de comparaison. Rien sur cet itinéraire n’est parcouru assez vite pour ralentir.</string>
@@ -367,20 +365,29 @@ Consommation %6$s %% par km</string>
367365
<string name="charge_stop_charger">%1$s\u2009· à %2$s km · %3$s kW · %4$s</string>
368366
<!-- CP-057. Trois façons d’aller au même endroit. Chaque ligne porte une charge et un
369367
temps, ou aucun des deux : une économie sans son prix est un conseil déguisé en fait. -->
370-
<string name="route_choices_title">Trois façons d\u2019y aller</string>
371-
<string name="route_choices_planned">Itinéraire calculé · %1$s km · %2$s min</string>
368+
<string name="route_choices_title">Façons d\u2019y aller</string>
372369
<string name="route_choices_slower">À %1$d km/h sur les sections rapides · %2$s km · +%3$s min</string>
373-
<string name="route_choices_no_motorway">Sans autoroute · %1$s km · %2$s min · %3$s</string>
374370
<string name="route_choices_stop">un arrêt de recharge après %1$s km, environ %2$s %% restants en y arrivant</string>
375371
<string name="route_choices_stop_unknown">un arrêt de recharge après %1$s km</string>
376372
<string name="route_choices_no_stop">pas d\u2019arrêt de recharge, environ %1$s %% restants à l\u2019arrivée</string>
377373
<string name="route_choices_removes_stop">pas d\u2019arrêt de recharge</string>
378374
<string name="route_choices_refused">non calculable : %1$s</string>
379375
<string name="route_choices_slower_absent">Aucune vitesse sur cette route ne supprime l\u2019arrêt de recharge.</string>
380376
<string name="route_choices_no_motorway_absent">Aucune route sans autoroute n\u2019est revenue pour ce trajet.</string>
381-
<string name="route_choices_delta_faster">%1$s min de moins</string>
382377
<string name="route_choices_delta_slower">+%1$s min</string>
383378
<string name="route_choices_requests">Ce plan a utilisé %1$d requête(s) d\u2019itinéraire sur l\u2019allocation de votre clé.</string>
379+
<string name="route_choices_chosen">Choisie · %1$s</string>
380+
<string name="route_choices_road">%1$s · %2$s km · %3$s min · %4$s</string>
381+
<string name="route_choices_delta_fastest">la plus rapide</string>
382+
<string name="route_choices_versus">%1$s km par rapport à l\u2019itinéraire calculé, %2$s à %3$s %% de charge estimés</string>
383+
<string name="route_choices_second_not_offered">Au-delà de 100 km, le service d\u2019itinéraire ne propose pas de seconde route.</string>
384+
<string name="route_choices_estimated">Tous ces chiffres sont estimés à partir de vos trajets enregistrés, jamais mesurés.</string>
385+
<string name="route_choices_action">%1$s</string>
386+
<string name="route_choices_action_chosen">Choisie : %1$s</string>
387+
<string name="route_choices_name_planned">Itinéraire calculé</string>
388+
<string name="route_choices_name_via">Par %1$s</string>
389+
<string name="route_choices_name_second">Autre route</string>
390+
<string name="route_choices_name_no_motorway">Sans autoroute</string>
384391
<!-- CP-056. Le passage de relais. La note n’est jamais repliée dans le libellé du bouton :
385392
un conducteur lit un bouton comme une promesse, et « geo: » ne porte qu’un point. -->
386393
<string name="charge_stop_navigate">Y aller</string>

‎app/src/main/res/values/strings.xml‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,6 @@ Spending %6$s %% per km</string>
311311
<!-- CP-049. Every saving is stated with the delay it costs, in the same sentence. -->
312312
<string name="route_what_if_headline">At %1$d km/h you would not need to charge, for about %2$d min more on the road.</string>
313313
<string name="route_what_if_row">%1$d km/h over %2$s km · +%3$d min · saves an estimated %4$s to %5$s %% of charge</string>
314-
<string name="route_what_if_alternative">Via %1$s: %2$s km, %3$s min, an estimated %4$s to %5$s %% of charge.</string>
315-
<string name="route_what_if_alternative_unnamed">Another road: %1$s km, %2$s min, an estimated %3$s to %4$s %% of charge.</string>
316314
<string name="route_what_if_unavailable_model">Slowing down: no comparison. This firmware has never trained a consumption model.</string>
317315
<string name="route_what_if_unavailable_temperature">Slowing down: no comparison. No usable outside-temperature reading.</string>
318316
<string name="route_what_if_unavailable_road">Slowing down: no comparison. Nothing on this route is driven fast enough to slow down from.</string>
@@ -374,20 +372,29 @@ Spending %6$s %% per km</string>
374372
<string name="charge_stop_charger">%1$s\u2009· %2$s km along · %3$s kW · %4$s</string>
375373
<!-- CP-057. Three ways to the same place. Every row carries both a charge and a time, or
376374
neither: a saving with its price left off is a recommendation wearing a fact's clothes. -->
377-
<string name="route_choices_title">Three ways there</string>
378-
<string name="route_choices_planned">As routed · %1$s km · %2$s min</string>
375+
<string name="route_choices_title">Ways there</string>
379376
<string name="route_choices_slower">At %1$d km/h on the fast sections · %2$s km · +%3$s min</string>
380-
<string name="route_choices_no_motorway">Avoiding motorways · %1$s km · %2$s min · %3$s</string>
381377
<string name="route_choices_stop">one charging stop after %1$s km, about %2$s %% left on reaching it</string>
382378
<string name="route_choices_stop_unknown">one charging stop after %1$s km</string>
383379
<string name="route_choices_no_stop">no charging stop, about %1$s %% left on arrival</string>
384380
<string name="route_choices_removes_stop">no charging stop</string>
385381
<string name="route_choices_refused">could not be worked out: %1$s</string>
386382
<string name="route_choices_slower_absent">No speed on this road removes the charging stop.</string>
387383
<string name="route_choices_no_motorway_absent">No motorway-free road came back for this trip.</string>
388-
<string name="route_choices_delta_faster">%1$s min quicker</string>
389384
<string name="route_choices_delta_slower">+%1$s min</string>
390385
<string name="route_choices_requests">This plan used %1$d route request(s) of your key\u2019s allowance.</string>
386+
<string name="route_choices_chosen">Chosen · %1$s</string>
387+
<string name="route_choices_road">%1$s · %2$s km · %3$s min · %4$s</string>
388+
<string name="route_choices_delta_fastest">fastest</string>
389+
<string name="route_choices_versus">%1$s km against the routed road, an estimated %2$s to %3$s %% of charge</string>
390+
<string name="route_choices_second_not_offered">Past 100 km the routing service offers no second road.</string>
391+
<string name="route_choices_estimated">Every figure here is estimated from your recorded trips, never measured.</string>
392+
<string name="route_choices_action">%1$s</string>
393+
<string name="route_choices_action_chosen">Chosen: %1$s</string>
394+
<string name="route_choices_name_planned">As routed</string>
395+
<string name="route_choices_name_via">Via %1$s</string>
396+
<string name="route_choices_name_second">Other road</string>
397+
<string name="route_choices_name_no_motorway">No motorway</string>
391398
<!-- CP-056. The handoff. Its note is never folded into the button label: a driver reads a
392399
button as a promise, and "geo:" carries one point, so a route planned through a charging
393400
stop cannot be pinned by its endpoint. -->

0 commit comments

Comments
 (0)