From b770745342dc52fe30434763532e4c73887c71ca Mon Sep 17 00:00:00 2001 From: Maxime Desroches Date: Thu, 21 Nov 2024 11:48:02 -0800 Subject: [PATCH 1/5] ci: split MISRA linter and MISRA mutation (#2086) * sep * this --- .github/workflows/test.yaml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 367cf2dc..52c2a061 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -88,8 +88,8 @@ jobs: scons -j$(nproc) ${{ matrix.flags }} && \ tests/safety/test.sh" - misra: - name: MISRA C:2012 + misra_linter: + name: MISRA C:2012 Linter runs-on: ubuntu-latest timeout-minutes: 20 steps: @@ -101,6 +101,17 @@ jobs: - name: Run MISRA C:2012 analysis timeout-minutes: 2 run: ${{ env.RUN }} "cd tests/misra && ./test_misra.sh" + + misra_mutation: + name: MISRA C:2012 Mutation + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - uses: actions/checkout@v2 + - name: Build Docker image + run: eval "$BUILD" + - name: Build FW + run: ${{ env.RUN }} "scons -j$(nproc)" - name: MISRA mutation tests timeout-minutes: 5 run: ${{ env.RUN }} "cd tests/misra && pytest -n8 test_mutation.py" From cfbc3ff835d711c5afc733c964b5283ff5a998c6 Mon Sep 17 00:00:00 2001 From: Willem Melching Date: Fri, 22 Nov 2024 10:29:11 -0800 Subject: [PATCH 2/5] Ensure auto switching FD is off in Python (#2087) --- python/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/__init__.py b/python/__init__.py index d6d3ebc5..88ccf897 100644 --- a/python/__init__.py +++ b/python/__init__.py @@ -324,6 +324,10 @@ class Panda: # reset comms self.can_reset_communications() + # disable automatic CAN-FD switching + for bus in range(PANDA_BUS_CNT): + self.set_canfd_auto(bus, False) + # set CAN speed for bus in range(PANDA_BUS_CNT): self.set_can_speed_kbps(bus, self._can_speed_kbps) From 5761ab58ea36beba2ddf07709590b591e04312bd Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Fri, 22 Nov 2024 19:33:04 -0800 Subject: [PATCH 3/5] what was that doing there? --- board/recover.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/board/recover.py b/board/recover.py index c149e948..6268a07d 100755 --- a/board/recover.py +++ b/board/recover.py @@ -2,21 +2,15 @@ import os import time import subprocess -import argparse from panda import Panda, PandaDFU board_path = os.path.dirname(os.path.realpath(__file__)) if __name__ == "__main__": - parser = argparse.ArgumentParser() - parser.add_argument("--all", action="store_true", help="Recover all Panda devices") - args = parser.parse_args() - subprocess.check_call(f"scons -C {board_path}/.. -j$(nproc) {board_path}", shell=True) - serials = Panda.list() if args.all else [None] - for s in serials: + for s in Panda.list(): with Panda(serial=s) as p: print(f"putting {p.get_usb_serial()} in DFU mode") p.reset(enter_bootstub=True) From 4dc203376afbd20914373ec721610d20a851add5 Mon Sep 17 00:00:00 2001 From: Robbe Derks Date: Fri, 29 Nov 2024 17:37:33 +0100 Subject: [PATCH 4/5] more open drains (#2091) also open drain Co-authored-by: Comma Device --- board/boards/cuatro.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/board/boards/cuatro.h b/board/boards/cuatro.h index 4a6b5da0..3d87318b 100644 --- a/board/boards/cuatro.h +++ b/board/boards/cuatro.h @@ -87,6 +87,10 @@ static void cuatro_init(void) { set_gpio_output_type(GPIOB, 2, OUTPUT_TYPE_OPEN_DRAIN); set_gpio_output_type(GPIOD, 15, OUTPUT_TYPE_OPEN_DRAIN); + // more open drain + set_gpio_output_type(GPIOD, 3, OUTPUT_TYPE_OPEN_DRAIN); // FAN_EN + set_gpio_output_type(GPIOC, 12, OUTPUT_TYPE_OPEN_DRAIN); // VBAT_EN + // Power readout set_gpio_mode(GPIOC, 5, MODE_ANALOG); set_gpio_mode(GPIOA, 6, MODE_ANALOG); From c7cc2deaf046403899b5bcc964b9f48bfd508534 Mon Sep 17 00:00:00 2001 From: Robbe Derks Date: Fri, 29 Nov 2024 17:41:03 +0100 Subject: [PATCH 5/5] Cuatro: no ir (#2093) no ir --- board/boards/cuatro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/boards/cuatro.h b/board/boards/cuatro.h index 3d87318b..90d06275 100644 --- a/board/boards/cuatro.h +++ b/board/boards/cuatro.h @@ -169,7 +169,7 @@ board board_cuatro = { .read_voltage_mV = cuatro_read_voltage_mV, .read_current_mA = cuatro_read_current_mA, .set_fan_enabled = cuatro_set_fan_enabled, - .set_ir_power = tres_set_ir_power, + .set_ir_power = unused_set_ir_power, .set_siren = cuatro_set_siren, .set_bootkick = cuatro_set_bootkick, .read_som_gpio = tres_read_som_gpio,