IQ.Pilot Release Commit @ 36625eb
This commit is contained in:
@@ -474,7 +474,7 @@ class CarController(CarControllerBase):
|
||||
if hud_control.leadDistanceBars != self.lead_distance_bars_last:
|
||||
self.distance_bar_frame = self.frame
|
||||
|
||||
if self.frame % self.CCP.ACC_HUD_STEP == 0 and self.CP.openpilotLongitudinalControl:
|
||||
if self.frame % self.CCP.ACC_HUD_STEP == 0 and self.CP.openpilotLongitudinalControl and not CS.out.radarDisableFailed:
|
||||
if self.CP.flags & (VolkswagenFlags.MEB | VolkswagenFlags.MQB_EVO):
|
||||
fcw_alert = hud_control.visualAlert == VisualAlert.fcw
|
||||
show_distance_bars = self.frame - self.distance_bar_frame < 400
|
||||
|
||||
@@ -340,11 +340,19 @@ class CarState(CarStateBase):
|
||||
|
||||
self.ldw_stock_values = cam_cp.vl["LDW_02"]
|
||||
|
||||
awv_values = ext_cp.vl.get("AWV_03", ext_cp.vl.get("ACC_10", {}))
|
||||
ret.stockFcw = bool(awv_values.get("FCW_Active", 0)) or bool(awv_values.get("AWV2_Freigabe", 0))
|
||||
if not (self.CP.flags & VolkswagenFlags.DISABLE_RADAR):
|
||||
awv_values = ext_cp.vl.get("AWV_03", ext_cp.vl.get("ACC_10", {}))
|
||||
ret.stockFcw = bool(awv_values.get("FCW_Active", 0)) or bool(awv_values.get("AWV2_Freigabe", 0))
|
||||
else:
|
||||
ret.stockFcw = False
|
||||
ret.stockAeb = False
|
||||
|
||||
self.acc_type = ext_cp.vl["ACC_18"]["ACC_Typ"]
|
||||
# Camera harness (DISABLE_RADAR): ext_cp == pt_cp, so ACC_18 reads our own sent value.
|
||||
# Hardcode acc_type=2 (stop-and-go capable) to avoid self-referential read on first frame.
|
||||
if self.CP.flags & VolkswagenFlags.DISABLE_RADAR:
|
||||
self.acc_type = 2
|
||||
else:
|
||||
self.acc_type = ext_cp.vl["ACC_18"]["ACC_Typ"]
|
||||
self.travel_assist_available = bool(pt_cp.vl.get("TA_01", {}).get("Travel_Assist_Available", 0))
|
||||
|
||||
ret.cruiseState.available = pt_cp.vl["Motor_51"]["TSK_Status"] in (2, 3, 4, 5)
|
||||
@@ -764,11 +772,13 @@ class CarState(CarStateBase):
|
||||
# math.nan → ignore_alive=True so it never contributes to can_valid.
|
||||
("TA_01", math.nan),
|
||||
]
|
||||
if CP.networkLocation == NetworkLocation.fwdCamera:
|
||||
# AWV_03 (stock radar FCW/AEB) — don't subscribe when DISABLE_RADAR, the radar is silenced
|
||||
# and our carcontroller sends the replacement. Subscribing causes CAN parser timeout errors.
|
||||
if CP.networkLocation == NetworkLocation.fwdCamera and not (CP.flags & VolkswagenFlags.DISABLE_RADAR):
|
||||
pt_messages.append(("AWV_03", 1))
|
||||
|
||||
cam_messages = []
|
||||
if CP.networkLocation == NetworkLocation.gateway:
|
||||
if CP.networkLocation == NetworkLocation.gateway and not (CP.flags & VolkswagenFlags.DISABLE_RADAR):
|
||||
cam_messages.append(("AWV_03", 1))
|
||||
|
||||
return {
|
||||
|
||||
@@ -28,7 +28,7 @@ def create_steering_control(packer, bus, apply_curvature, lkas_enabled, power):
|
||||
values = {
|
||||
"Curvature": abs(apply_curvature), # in rad/m
|
||||
"Curvature_VZ": 1 if apply_curvature > 0 and lkas_enabled else 0,
|
||||
"Power": 100 if lkas_enabled else 0, # TEST: hard 100%, no ramp
|
||||
"Power": power if lkas_enabled else 0,
|
||||
"RequestStatus": 4 if lkas_enabled else 2,
|
||||
"HighSendRate": lkas_enabled,
|
||||
}
|
||||
|
||||
@@ -141,6 +141,8 @@ class CarControllerParams:
|
||||
}
|
||||
|
||||
elif CP.flags & (VolkswagenFlags.MEB | VolkswagenFlags.MQB_EVO):
|
||||
self.AEB_CONTROL_STEP = 100 # AWV_03 radar-replacement at 1Hz (class default 2 = 50Hz is for MQB ACC_10)
|
||||
self.AEB_HUD_STEP = 20 # MEB_AWV_01 AEB HUD at 5Hz
|
||||
self.LDW_STEP = 10
|
||||
self.ACC_HUD_STEP = 6
|
||||
self.STEER_DRIVER_ALLOWANCE = 60
|
||||
|
||||
@@ -244,11 +244,11 @@ static bool volkswagen_meb_tx_hook(const CANPacket_t *msg) {
|
||||
};
|
||||
|
||||
const CurvatureSteeringLimits VOLKSWAGEN_MEB_STEERING_LIMITS = {
|
||||
.max_curvature = 32767, // TEST: 15-bit max, no curvature ceiling
|
||||
.max_curvature = 29105,
|
||||
.curvature_to_can = 149253.7313f,
|
||||
.send_rate = 0.02f,
|
||||
.inactive_curvature_is_zero = true,
|
||||
.max_power = 65535, // TEST: no power ceiling
|
||||
.max_power = 225, // 90% (raw byte, 0.4 %/bit; matches Python STEERING_POWER_MAX = 90)
|
||||
};
|
||||
|
||||
bool tx = true;
|
||||
|
||||
Reference in New Issue
Block a user