App 2.34.0: set the chosen drive mode again when the car starts

The car falls back to its own default mode at every start. With "Set at
start" (on by default), the service sets the mode last chosen on
Settings and confirmed by the car again, once, while the car is in P at
0 km/h, and gives up as soon as the car leaves P or after two minutes
(DriveModeWrite.atStart, unit-tested). The buttons and the start share
the write and read-back (DriveModeSetter). Not tried on the car.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
This commit is contained in:
2026-10-25 20:12:11 +01:00
co-authored by Claude Opus 5.5
parent ce2ebd7f58
commit ed65c96319
13 changed files with 241 additions and 38 deletions
+8 -2
View File
@@ -39,7 +39,7 @@
<string name="usage_last_5_min">over the last 5 minutes</string>
<string name="hint_usable_capacity">Usable battery capacity</string>
<string name="btn_save_capacity">Save capacity</string>
<string name="helper_usable_capacity">Used for the range estimates on the Overview. The 51 kWh MG4 battery has 50.8 kWh usable, the 64 kWh one 61.7, the 77 kWh one 74.4.</string>
<string name="helper_usable_capacity">For range estimates. Usable kWh: 50.8 (51 kWh), 61.7 (64), 74.4 (77).</string>
<string name="usable_capacity_saved">Usable capacity saved</string>
<string name="usable_capacity_invalid">Enter a value between 10 and 150 kWh</string>
<string name="vehicle_row_speed">Speed</string>
@@ -308,7 +308,13 @@
<string name="drive_mode_sport">Sport</string>
<string name="drive_mode_snow">Snow</string>
<string name="drive_mode_custom">Custom</string>
<string name="drive_mode_hint">Changes only in P, at a standstill</string>
<string name="drive_mode_hint">Only in P at a standstill. At start: your last confirmed mode.</string>
<string name="drive_mode_at_start">Set at start</string>
<string name="drive_mode_start_applied">At start (%1$s): %2$s set.</string>
<string name="drive_mode_start_already">At start (%1$s): %2$s was already set.</string>
<string name="drive_mode_start_not_applied">At start (%1$s): %2$s not applied, the car reports %3$s.</string>
<string name="drive_mode_start_unread">At start (%1$s): %2$s sent, not read back.</string>
<string name="drive_mode_start_refused">At start (%1$s): %2$s not accepted by the car.</string>
<string name="drive_mode_setting">Setting %1$s…</string>
<string name="drive_mode_applied">%1$s set: the car reports it now.</string>
<string name="drive_mode_not_applied">%1$s not applied: the car still reports %2$s.</string>
+1
View File
@@ -28,6 +28,7 @@
<item name="android:paddingStart">4dp</item>
<item name="android:paddingEnd">4dp</item>
<item name="android:gravity">center</item>
<item name="android:minHeight">56dp</item>
<item name="strokeColor">@color/choice_stroke</item>
</style>
<style name="Widget.EV.NavTab.Compact">