|
|
|
@ -138,7 +138,8 @@ class Controls: |
|
|
|
|
|
|
|
|
|
def publish(self, CC, lac_log): |
|
|
|
|
CS = self.sm['carState'] |
|
|
|
|
model = self.sm['model_v2'] |
|
|
|
|
model_v2 = self.sm['modelV2'] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Orientation and angle rates can be useful for carcontroller |
|
|
|
|
# Only calibrated (car) frame is relevant for the carcontroller |
|
|
|
@ -159,8 +160,8 @@ class Controls: |
|
|
|
|
hudControl.leadDistanceBars = self.sm['selfdriveState'].personality.raw + 1 |
|
|
|
|
hudControl.visualAlert = self.sm['selfdriveState'].alertHudVisual |
|
|
|
|
|
|
|
|
|
hudControl.rightLaneVisible = 1 if(model.LaneLines[2] and model.LaneLineProbs[2] > 0.5) else 0 |
|
|
|
|
hudControl.leftLaneVisible = 1 if(model.LaneLines[1] and model.LaneLineProbs[1] > 0.5) else 0 |
|
|
|
|
hudControl.rightLaneVisible = 1 if(model_v2.LaneLines[2] and model_v2.LaneLineProbs[2] > 0.5) else 0 |
|
|
|
|
hudControl.leftLaneVisible = 1 if(model_v2.LaneLines[1] and model_v2.LaneLineProbs[1] > 0.5) else 0 |
|
|
|
|
if self.sm.valid['driverAssistance']: |
|
|
|
|
hudControl.leftLaneDepart = self.sm['driverAssistance'].leftLaneDeparture |
|
|
|
|
hudControl.rightLaneDepart = self.sm['driverAssistance'].rightLaneDeparture |
|
|
|
|