This commit is contained in:
Your Name
2024-02-05 16:25:47 -06:00
parent 7949e90b75
commit 2964ede91a
6 changed files with 56 additions and 15 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -176,6 +176,16 @@ class CarController:
def create_button_messages(self, CC: car.CarControl, CS: car.CarState, use_clu11: bool):
can_sends = []
if CS.custom_speed_down:
CS.custom_speed_down = False
if self.CP.openpilotLongitudinalControl:
CC.cruiseControl.resume = True
self.CP.openpilotLongitudinalControl = False
else:
CC.cruiseControl.cancel = True
self.CP.openpilotLongitudinalControl = True
if use_clu11:
if CC.cruiseControl.cancel:
can_sends.append(hyundaican.create_clu11(self.packer, self.frame, CS.clu11, Buttons.CANCEL, self.CP.carFingerprint))
@@ -208,9 +218,7 @@ class CarController:
can_sends.append(hyundaicanfd.create_buttons(self.packer, self.CP, self.CAN, CS.buttons_counter+1, Buttons.RES_ACCEL))
self.last_button_frame = self.frame
if CS.custom_speed_up:
can_sends.extend([hyundaican.create_clu11(self.packer, self.frame, CS.clu11, Buttons.RES_ACCEL, self.CP.carFingerprint)] * 25)
elif CS.custom_speed_down:
can_sends.extend([hyundaican.create_clu11(self.packer, self.frame, CS.clu11, Buttons.SET_DECEL, self.CP.carFingerprint)] * 25)
return can_sends

View File

@@ -350,6 +350,7 @@ class CarState(CarStateBase):
return ret
# BBOT does not work
def calculate_speed_limit_canfd(self, CP, cp, cp_cam):
try:
self._speed_limit_clu = cp.vl["CLUSTER_SPEED_LIMIT"]["SPEED_LIMIT_1"]
@@ -456,6 +457,9 @@ class CarState(CarStateBase):
("BLINDSPOTS_REAR_CORNERS", 20),
]
# if CP.nav_msg:
messages.append(("CLUSTER_SPEED_LIMIT", 10))
if not (CP.flags & HyundaiFlags.CANFD_CAMERA_SCC.value) and not CP.openpilotLongitudinalControl:
messages += [
("SCC_CONTROL", 50),
@@ -474,7 +478,6 @@ class CarState(CarStateBase):
("SCC_CONTROL", 50),
]
# if CP.nav_msg:
messages.append(("CLUSTER_SPEED_LIMIT", 10))
return CANParser(DBC[CP.carFingerprint]["pt"], messages, CanBus(CP).CAM)

View File

@@ -88,7 +88,7 @@ Spinner::Spinner(QWidget *parent) : QWidget(parent) {
}
QProgressBar::chunk {
border-radius: 10px;
background-color: rgba(23, 134, 68, 255);
background-color: rgba(179, 0, 0, 255);
}
)");