Mazda: explicitly copy signals to forward (#28244)

mazda
pull/28245/head
Shane Smiskol 2 years ago committed by GitHub
parent f951390dda
commit 37eb9f900c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 14
      selfdrive/car/mazda/mazdacan.py

@ -1,5 +1,3 @@
import copy
from selfdrive.car.mazda.values import GEN1, Buttons from selfdrive.car.mazda.values import GEN1, Buttons
@ -64,7 +62,17 @@ def create_steering_control(packer, car_fingerprint, frame, apply_steer, lkas):
def create_alert_command(packer, cam_msg: dict, ldw: bool, steer_required: bool): def create_alert_command(packer, cam_msg: dict, ldw: bool, steer_required: bool):
values = copy.copy(cam_msg) values = {s: cam_msg[s] for s in [
"LINE_VISIBLE",
"LINE_NOT_VISIBLE",
"LANE_LINES",
"BIT1",
"BIT2",
"BIT3",
"NO_ERR_BIT",
"S1",
"S1_HBEAM",
]}
values.update({ values.update({
# TODO: what's the difference between all these? do we need to send all? # TODO: what's the difference between all these? do we need to send all?
"HANDS_WARN_3_BITS": 0b111 if steer_required else 0, "HANDS_WARN_3_BITS": 0b111 if steer_required else 0,

Loading…
Cancel
Save