diff --git a/common/libcommon.a b/common/libcommon.a index 8a09a1428..59f0db63b 100644 Binary files a/common/libcommon.a and b/common/libcommon.a differ diff --git a/common/params_keys.h b/common/params_keys.h index 7760bdb59..e205428fd 100644 --- a/common/params_keys.h +++ b/common/params_keys.h @@ -390,6 +390,7 @@ inline static std::unordered_map keys = { {"OneLaneChange", {PERSISTENT, BOOL, "1", "0", 2}}, {"OnroadDistanceButton", {PERSISTENT, BOOL, "0", "0", 0}}, {"OnroadDistanceButtonPressed", {CLEAR_ON_MANAGER_START, BOOL, "0", "0"}}, + {"WheelButtonBookmarkCounter", {CLEAR_ON_MANAGER_START, INT, "0", "0"}}, {"openpilotMinutes", {PERSISTENT, INT, "0", "0", 0}}, {"OverpassRequests", {PERSISTENT, JSON, "{}", "{}"}}, {"PathColor", {PERSISTENT, STRING, "", "", 2}}, diff --git a/common/params_pyx.so b/common/params_pyx.so index 1e0c51674..787b84121 100755 Binary files a/common/params_pyx.so and b/common/params_pyx.so differ diff --git a/opendbc_repo/opendbc/car/gm/carstate.py b/opendbc_repo/opendbc/car/gm/carstate.py index 48cadd7f8..40a08d32a 100644 --- a/opendbc_repo/opendbc/car/gm/carstate.py +++ b/opendbc_repo/opendbc/car/gm/carstate.py @@ -395,14 +395,15 @@ class CarState(CarStateBase): if CP.enableBsm: pt_messages.append(("BCMBlindSpotMonitor", 10)) + if CP.flags & GMFlags.NO_ACCELERATOR_POS_MSG.value: + if ("ECMAcceleratorPos", 80) in pt_messages: + pt_messages.remove(("ECMAcceleratorPos", 80)) + pt_messages.append(("EBCMBrakePedalPosition", 100)) + if CP.networkLocation == NetworkLocation.fwdCamera: pt_messages += [ ("ASCMLKASteeringCmd", 0), ] - if CP.flags & GMFlags.NO_ACCELERATOR_POS_MSG.value: - if ("ECMAcceleratorPos", 80) in pt_messages: - pt_messages.remove(("ECMAcceleratorPos", 80)) - pt_messages.append(("EBCMBrakePedalPosition", 100)) if CP.transmissionType == TransmissionType.direct: regen_paddle_rate = 50 if CP.carFingerprint in kaofui_state_cars else 40 diff --git a/opendbc_repo/opendbc/car/gm/tests/test_gm.py b/opendbc_repo/opendbc/car/gm/tests/test_gm.py index 145379d68..a3ef1dede 100644 --- a/opendbc_repo/opendbc/car/gm/tests/test_gm.py +++ b/opendbc_repo/opendbc/car/gm/tests/test_gm.py @@ -94,6 +94,20 @@ class TestGMInterface: assert car_params.flags & GMFlags.NO_CAMERA.value assert car_params.safetyConfigs[0].safetyParam & GMSafetyFlags.FLAG_GM_NO_CAMERA.value + def test_volt_gateway_without_accel_pos_uses_brake_pedal_message(self): + CarInterface = interfaces[CAR.CHEVROLET_VOLT] + fingerprint = _empty_fingerprint() + fingerprint[0][0xF1] = 6 + + car_params = CarInterface.get_params(CAR.CHEVROLET_VOLT, fingerprint, [], alpha_long=False, is_release=False, docs=False, + starpilot_toggles=_test_starpilot_toggles()) + + assert car_params.flags & GMFlags.NO_ACCELERATOR_POS_MSG.value + + pt_parser = CarInterface.CarState.get_can_parsers(car_params)[Bus.pt] + assert "ECMAcceleratorPos" not in pt_parser.vl + assert "EBCMBrakePedalPosition" in pt_parser.vl + class TestGMCarController: def test_dash_speed_spoof_respects_live_stock_acc_toggles(self): diff --git a/panda/board/obj/body_h7.bin.signed b/panda/board/obj/body_h7.bin.signed index 96f1c549c..1c5c10eb8 100644 Binary files a/panda/board/obj/body_h7.bin.signed and b/panda/board/obj/body_h7.bin.signed differ diff --git a/panda/board/obj/body_h7/bootstub.elf b/panda/board/obj/body_h7/bootstub.elf index c22055f05..ba6b31e94 100755 Binary files a/panda/board/obj/body_h7/bootstub.elf and b/panda/board/obj/body_h7/bootstub.elf differ diff --git a/panda/board/obj/body_h7/main.bin b/panda/board/obj/body_h7/main.bin index 7c8e22982..35f221982 100755 Binary files a/panda/board/obj/body_h7/main.bin and b/panda/board/obj/body_h7/main.bin differ diff --git a/panda/board/obj/body_h7/main.elf b/panda/board/obj/body_h7/main.elf index d788cead6..506dbf11b 100755 Binary files a/panda/board/obj/body_h7/main.elf and b/panda/board/obj/body_h7/main.elf differ diff --git a/panda/board/obj/bootstub.body_h7.bin b/panda/board/obj/bootstub.body_h7.bin index a60394de2..26c00322e 100755 Binary files a/panda/board/obj/bootstub.body_h7.bin and b/panda/board/obj/bootstub.body_h7.bin differ diff --git a/panda/board/obj/bootstub.panda.bin b/panda/board/obj/bootstub.panda.bin index 5b2cde2b7..b9d896cbe 100755 Binary files a/panda/board/obj/bootstub.panda.bin and b/panda/board/obj/bootstub.panda.bin differ diff --git a/panda/board/obj/bootstub.panda_h7.bin b/panda/board/obj/bootstub.panda_h7.bin index 3423b4208..7009e35a2 100755 Binary files a/panda/board/obj/bootstub.panda_h7.bin and b/panda/board/obj/bootstub.panda_h7.bin differ diff --git a/panda/board/obj/bootstub.panda_h7_remote.bin b/panda/board/obj/bootstub.panda_h7_remote.bin index 3423b4208..7009e35a2 100755 Binary files a/panda/board/obj/bootstub.panda_h7_remote.bin and b/panda/board/obj/bootstub.panda_h7_remote.bin differ diff --git a/panda/board/obj/bootstub.panda_jungle_h7.bin b/panda/board/obj/bootstub.panda_jungle_h7.bin index 8c7d5d0a8..9fe110b60 100755 Binary files a/panda/board/obj/bootstub.panda_jungle_h7.bin and b/panda/board/obj/bootstub.panda_jungle_h7.bin differ diff --git a/panda/board/obj/bootstub.panda_remote.bin b/panda/board/obj/bootstub.panda_remote.bin index 5b2cde2b7..b9d896cbe 100755 Binary files a/panda/board/obj/bootstub.panda_remote.bin and b/panda/board/obj/bootstub.panda_remote.bin differ diff --git a/panda/board/obj/gitversion.h b/panda/board/obj/gitversion.h index 9055cf381..08cab8814 100644 --- a/panda/board/obj/gitversion.h +++ b/panda/board/obj/gitversion.h @@ -1,2 +1,2 @@ extern const uint8_t gitversion[19]; -const uint8_t gitversion[19] = "DEV-1c85fed7-DEBUG"; +const uint8_t gitversion[19] = "DEV-41023b71-DEBUG"; diff --git a/panda/board/obj/panda.bin.signed b/panda/board/obj/panda.bin.signed index 5f7813bd6..95948fec1 100644 Binary files a/panda/board/obj/panda.bin.signed and b/panda/board/obj/panda.bin.signed differ diff --git a/panda/board/obj/panda/bootstub.elf b/panda/board/obj/panda/bootstub.elf index 6eb588a61..5a810a05f 100755 Binary files a/panda/board/obj/panda/bootstub.elf and b/panda/board/obj/panda/bootstub.elf differ diff --git a/panda/board/obj/panda/main.bin b/panda/board/obj/panda/main.bin index ee3f35d97..a6e0014f3 100755 Binary files a/panda/board/obj/panda/main.bin and b/panda/board/obj/panda/main.bin differ diff --git a/panda/board/obj/panda/main.elf b/panda/board/obj/panda/main.elf index 812c818a7..600e57f43 100755 Binary files a/panda/board/obj/panda/main.elf and b/panda/board/obj/panda/main.elf differ diff --git a/panda/board/obj/panda_h7.bin.signed b/panda/board/obj/panda_h7.bin.signed index e6bcaef96..5ab03bb96 100644 Binary files a/panda/board/obj/panda_h7.bin.signed and b/panda/board/obj/panda_h7.bin.signed differ diff --git a/panda/board/obj/panda_h7/bootstub.elf b/panda/board/obj/panda_h7/bootstub.elf index 606569f87..4dc8b1737 100755 Binary files a/panda/board/obj/panda_h7/bootstub.elf and b/panda/board/obj/panda_h7/bootstub.elf differ diff --git a/panda/board/obj/panda_h7/main.bin b/panda/board/obj/panda_h7/main.bin index d0be5f5da..e4553cd23 100755 Binary files a/panda/board/obj/panda_h7/main.bin and b/panda/board/obj/panda_h7/main.bin differ diff --git a/panda/board/obj/panda_h7/main.elf b/panda/board/obj/panda_h7/main.elf index dcc8b75d5..8a544256c 100755 Binary files a/panda/board/obj/panda_h7/main.elf and b/panda/board/obj/panda_h7/main.elf differ diff --git a/panda/board/obj/panda_h7_remote.bin.signed b/panda/board/obj/panda_h7_remote.bin.signed index 9e54fb66d..6d941118f 100644 Binary files a/panda/board/obj/panda_h7_remote.bin.signed and b/panda/board/obj/panda_h7_remote.bin.signed differ diff --git a/panda/board/obj/panda_h7_remote/bootstub.elf b/panda/board/obj/panda_h7_remote/bootstub.elf index b81dc82c3..b85e8cb1d 100755 Binary files a/panda/board/obj/panda_h7_remote/bootstub.elf and b/panda/board/obj/panda_h7_remote/bootstub.elf differ diff --git a/panda/board/obj/panda_h7_remote/main.bin b/panda/board/obj/panda_h7_remote/main.bin index a7b7a8539..1099708b2 100755 Binary files a/panda/board/obj/panda_h7_remote/main.bin and b/panda/board/obj/panda_h7_remote/main.bin differ diff --git a/panda/board/obj/panda_h7_remote/main.elf b/panda/board/obj/panda_h7_remote/main.elf index 9bffe57a2..6c4c0466a 100755 Binary files a/panda/board/obj/panda_h7_remote/main.elf and b/panda/board/obj/panda_h7_remote/main.elf differ diff --git a/panda/board/obj/panda_jungle_h7.bin.signed b/panda/board/obj/panda_jungle_h7.bin.signed index c63426faf..757afbc41 100644 Binary files a/panda/board/obj/panda_jungle_h7.bin.signed and b/panda/board/obj/panda_jungle_h7.bin.signed differ diff --git a/panda/board/obj/panda_jungle_h7/bootstub.elf b/panda/board/obj/panda_jungle_h7/bootstub.elf index e4b7bdd60..47f6bcb76 100755 Binary files a/panda/board/obj/panda_jungle_h7/bootstub.elf and b/panda/board/obj/panda_jungle_h7/bootstub.elf differ diff --git a/panda/board/obj/panda_jungle_h7/main.bin b/panda/board/obj/panda_jungle_h7/main.bin index 670a7ae8d..56d9f8b3f 100755 Binary files a/panda/board/obj/panda_jungle_h7/main.bin and b/panda/board/obj/panda_jungle_h7/main.bin differ diff --git a/panda/board/obj/panda_jungle_h7/main.elf b/panda/board/obj/panda_jungle_h7/main.elf index 9f13a2678..0d031b919 100755 Binary files a/panda/board/obj/panda_jungle_h7/main.elf and b/panda/board/obj/panda_jungle_h7/main.elf differ diff --git a/panda/board/obj/panda_remote.bin.signed b/panda/board/obj/panda_remote.bin.signed index 7857e5480..a4d382252 100644 Binary files a/panda/board/obj/panda_remote.bin.signed and b/panda/board/obj/panda_remote.bin.signed differ diff --git a/panda/board/obj/panda_remote/bootstub.elf b/panda/board/obj/panda_remote/bootstub.elf index f7d58a8b3..edb327796 100755 Binary files a/panda/board/obj/panda_remote/bootstub.elf and b/panda/board/obj/panda_remote/bootstub.elf differ diff --git a/panda/board/obj/panda_remote/main.bin b/panda/board/obj/panda_remote/main.bin index 8526d42bb..37f117b79 100755 Binary files a/panda/board/obj/panda_remote/main.bin and b/panda/board/obj/panda_remote/main.bin differ diff --git a/panda/board/obj/panda_remote/main.elf b/panda/board/obj/panda_remote/main.elf index 50074fced..036595288 100755 Binary files a/panda/board/obj/panda_remote/main.elf and b/panda/board/obj/panda_remote/main.elf differ diff --git a/panda/board/obj/version b/panda/board/obj/version index 9647f521d..898aab934 100644 --- a/panda/board/obj/version +++ b/panda/board/obj/version @@ -1 +1 @@ -DEV-1c85fed7-DEBUG \ No newline at end of file +DEV-41023b71-DEBUG \ No newline at end of file diff --git a/selfdrive/pandad/pandad b/selfdrive/pandad/pandad index 33f78312a..058e1b484 100755 Binary files a/selfdrive/pandad/pandad and b/selfdrive/pandad/pandad differ diff --git a/selfdrive/ui/feedback/feedbackd.py b/selfdrive/ui/feedback/feedbackd.py index 2d131a0d5..b56896ff0 100755 --- a/selfdrive/ui/feedback/feedbackd.py +++ b/selfdrive/ui/feedback/feedbackd.py @@ -11,16 +11,18 @@ ButtonType = car.CarState.ButtonEvent.Type def main(): params = Params() + params_memory = Params(memory=True) pm = messaging.PubMaster(['userBookmark', 'audioFeedback']) sm = messaging.SubMaster(['rawAudioData', 'bookmarkButton', 'carState']) should_record_audio = False block_num = 0 waiting_for_release = False early_stop_triggered = False + last_wheel_bookmark_counter = params_memory.get_int("WheelButtonBookmarkCounter") while True: sm.update() - should_send_bookmark = False + bookmark_requests = 0 # TODO: https://github.com/commaai/openpilot/issues/36015 if False and sm.updated['carState'] and sm['carState'].canValid: @@ -35,7 +37,7 @@ def main(): early_stop_triggered = False cloudlog.info("LKAS button pressed - starting 10-second audio feedback") else: - should_send_bookmark = True # immediately send bookmark if toggle false + bookmark_requests += 1 # immediately send bookmark if toggle false cloudlog.info("LKAS button pressed - bookmarking") elif should_record_audio and not waiting_for_release: # Wait for release of second press to stop recording early waiting_for_release = True @@ -52,7 +54,7 @@ def main(): msg.audioFeedback.blockNum = block_num block_num += 1 if (block_num * SAMPLE_BUFFER / SAMPLE_RATE) >= FEEDBACK_MAX_DURATION or early_stop_triggered: # Check for timeout or early stop - should_send_bookmark = True # send bookmark at end of audio segment + bookmark_requests += 1 # send bookmark at end of audio segment should_record_audio = False early_stop_triggered = False cloudlog.info("10-second recording completed or second button press - stopping audio feedback") @@ -60,9 +62,15 @@ def main(): if sm.updated['bookmarkButton']: cloudlog.info("Bookmark button pressed!") - should_send_bookmark = True + bookmark_requests += 1 - if should_send_bookmark: + wheel_bookmark_counter = params_memory.get_int("WheelButtonBookmarkCounter") + if wheel_bookmark_counter > last_wheel_bookmark_counter: + bookmark_requests += wheel_bookmark_counter - last_wheel_bookmark_counter + last_wheel_bookmark_counter = wheel_bookmark_counter + cloudlog.info("Wheel button bookmark requested!") + + for _ in range(bookmark_requests): msg = messaging.new_message('userBookmark', valid=True) pm.send('userBookmark', msg) diff --git a/selfdrive/ui/ui b/selfdrive/ui/ui index 11e54fa0b..d2ab86172 100755 Binary files a/selfdrive/ui/ui and b/selfdrive/ui/ui differ diff --git a/starpilot/controls/starpilot_card.py b/starpilot/controls/starpilot_card.py index 8c89f5a28..73c795334 100644 --- a/starpilot/controls/starpilot_card.py +++ b/starpilot/controls/starpilot_card.py @@ -1,6 +1,4 @@ #!/usr/bin/env python3 -import cereal.messaging as messaging - from opendbc.safety import ALTERNATIVE_EXPERIENCE from openpilot.common.params import Params from openpilot.selfdrive.car.cruise import CRUISE_LONG_PRESS, ButtonType @@ -20,7 +18,6 @@ class StarPilotCard: self.params = Params(return_defaults=True) self.params_memory = Params(memory=True) - self.pm = messaging.PubMaster(["userBookmark"]) self.accel_pressed = False self.always_on_lateral_allowed = False @@ -66,8 +63,8 @@ class StarPilotCard: self.traffic_mode_enabled = not self.traffic_mode_enabled def handle_bookmark(self): - msg = messaging.new_message("userBookmark", valid=True) - self.pm.send("userBookmark", msg) + counter = self.params_memory.get_int("WheelButtonBookmarkCounter") + self.params_memory.put_int("WheelButtonBookmarkCounter", counter + 1) def handle_experimental_mode(self, sm, starpilot_toggles): if getattr(starpilot_toggles, "safe_mode", False): diff --git a/system/camerad/camerad b/system/camerad/camerad index 360e59257..0a945bbed 100755 Binary files a/system/camerad/camerad and b/system/camerad/camerad differ diff --git a/system/loggerd/bootlog b/system/loggerd/bootlog index 2411cf32d..43e97e31d 100755 Binary files a/system/loggerd/bootlog and b/system/loggerd/bootlog differ diff --git a/system/loggerd/encoderd b/system/loggerd/encoderd index 82bd729da..50ca2dad0 100755 Binary files a/system/loggerd/encoderd and b/system/loggerd/encoderd differ diff --git a/system/loggerd/loggerd b/system/loggerd/loggerd index a1aa8dd92..c98f1c63d 100755 Binary files a/system/loggerd/loggerd and b/system/loggerd/loggerd differ