App 2.33.0: set the drive mode from Settings, only in P at a standstill
The owner lifted the read-only rule for the drive mode alone. Settings has Eco, Normal, Sport, Snow and Custom; the lit button is what the car reports. A tap reads gear and speed fresh and writes only in P at 0 km/h (DriveModeWrite, unit-tested; unreadable is a refusal), through a CPM-only write behind EVHardware's standstill gate, then reads the mode back and says what the car reports. The wide layout's charging price joined the battery card so the page still fits. 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:
@@ -2432,6 +2432,16 @@ object EVHardware {
|
||||
return ok
|
||||
}
|
||||
|
||||
/**
|
||||
* The drive mode write Nils' MG4 uses: the CarPropertyManager write alone, behind
|
||||
* [VehicleWriteGate] like every write here, without [setDriveMode]'s fallback binder
|
||||
* transaction or its remembered "last mode". True means the write call went through, not
|
||||
* that the car took it: read [getDriveModeRaw] back.
|
||||
*/
|
||||
@RequiresStandstill
|
||||
fun writeDriveModeProperty(mode: DriveMode): Boolean =
|
||||
setIntPropertyCPM(PROP_DRIVE_MODE, AREA_GLOBAL, mode.value)
|
||||
|
||||
@RequiresStandstill
|
||||
fun setRegenLevel(level: RegenLevel): Boolean {
|
||||
if (logEnabled) AppLogger.i(TAG, "setRegenLevel → ${level.label} (${level.value})")
|
||||
|
||||
Reference in New Issue
Block a user