mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-09-14 21:53:43 +08:00
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 <noreply@anthropic.com> * 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 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> Co-authored-by: James Vecellio-Grant <159560811+Discountchubbs@users.noreply.github.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user