Publish native permission for the bypassed-camera Volt configuration

This commit is contained in:
firestar5683
2026-10-29 12:51:00 -05:00
parent 99f52a7048
commit fa25ea0567
6 changed files with 20 additions and 3 deletions
@@ -0,0 +1,15 @@
"""Every qualified GM word must reach pandad's native permission publisher."""
import re
import unittest
from pathlib import Path
from opendbc.car.gm.aol import GM_AOL_WORDS
class TestGmAolRegistry(unittest.TestCase):
def test_pandad_registry_matches_qualified_gm_words(self):
root = Path(__file__).resolve().parents[5]
policy = (root / "openpilot/starpilot/car/gm/aol_policy.h").read_text()
native_words = {int(word, 0) for word in re.findall(r"case (0x[0-9A-Fa-f]+|[0-9]+)U:", policy)}
self.assertEqual(native_words, GM_AOL_WORDS)
Binary file not shown.
Binary file not shown.
@@ -374,7 +374,7 @@ int main() {
forte.safety_mode = HYUNDAI_AOL_PROFILE.mode;
assert(!aol_capable(forte, HYUNDAI_AOL_PROFILE.mode, VEHICLE_REGISTRY));
}
for (const uint16_t word : {0U, 16U, 0xC161U, 0xC162U, 0x80U,
for (const uint16_t word : {0U, 16U, 0xC161U, 0xC162U, 0xC163U, 0x80U,
0xE100U, 0xE101U, 0xE102U, 0xE103U,
0xE110U, 0xE111U, 0xE112U, 0xE113U,
0xE200U, 0xE201U, 0xE202U, 0xE203U,
@@ -414,6 +414,7 @@ int main() {
gateway.safety_mode = GM_AOL_PROFILE.mode;
gateway.safety_param = word;
assert(gm_aol_param(word));
assert(aol_runtime_enabled(false, gateway, VEHICLE_REGISTRY));
queue(transport, gateway, gateway);
const auto first = run(negotiator, transport, axis("gateway"), NOW, GM_AOL_PROFILE.mode);
assert(first.plan.capable && first.plan.request_mask == 0U && first.outcome.compatible);
@@ -451,6 +452,7 @@ int main() {
gm.safety_param = static_cast<uint16_t>(word);
const auto decoded = parse_aol_status(bytes(gm).data(), sizeof(gm));
assert(aol_capable(decoded, GM_AOL_PROFILE.mode, VEHICLE_REGISTRY) == gm_aol_param(gm.safety_param));
assert(aol_runtime_enabled(false, decoded, VEHICLE_REGISTRY) == gm_aol_param(gm.safety_param));
gm.capability_flags = 0U;
const auto absent = parse_aol_status(bytes(gm).data(), sizeof(gm));
assert(!aol_capable(absent, GM_AOL_PROFILE.mode, VEHICLE_REGISTRY));
+1 -1
View File
@@ -48,7 +48,7 @@ inline bool gm_aol_param(uint16_t param) {
case 0x4207U: case 0x4607U: case 0x4A07U: case 0x4E07U:
case 0x4287U: case 0x4687U: case 0x4A87U: case 0x4E87U: case 0x4087U:
case 0x4004U: case 0xC004U: case 0x4084U: case 0xC084U: case 0x4007U:
case 16U: case 0xC160U: case 0xC161U: case 0xC162U: case 0xC180U: case 0xC181U:
case 16U: case 0xC160U: case 0xC161U: case 0xC162U: case 0xC163U: case 0xC180U: case 0xC181U:
case 0xC182U: case 0xC183U: case 0xC184U: case 0xC185U: case 0xC186U: case 0xC187U: case 0xC170U:
case 0x1001U: case 0x1401U: case 0x3001U: case 0x3401U:
case 0x1003U: case 0x1403U:
+1 -1
View File
@@ -1 +1 @@
{"protected_inventory_sha256": "c5226e96a5fac82509846a227a852fd35d6561d3d181aca77665c9b7a11d6552", "schema_version": 1}
{"protected_inventory_sha256": "fd87cd5ed34840cfecffedb8d655b20ed2e800516419170e4684ee8dbef761cb", "schema_version": 1}