From 5484f7f4a72a98ff863762ab8049d5d167bc5c95 Mon Sep 17 00:00:00 2001 From: Matt Purnell <65473602+mpurnell1@users.noreply.github.com> Date: Sun, 13 Sep 2026 14:49:59 -0500 Subject: [PATCH] modeld: set the valid flag on modelDataV2SP (#2017) * modeld: set the valid flag on modelDataV2SP modelDataV2SP was published with new_message's default valid=False, so the message was permanently invalid. Nothing acts on that today because selfdrived lists it under ignore_valid, but it shows up as invalid in every commIssue dump and hides any real problem behind a false one. Copy modelV2's flag, the same way fill_model_msg already does for drivingModelData. Assisted-by: Claude Co-Authored-By: Claude Fable 5.1 * modeld_v2: set the valid flag on modelDataV2SP The sunnypilot model runner publishes the same message and had the same gap. Copy modelV2's flag here too, so both daemons agree. Assisted-by: Claude Co-Authored-By: Claude Fable 5.1 --------- Co-authored-by: Claude Fable 5.1 Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com> --- openpilot/selfdrive/modeld/modeld.py | 1 + openpilot/sunnypilot/modeld_v2/modeld.py | 1 + 2 files changed, 2 insertions(+) diff --git a/openpilot/selfdrive/modeld/modeld.py b/openpilot/selfdrive/modeld/modeld.py index 7e7fa7f583..b98b4d0f58 100755 --- a/openpilot/selfdrive/modeld/modeld.py +++ b/openpilot/selfdrive/modeld/modeld.py @@ -474,6 +474,7 @@ def main(demo=False): DH.update(sm['carState'], sm['carControl'].latActive, lane_change_prob, left_edge, right_edge) modelv2_send.modelV2.meta.laneChangeState = DH.lane_change_state modelv2_send.modelV2.meta.laneChangeDirection = DH.lane_change_direction + mdv2sp_send.valid = modelv2_send.valid mdv2sp_send.modelDataV2SP.laneTurnDirection = DH.lane_turn_direction fill_driving_model_data(drivingdata_send, modelv2_send) diff --git a/openpilot/sunnypilot/modeld_v2/modeld.py b/openpilot/sunnypilot/modeld_v2/modeld.py index c80249c571..6e31045b89 100755 --- a/openpilot/sunnypilot/modeld_v2/modeld.py +++ b/openpilot/sunnypilot/modeld_v2/modeld.py @@ -552,6 +552,7 @@ def main(demo=False): DH.update(sm['carState'], sm['carControl'].latActive, lane_change_prob, left_edge, right_edge) modelv2_send.modelV2.meta.laneChangeState = DH.lane_change_state modelv2_send.modelV2.meta.laneChangeDirection = DH.lane_change_direction + mdv2sp_send.valid = modelv2_send.valid mdv2sp_send.modelDataV2SP.laneTurnDirection = DH.lane_turn_direction drivingdata_send.drivingModelData.meta.laneChangeState = DH.lane_change_state drivingdata_send.drivingModelData.meta.laneChangeDirection = DH.lane_change_direction