wip
This commit is contained in:
@@ -185,10 +185,6 @@ class CarController(CarControllerBase):
|
|||||||
# hax
|
# hax
|
||||||
params_memory = Params("/dev/shm/params")
|
params_memory = Params("/dev/shm/params")
|
||||||
|
|
||||||
if params_memory.get_bool("CPTLkasButtonAction"):
|
|
||||||
params_memory.put_bool("CPTLkasButtonAction", False)
|
|
||||||
CC.cruiseControl.cancel = True
|
|
||||||
print("Debug cancel executed")
|
|
||||||
|
|
||||||
can_sends = []
|
can_sends = []
|
||||||
if use_clu11:
|
if use_clu11:
|
||||||
@@ -205,11 +201,16 @@ class CarController(CarControllerBase):
|
|||||||
self.last_button_frame = self.frame
|
self.last_button_frame = self.frame
|
||||||
else:
|
else:
|
||||||
if (self.frame - self.last_button_frame) * DT_CTRL > 0.25:
|
if (self.frame - self.last_button_frame) * DT_CTRL > 0.25:
|
||||||
|
if params_memory.get_bool("CPTLkasButtonAction"):
|
||||||
|
params_memory.put_bool("CPTLkasButtonAction", False)
|
||||||
|
CC.cruiseControl.cancel = True
|
||||||
|
print("Debug cancel executed")
|
||||||
# cruise cancel
|
# cruise cancel
|
||||||
if CC.cruiseControl.cancel:
|
if CC.cruiseControl.cancel:
|
||||||
if self.CP.flags & HyundaiFlags.CANFD_ALT_BUTTONS:
|
if self.CP.flags & HyundaiFlags.CANFD_ALT_BUTTONS:
|
||||||
# pass
|
# pass
|
||||||
can_sends.append(hyundaicanfd.create_buttons_alt(self.packer, self.CP, self.CAN, CS.buttons_counter+1, Buttons.CANCEL))
|
can_sends.append(hyundaicanfd.create_buttons_alt(self.packer, self.CP, self.CAN, CS.buttons_counter+1, Buttons.CANCEL))
|
||||||
|
print("Yes2")
|
||||||
self.last_button_frame = self.frame
|
self.last_button_frame = self.frame
|
||||||
CS.lkas_trigger_result = 1
|
CS.lkas_trigger_result = 1
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -117,11 +117,13 @@ void update_model(UIState *s,
|
|||||||
// update path
|
// update path
|
||||||
float path;
|
float path;
|
||||||
if (paramsMemory.getInt("no_lat_lane_change")) {
|
if (paramsMemory.getInt("no_lat_lane_change")) {
|
||||||
path = LANE_CHANGE_NO_LAT_PATH_WIDTH / 20; // Release: better calc for EU users
|
path = (float)LANE_CHANGE_NO_LAT_PATH_WIDTH / 20; // Release: better calc for EU users
|
||||||
} else {
|
} else {
|
||||||
path = CENTER_LANE_WIDTH / 20; // Release: better calc for EU users
|
path = (float)CENTER_LANE_WIDTH / 20; // Release: better calc for EU users
|
||||||
}
|
}
|
||||||
|
|
||||||
|
path = scene.path_width;
|
||||||
|
|
||||||
auto lead_count = model.getLeadsV3().size();
|
auto lead_count = model.getLeadsV3().size();
|
||||||
if (lead_count > 0) {
|
if (lead_count > 0) {
|
||||||
auto lead_one = model.getLeadsV3()[0];
|
auto lead_one = model.getLeadsV3()[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user