Skip to content

Commit 7e35d19

Browse files
malysclaude
andcommitted
feat(lights): raw exterior-light probe for EVTasker's Diagnostic (CR-046)
probeExteriorLights() reads the six standard light properties whatever ExteriorLights.PROVEN says, so the on-car evidence comes from EVTasker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 200112f commit 7e35d19

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

‎lib/src/main/java/com/evsuite/hardware/EVHardware.kt‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,15 @@ object EVHardware {
577577
probeProperty("HVAC_AMBIENT_TEMPERATURE", PROP_HVAC_AMBIENT_TEMP_SWI68, AREA_GLOBAL, Float::class.javaObjectType),
578578
)
579579

580+
/**
581+
* The six exterior-light properties (CR-046), read raw whatever [ExteriorLights.PROVEN] says:
582+
* this is the evidence that fills it. EVTasker's Diagnostic shows and exports it — read once
583+
* with a light off and once with it on; a generation is proven when the state follows.
584+
*/
585+
fun probeExteriorLights(): List<PropertyReport> = ExteriorLights.NAMES.map { (id, name) ->
586+
probeProperty(name, id, AREA_GLOBAL, Int::class.javaObjectType)
587+
}
588+
580589
private fun probeProperty(name: String, propId: Int, areaId: Int, boxed: Class<*>): PropertyReport {
581590
val cpm = sCarPropertyManager
582591
?: return PropertyReport(name, propId, areaId, "CarPropertyManager not connected")

‎lib/src/main/java/com/evsuite/hardware/ExteriorLights.kt‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ package com.evsuite.hardware
66
* Kept free of Android so the policy is pinned by JVM tests. The ids are the public
77
* `VehicleProperty` ones (types.hal 2.0, available on AAOS 9); nothing here comes from a vendor
88
* catalogue. Whether the MG4 VHAL publishes them is a per-generation question: a generation joins
9-
* [PROVEN] only with a capture showing the state follow the stalk, in the same commit as the
9+
* [PROVEN] only with a capture showing the state follow the stalk — EVTasker's Diagnostic
10+
* `EXTERIOR_LIGHTS` row ([EVHardware.probeExteriorLights]), exported off and on — in the same commit as the
1011
* `@SupportedOn` of the light entries and their `writeProven`.
1112
*
1213
* Owner decisions (2026-10-08): writes only at 0 km/h like every vehicle write, and a rule may

0 commit comments

Comments
 (0)