IQ.Pilot Prebuilt Release @ 7a91404

This commit is contained in:
IQ.Lvbs CI [bot]
2026-08-31 23:04:09 -05:00
commit e2b219bcf7
2545 changed files with 677873 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
def psa_checksum(address: int, sig, d: bytearray) -> int:
chk_ini = {0x452: 0x4, 0x38D: 0x7, 0x42D: 0xC}.get(address, 0xB)
byte = sig.start_bit // 8
d[byte] &= 0x0F if sig.start_bit % 8 >= 4 else 0xF0
checksum = sum((b >> 4) + (b & 0xF) for b in d)
return (chk_ini - checksum) & 0xF
def create_lka_steering(packer, lat_active: bool, apply_angle: float, status: int):
values = {
'DRIVE': 1,
'STATUS': status,
'LXA_ACTIVATION': 1,
'TORQUE_FACTOR': lat_active * 100,
'SET_ANGLE': apply_angle,
}
return packer.make_can_msg('LANE_KEEP_ASSIST', 0, values)