App 2.27.3: read the cruise control target speed, log it raw
The head unit names a vendor float AAD_EPTCCTRGTSPD (0x2160A15B), the cruise control target speed by its name. EVHardware reads it raw; the Logs tab lists each change with time, speed and gear, to establish the unit and the off value on the car. Emulator only (absent there). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
This commit is contained in:
@@ -427,6 +427,12 @@ object EVHardware {
|
||||
private const val PROP_CCU_ONBD_PLUG = 0x2140F43E // vendor int, AC socket
|
||||
private const val PROP_CCU_OFFBD_PLUG = 0x2140F43F // vendor int, DC socket
|
||||
private const val PROP_ENERGY_SINCE_CHARGE = 0x2160A1BB // vendor float kWh
|
||||
/**
|
||||
* `AAD_EPTCCTRGTSPD` in the head unit's `CarAdvancedAssistedDrivingManager`: by its name the
|
||||
* powertrain's cruise control target speed. Unit and the value while cruise control is off
|
||||
* are not established; it is passed on raw.
|
||||
*/
|
||||
private const val PROP_CRUISE_TARGET_SPEED = 0x2160A15B // vendor float
|
||||
|
||||
/**
|
||||
* `HVAC_AMBIENT_TEMPERATURE`, the one in-car candidate left on this firmware.
|
||||
@@ -532,6 +538,11 @@ object EVHardware {
|
||||
* answers, and this is what is left on a unit where it does not.
|
||||
* See [PROP_BMS_CHRG_STS] for the values.
|
||||
*/
|
||||
/** The cruise control target speed as the car reports it, unmapped; null when unread. */
|
||||
fun getCruiseTargetSpeedRaw(): Float? = supportedTelemetryRead {
|
||||
getFloatPropertyCPM(PROP_CRUISE_TARGET_SPEED, AREA_GLOBAL)?.takeIf { it.isFinite() }
|
||||
}
|
||||
|
||||
fun getVendorChargeStatus(): Int? =
|
||||
getIntPropertyCPM(PROP_BMS_CHRG_STS, AREA_GLOBAL).takeIf { it >= 0 }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user