App 2.32.1: drop the cruise control reads; the recorder becomes general
The 2.32.0 recording (ACC set to 101, 90 and 80 km/h behind another car) found none of it among 1,194 values: the head unit does not get the ACC data. Removed the cruise log and the set-speed read (EVHardware is as before 2.27.3); the finding is under "Signals the car does not provide". The recorder stays as the Signal recorder, for finding other signals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LhzAVaUyqcw5PkGjz4mWW6
This commit is contained in:
@@ -427,59 +427,6 @@ 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
|
||||
|
||||
/**
|
||||
* The other driver-assistance properties of `CarAdvancedAssistedDrivingManager` that may
|
||||
* say what the adaptive cruise control is doing, read raw for the Logs tab while their
|
||||
* meaning is established on the car: the operation mode of traffic-jam / intelligent
|
||||
* cruise assist (`LANE_TJAICAOPMD`, by the manager 0 no request, 1 object following,
|
||||
* 2 lane centre, 3 combined), the speed assist (`SPEED_ASST_SYS`, `SPEED_ASST_MODE`, by the
|
||||
* manager 0 off, 2 manual limiter, 3 intelligent), the traffic-jam assist switch, and the
|
||||
* object the ACC follows (`ACC_OBJ_*`: existence probability, longitudinal distance and
|
||||
* relative speed).
|
||||
*/
|
||||
private val ACC_DEBUG_PROPS = listOf(
|
||||
AccDebugProp("cc", PROP_CRUISE_TARGET_SPEED, float = true),
|
||||
AccDebugProp("ica", 0x2140A12A, float = false), // AAD_LANE_TJAICAOPMD
|
||||
AccDebugProp("tja", 0x2140A107, float = false), // AAD_TRAFFIC_JAM_ASST_SYS
|
||||
AccDebugProp("sas", 0x2140A101, float = false), // AAD_SPEED_ASST_SYS
|
||||
AccDebugProp("sam", 0x2140A102, float = false), // AAD_SPEED_ASST_MODE
|
||||
AccDebugProp("obj", 0x2160A12F, float = true), // AAD_ACC_OBJ_EXIST_PRBLTY
|
||||
AccDebugProp("dist", 0x2160A12C, float = true), // AAD_ACC_OBJ_LONG_RLTV_DIST
|
||||
AccDebugProp("rel", 0x2160A12E, float = true), // AAD_ACC_OBJ_LONG_RLTV_SPD
|
||||
)
|
||||
|
||||
private class AccDebugProp(val name: String, val id: Int, val float: Boolean)
|
||||
|
||||
/** 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() }
|
||||
}
|
||||
|
||||
/**
|
||||
* The driver-assistance properties above, one raw reading each, for debugging the adaptive
|
||||
* cruise control on the car: name to value (floats to two decimals), or to "unread" with
|
||||
* the reason the car gave. Read only; about eight calls, so not on the main thread.
|
||||
*/
|
||||
fun readAccDebug(): List<Pair<String, String>> = ACC_DEBUG_PROPS.map { prop ->
|
||||
val value: Any? = supportedTelemetryRead {
|
||||
if (prop.float) getFloatPropertyCPM(prop.id, AREA_GLOBAL)?.takeIf { it.isFinite() }
|
||||
else readPropertyCPM(prop.id, AREA_GLOBAL, Int::class.javaObjectType) { sCpmGetIntMethod } as? Int
|
||||
}
|
||||
prop.name to when (value) {
|
||||
is Float -> String.format(java.util.Locale.US, "%.2f", value)
|
||||
null -> "unread" + (ReadFailureLog.reason(
|
||||
"0x${Integer.toHexString(prop.id)}@0x${Integer.toHexString(AREA_GLOBAL)}")
|
||||
?.let { " ($it)" } ?: "")
|
||||
else -> value.toString()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* `HVAC_AMBIENT_TEMPERATURE`, the one in-car candidate left on this firmware.
|
||||
|
||||
Reference in New Issue
Block a user