From 4e82f68de2641e628f0df1aa82e5a5e935c8cce6 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 14 Oct 2022 22:21:53 -0700 Subject: [PATCH 1/4] GM camera ACC: prevent fault when engaging at a stop (#26079) * prevent bolt fault * comment * only for camera ACC * fixup alert * bump cereal to master * use new name * Update selfdrive/car/gm/interface.py * Update selfdrive/car/gm/interface.py * Update selfdrive/car/gm/interface.py * only care about prevent engagement when we look at PCM --- cereal | 2 +- selfdrive/car/gm/interface.py | 8 +++++++- selfdrive/controls/lib/events.py | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/cereal b/cereal index 3eca747334..5766e645f2 160000 --- a/cereal +++ b/cereal @@ -1 +1 @@ -Subproject commit 3eca747334ca2138bf35d70399d58d0706a3cbd2 +Subproject commit 5766e645f2ee2a131b145fb1ea9e3b7c55a4a740 diff --git a/selfdrive/car/gm/interface.py b/selfdrive/car/gm/interface.py index 22ea83759a..248828e757 100755 --- a/selfdrive/car/gm/interface.py +++ b/selfdrive/car/gm/interface.py @@ -212,7 +212,13 @@ class CarInterface(CarInterfaceBase): if ret.cruiseState.standstill: events.add(EventName.resumeRequired) if ret.vEgo < self.CP.minSteerSpeed: - events.add(car.CarEvent.EventName.belowSteerSpeed) + events.add(EventName.belowSteerSpeed) + + if self.CP.networkLocation == NetworkLocation.fwdCamera and self.CP.pcmCruise: + # The ECM has a higher brake pressed threshold than the camera, causing an + # ACC fault when you engage at a stop with your foot partially on the brake + if ret.vEgoRaw < 0.1 and ret.brake < 20: + events.add(EventName.gmAccFaultedTemp) ret.events = events.to_msg() diff --git a/selfdrive/controls/lib/events.py b/selfdrive/controls/lib/events.py index 91f1748ecb..5bfe89b31c 100644 --- a/selfdrive/controls/lib/events.py +++ b/selfdrive/controls/lib/events.py @@ -811,6 +811,10 @@ EVENTS: Dict[int, Dict[str, Union[Alert, AlertCallbackType]]] = { ET.NO_ENTRY: NoEntryAlert("Cruise Faulted"), }, + EventName.gmAccFaultedTemp: { + ET.NO_ENTRY: NoEntryAlert("Cruise Temporarily Faulted"), + }, + EventName.controlsMismatch: { ET.IMMEDIATE_DISABLE: ImmediateDisableAlert("Controls Mismatch"), ET.NO_ENTRY: NoEntryAlert("Controls Mismatch"), From deac907cb44230f641fde5ca1ba22d7c5e236d90 Mon Sep 17 00:00:00 2001 From: Dean Lee Date: Sun, 16 Oct 2022 02:36:09 +0800 Subject: [PATCH 2/4] Cabana: right click on the chart to reset zoom (#26088) --- tools/cabana/chartswidget.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/cabana/chartswidget.cc b/tools/cabana/chartswidget.cc index e704dea95a..5dafd8ec37 100644 --- a/tools/cabana/chartswidget.cc +++ b/tools/cabana/chartswidget.cc @@ -305,8 +305,14 @@ void ChartView::mouseReleaseEvent(QMouseEvent *event) { event->accept(); return; } + } else if (event->button() == Qt::RightButton) { + // reset zoom + if (can->isZoomed()) { + can->resetRange(); + event->accept(); + return; + } } - // TODO: right-click to reset zoom QChartView::mouseReleaseEvent(event); line_marker->setVisible(true); } From df6c135cfaabe830d2447800d49daac445660c64 Mon Sep 17 00:00:00 2001 From: AlexandreSato <66435071+AlexandreSato@users.noreply.github.com> Date: Sat, 15 Oct 2022 16:15:47 -0300 Subject: [PATCH 3/4] Multilang: Update pt-BR translation. (#26089) * update pt-BR translations * fix some cutoff texts * update pt-BR translations --- selfdrive/ui/translations/main_pt-BR.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/selfdrive/ui/translations/main_pt-BR.ts b/selfdrive/ui/translations/main_pt-BR.ts index 6a772a1f69..8f59bf4715 100644 --- a/selfdrive/ui/translations/main_pt-BR.ts +++ b/selfdrive/ui/translations/main_pt-BR.ts @@ -60,11 +60,11 @@ Cellular Metered - + Plano de Dados Limitado Prevent large data uploads when on a metered connection - + Evite grandes uploads de dados quando estiver em uma conexão limitada @@ -476,7 +476,7 @@ trabalho definido PRIME FEATURES: - APRIMORAMENTOS PRIME: + BENEFÍCIOS PRIME: Remote access From 553068f8c3afd9fd2c3a3a412dd20a8e03c6c58f Mon Sep 17 00:00:00 2001 From: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com> Date: Sat, 15 Oct 2022 15:27:34 -0400 Subject: [PATCH 4/4] Hyundai: CAN-FD Hybrid gas pressed signal (#26086) * Hyundai: Gate 0x105 behind hybrid CAN-FD only * Update values.py * bump panda Co-authored-by: Adeeb Shihadeh --- panda | 2 +- selfdrive/car/hyundai/carstate.py | 4 ++-- selfdrive/car/hyundai/values.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/panda b/panda index 5962bcd08a..62868c36a8 160000 --- a/panda +++ b/panda @@ -1 +1 @@ -Subproject commit 5962bcd08ae4e7c5193535efb45cc9c39da52f54 +Subproject commit 62868c36a80d1f44064da7b47423f0ef331f64e9 diff --git a/selfdrive/car/hyundai/carstate.py b/selfdrive/car/hyundai/carstate.py index 948634e974..5da1dd72c8 100644 --- a/selfdrive/car/hyundai/carstate.py +++ b/selfdrive/car/hyundai/carstate.py @@ -156,7 +156,7 @@ class CarState(CarStateBase): if self.CP.carFingerprint in EV_CAR: ret.gas = cp.vl["ACCELERATOR"]["ACCELERATOR_PEDAL"] / 255. - else: + elif self.CP.carFingerprint in HYBRID_CAR: ret.gas = cp.vl["ACCELERATOR_ALT"]["ACCELERATOR_PEDAL"] / 1023. ret.gasPressed = ret.gas > 1e-5 ret.brakePressed = cp.vl["BRAKE"]["BRAKE_PRESSED"] == 1 @@ -466,7 +466,7 @@ class CarState(CarStateBase): checks += [ ("ACCELERATOR", 100), ] - else: + elif CP.carFingerprint in HYBRID_CAR: signals += [ ("ACCELERATOR_PEDAL", "ACCELERATOR_ALT"), ] diff --git a/selfdrive/car/hyundai/values.py b/selfdrive/car/hyundai/values.py index 77759f1fa7..734e56c033 100644 --- a/selfdrive/car/hyundai/values.py +++ b/selfdrive/car/hyundai/values.py @@ -1397,7 +1397,7 @@ CANFD_CAR = {CAR.KIA_EV6, CAR.IONIQ_5, CAR.TUCSON_HYBRID_4TH_GEN} # The camera does SCC on these cars, rather than the radar CAMERA_SCC_CAR = {CAR.KONA_EV_2022, } -HYBRID_CAR = {CAR.IONIQ_PHEV, CAR.ELANTRA_HEV_2021, CAR.KIA_NIRO_PHEV, CAR.KIA_NIRO_HEV_2021, CAR.SONATA_HYBRID, CAR.KONA_HEV, CAR.IONIQ, CAR.IONIQ_HEV_2022, CAR.SANTA_FE_HEV_2022, CAR.SANTA_FE_PHEV_2022, CAR.IONIQ_PHEV_2019} # these cars use a different gas signal +HYBRID_CAR = {CAR.IONIQ_PHEV, CAR.ELANTRA_HEV_2021, CAR.KIA_NIRO_PHEV, CAR.KIA_NIRO_HEV_2021, CAR.SONATA_HYBRID, CAR.KONA_HEV, CAR.IONIQ, CAR.IONIQ_HEV_2022, CAR.SANTA_FE_HEV_2022, CAR.SANTA_FE_PHEV_2022, CAR.IONIQ_PHEV_2019, CAR.TUCSON_HYBRID_4TH_GEN} # these cars use a different gas signal EV_CAR = {CAR.IONIQ_EV_2020, CAR.IONIQ_EV_LTD, CAR.KONA_EV, CAR.KIA_NIRO_EV, CAR.KONA_EV_2022, CAR.KIA_EV6, CAR.IONIQ_5} # these cars require a special panda safety mode due to missing counters and checksums in the messages