Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GM: same regen check as openpilot #1026

Merged
merged 40 commits into from
Sep 13, 2022
Merged

GM: same regen check as openpilot #1026

merged 40 commits into from
Sep 13, 2022

Conversation

sshane
Copy link
Contributor

@sshane sshane commented Aug 12, 2022

Needed for Bolt PR

  • Checks entire EBCMRegenPaddle->RegenPaddle signal like openpilot, not just one bit
  • Create common regen_braking so we don't have to set controls_allowed manually

board/safety/safety_gm.h Outdated Show resolved Hide resolved
@sshane sshane marked this pull request as ready for review August 12, 2022 00:29
@sshane
Copy link
Contributor Author

sshane commented Aug 12, 2022

Hmm, there can still be a mismatch as we're using two different messages with two different rates.

Here's a falling edge with CS.brakePressed on the left and panda on the right. We likely get a regen message with no regen braking, but we haven't gotten a normal brake message to update brake_pressed yet:

True True
True True
True True
True True
True True
True True
False True
False False
False False
False False
False False

@sshane
Copy link
Contributor Author

sshane commented Aug 12, 2022

Look good now @adeebshihadeh? We now allow regen braking at a standstill as we do in openpilot (could be very rare controls mismatch)

Copy link
Contributor

@adeebshihadeh adeebshihadeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but let's write tests before merging.

tests/safety/common.py Outdated Show resolved Hide resolved
Comment on lines 97 to 99
def test_prev_brake(self, test="brake"):
super().test_prev_brake(test="brake")
super().test_prev_brake(test="regen")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these tests should be common

Copy link
Contributor Author

@sshane sshane Aug 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@adeebshihadeh What do you want _user_regen_msg to return for the other cars? These test that a CAN message affects the state of get_regen_braking_prev AND the behavior. So we can't test anything on Toyota for example

Copy link
Contributor Author

@sshane sshane Aug 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved it to common and made it detect the definition of the regen message, as there's nothing to test if the safety model does not use it

tests/safety/common.py Outdated Show resolved Hide resolved
tests/safety/common.py Outdated Show resolved Hide resolved
@sshane sshane merged commit 788e0b5 into master Sep 13, 2022
@sshane sshane deleted the fix-gm-regen branch September 13, 2022 04:32
budney added a commit to budney/panda that referenced this pull request Jan 7, 2023
commit 345147f
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Dec 15 15:50:15 2022 -0800

    tests: clean up abstract methods (commaai#1196)

    * don't need to redefine _torque_cmd_msg in abstract subclasses

    * fix

    * pylint has a bug?

    * test pylint

    * clean up

commit eed75e7
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Dec 15 15:30:21 2022 -0800

    Bump opendbc ref and update pylint (commaai#1197)

    * Update opendbc ref

    * fix linting

    * fix linting

    * bump opendbc ref and pylint to fix import error bug

    * ignore unspecified-encoding (openpilot does this)

    * this will fail until openpilot is bumped

    * bump openpilot

    * wait... this works now?!

    * bump opendbc to master

commit 6ba9afc
Author: Robbe Derks <robbe.derks@gmail.com>
Date:   Wed Dec 14 16:12:09 2022 +0100

    H7 clock source (commaai#1194)

    it's literally the same everything

    Co-authored-by: Comma Device <device@comma.ai>

commit 1d732d4
Author: Robbe Derks <robbe.derks@gmail.com>
Date:   Wed Dec 14 15:30:04 2022 +0100

    F4: Cleanup clock src, second try (commaai#1193)

    * F4: cleanup clock source

    * little more

    * void

    * restore the timer setup

    Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
    Co-authored-by: Comma Device <device@comma.ai>

commit d1d1f8a
Author: Robbe Derks <robbe.derks@gmail.com>
Date:   Wed Dec 14 11:25:54 2022 +0100

    Fake siren (commaai#1192)

    * DAC POC

    * change freq

    * some cleanup

    * wip: cleaning up and trying to use DMA

    * no clue why this doesn't work

    * this works

    * wip multi-master i2c for fake siren

    * cleanup and some more i2c stuff

    * seems more stable

    * retry disabling and cleanup force siren

    * fix misra violations

    * not needed

    * messed up rebase

    Co-authored-by: Comma Device <device@comma.ai>

commit 9e5c28e
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Tue Dec 13 20:21:04 2022 -0800

    safety replay updates for CAN-FD

commit d375ce6
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Thu Dec 8 16:14:22 2022 -0800

    jenkins updates for new master

commit 93ecd31
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Wed Dec 7 22:23:41 2022 -0800

    don't clog up jenkins build queue

commit 4edd1a6
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Fri Dec 2 23:34:06 2022 -0800

    Hyundai: alt steering limits (commaai#1186)

    * Hyundai: alt steering limits

    * parans

commit a6d0765
Author: Shane Smiskol <shane@smiskol.com>
Date:   Fri Dec 2 16:45:23 2022 -0800

    safety: common angle checks (commaai#1182)

    * common angle checks

    * clean up

    * clean up check and add comments

    * readable

    * ints

    * tests draft

    * clean up

    * comment

    * pylint exception

    * clean up

    * duplicate

commit 6e8a4fc
Author: Shane Smiskol <shane@smiskol.com>
Date:   Fri Dec 2 16:05:35 2022 -0800

    safety tests: common angle tests (commaai#1185)

    * basic formatting

    * common tests

    * assert truthfulness

    * ignore single pylint exception

    * wya too many lines

commit 616450c
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Thu Dec 1 20:04:30 2022 -0800

    tres bootkick (commaai#1183)

    * tres: bootkick

    * replace usb enum

    Co-authored-by: Comma Device <device@comma.ai>

commit 288e14c
Author: Robbe Derks <robbe.derks@gmail.com>
Date:   Thu Dec 1 08:38:00 2022 +0100

    Simple CAN chunking (commaai#1011)

    * simple chunking

    * make pylint happy

    * misra happy?

    * good practice anyways since we cast to a uint32_t later

    * fix bug dropping packets

    * minor fixes + prepare for shared lib testing

    * working library now

    * first queue test

    * can send test

    * fix running in github actions?

    * add big rx test and fix it

    * don't complain about empty buffers

    * disable for now

    * comment

    * test runs

    * some cleanup

    * merge those

    * test works

    * rm that

    * comment

    * proper logging

    * makes things too slow

    Co-authored-by: Comma Device <device@comma.ai>
    Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

commit 88b30e1
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Wed Nov 30 22:12:28 2022 -0800

    CAN comms test (commaai#1181)

    * CAN comms test

    * remove those

    * cleanup

    * little more

commit b238d41
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Nov 30 22:09:13 2022 -0800

    safety: clean up passing in longitudinal_allowed (commaai#1176)

    * clean up

    * clean up

    * and fix that

    * interceptor func

    * fix

    * draft

    * fix that

commit 9c50939
Author: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com>
Date:   Thu Dec 1 00:23:55 2022 -0500

    HKG CAN-FD radar-SCC: fix controls mismatch (commaai#1173)

    * Need to check on bus 4 as well

    * Fix 0x1a0 check race condition

    * Update board/safety/safety_hyundai_canfd.h

    Co-authored-by: Shane Smiskol <shane@smiskol.com>

    Co-authored-by: Shane Smiskol <shane@smiskol.com>

commit 2ae7b9a
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Nov 30 20:22:09 2022 -0800

    scons: put targets in global SConscript (commaai#1180)

    * Revert "remove unused scons argument (commaai#1169)"

    This reverts commit 702e528.

    * try this

    * clean up

    * default true

    * default true

    * already built

commit a0b1d64
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Nov 30 18:56:05 2022 -0800

    Honda Nidec: max gas safety and common speed cmd checks (commaai#1179)

    * limit gas and speed

    * gas safety test

commit 1f73c70
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Wed Nov 30 17:41:24 2022 -0800

    generic libpanda for tests (commaai#1177)

    * generic libpanda for tests

    * move safety helpers

    * fix ci build

    * fix running

    * opendbc is in the image

    * make can packet

    * rename

commit cb8fc6b
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Nov 30 17:22:42 2022 -0800

    safety: common interceptor checks (commaai#1178)

    * interceptor checks

    * only one line needed for now

    * whoops

    * misra

    * misread as |

commit b19a74f
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Wed Nov 30 15:56:15 2022 -0800

    CI: fix mounting in GITHUB_WORKSPACE (commaai#1175)

commit 2750463
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Wed Nov 30 14:15:09 2022 -0800

    cleanup + prep for more tests! (commaai#1172)

    * panda for pc!

    * little more

    * fake panda

    * move some more stuff

    * increase timeout

    * move that

    * print helpers

    * cleanup

    * just move it for now

    * revert jenkins changes

commit e8bd1df
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Nov 29 23:45:55 2022 -0800

    safety: common gas & brake safety checks (commaai#1168)

    * do toyota, hyundai, gm

    * comments

    * honda draft

    * Revert "honda draft"

    This reverts commit a1f466a.

    * do tesla

    * vw draft

    * finish vw

    * fix safety

    * clean up

    * fix function names

    * do honda and fix safety test not checking pos accel for bosch

    * clean that up

commit e6f62a6
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Tue Nov 29 22:55:10 2022 -0800

    rename puts to avoid conflict with stdio.h (commaai#1174)

    * rename puts to avoid conflict with stdio.h

    * better name

commit 2baa0ff
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Nov 29 16:46:32 2022 -0800

    Safety: common acceleration cmd checks (commaai#1171)

    * do toyota, hyundai, gm

    * comments

    * honda draft

    * Revert "honda draft"

    This reverts commit a1f466a.

    * do tesla

    * vw draft

    * finish vw

    * fix safety

    * only accel

    * only accel

    * some clean up

    * fix mqb tests

    * rename

commit 80dac4c
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Tue Nov 29 15:56:43 2022 -0800

    cleanup CAN definitions (commaai#1170)

commit 702e528
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Nov 29 01:28:46 2022 -0800

    remove unused scons argument (commaai#1169)

    * clean

    * also here

commit 8accca1
Author: Shane Smiskol <shane@smiskol.com>
Date:   Mon Nov 28 22:37:59 2022 -0800

    VW: explicitly test for inactive accel (commaai#1167)

    * explicitely test for inactive accel

    * fix the safety

    * and catch the mistake

    * revert

commit ba6b371
Author: Shane Smiskol <shane@smiskol.com>
Date:   Mon Nov 28 22:30:23 2022 -0800

    GM: use common steering safety test (commaai#1166)

    gm is the last

commit 360f8e6
Author: Robbe Derks <robbe.derks@gmail.com>
Date:   Thu Nov 24 16:09:39 2022 +0100

    reconnecting debug console

commit e4c4253
Author: Jason Young <46612682+jyoung8607@users.noreply.github.com>
Date:   Tue Nov 22 17:27:52 2022 -0500

    VW MQB: Redundant brake pressed signals (commaai#1137)

    * VW MQB: Redundant brake pressed signals

    * bump timer for safety tests in CI

    * use nicer f-string syntax

    * don't need that

commit c075050
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Mon Nov 21 20:31:01 2022 -0800

    Revert "F4: cleanup clock source (commaai#1160)"

    This reverts commit f0f67cc.

commit 2e90b6f
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Mon Nov 21 16:59:21 2022 -0800

    cleanup python lib imports

commit 15a945d
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Thu Nov 17 21:23:35 2022 -0800

    tres: IR LEDs (commaai#1163)

commit ae66bbc
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Thu Nov 17 21:02:37 2022 -0800

    tres fan (commaai#1162)

    * fan on

    * little cleanup

    * move to main

commit e5e34b1
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Thu Nov 17 17:06:28 2022 -0800

    som debug script

commit 3df9099
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Thu Nov 17 11:46:43 2022 -0800

    Misc cleanup (commaai#1161)

    * unused python stuff

    * green led

    * docs cleanup

    * little more

commit 5aa5f85
Author: Robbe Derks <robbe.derks@gmail.com>
Date:   Thu Nov 17 17:59:11 2022 +0100

    setup UART for SOM debugging (commaai#1151)

    * cleanup external debug serial

    * wip: bring up uart7

    * more wip

    * this does something

    * this works

    * increase fifo size

    * fix misra

    * cleanup

    * fix misra again

    * add SOM debug enum

    * reduce SOM buffer on F4

    Co-authored-by: Comma Device <device@comma.ai>
    Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

commit f0f67cc
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Thu Nov 17 07:49:26 2022 -0800

    F4: cleanup clock source (commaai#1160)

    * F4: cleanup clock source

    * little more

    * void

commit 5dc5cd8
Author: hoomoose <94947902+hoomoose@users.noreply.github.com>
Date:   Tue Nov 15 15:48:45 2022 -0700

    Hyundai: longitudinal support for all CAN-FD EV + Hybrid (commaai#1128)

    * Update safety_hyundai_canfd.h

    * Update safety_hyundai_canfd.h

    * Update safety_hyundai_canfd.h

    * cleanup

    * add test

    Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

commit e7131fc
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Mon Nov 14 13:52:52 2022 -0800

    H7 SPI comms (commaai#1158)

    * getting health packets

    * start cleanup

    * pull state machine out

    * cleanup

commit 9db0ae7
Author: Robbe Derks <robbe.derks@gmail.com>
Date:   Mon Nov 14 11:46:04 2022 +0100

    Remove external debug UART support (commaai#1159)

    cleanup external debug serial

commit c75c276
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Sun Nov 13 19:57:20 2022 -0800

    add has_spi board property (commaai#1153)

    * always spi for h7

    * disable for now

commit c0632cd
Author: Shane Smiskol <shane@smiskol.com>
Date:   Sun Nov 13 19:10:45 2022 -0800

    GM: enable on rising edge of resume (commaai#1157)

    * rising edge of resume

    * fix test

    * comment

    * todo fix tests

    * fix test

    * we want to test the transition from btn prev to btn cur, not unpressed to x to y

    * range

commit 0096d0c
Author: Shane Smiskol <shane@smiskol.com>
Date:   Sat Nov 12 01:55:41 2022 -0800

    GM: handle run-away set speed (commaai#1156)

    * Revert "GM: enable on rising edge of resume (commaai#1155)"

    This reverts commit 5aa33e1.

    * allow set/resume to any other button (except cancel)

    * explicit test

    * This is a test of both PRs combined

    * Revert "This is a test of both PRs combined"

    This reverts commit c7fdc3b.

    * fix test

commit ff48ecc
Author: Shane Smiskol <shane@smiskol.com>
Date:   Sat Nov 12 01:47:13 2022 -0800

    Revert "GM: enable on rising edge of resume (commaai#1155)"

    This reverts commit 5aa33e1.

commit 5aa33e1
Author: Shane Smiskol <shane@smiskol.com>
Date:   Sat Nov 12 00:01:15 2022 -0800

    GM: enable on rising edge of resume (commaai#1155)

    * rising edge of resume

    * fix test

    * comment

commit cc3b7d9
Author: Igor Biletskyy <briskspirit@users.noreply.github.com>
Date:   Fri Nov 11 15:30:37 2022 -0800

    H7: add comments on buses clocks (commaai#1154)

    comment

commit d573111
Author: Shane Smiskol <shane@smiskol.com>
Date:   Fri Nov 11 14:43:35 2022 -0800

    Hyundai: fix button enable controls mismatch (commaai#1152)

    * fix hyundai long button controls mismatch

    * test

    * comment

commit 966f7e0
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Thu Nov 10 21:34:43 2022 -0800

    SPI: fixes + fake bulk transfers (commaai#1150)

    * check spi checkusm

    * ugh, fix control handler

    * fake bulk xfer

    * cleanup

    * one more

    * unused

    * fix linter

    * some typing

    Co-authored-by: Comma Device <device@comma.ai>

commit a9e0357
Author: Igor Biletskyy <briskspirit@users.noreply.github.com>
Date:   Thu Nov 10 19:29:44 2022 -0800

    H7: enable USB LDO and fix RGB LED gpios (commaai#1148)

    * enable USB LDO

    * open drain for RGB LED gpios

    * naming

    * comment

commit eae58b3
Author: Igor Biletskyy <briskspirit@users.noreply.github.com>
Date:   Thu Nov 10 19:29:22 2022 -0800

    F4 CAN: fix SCE IRQ double fire (commaai#1149)

    fix

commit 72fd777
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Nov 10 17:14:32 2022 -0800

    safety replay: fix gm segments (commaai#1147)

    get torque on gm for safety replay

commit d574f4a
Author: Robbe Derks <robbe.derks@gmail.com>
Date:   Thu Nov 10 03:46:20 2022 +0100

    STM32F4: SPI communications (commaai#998)

    * cleanup is_enumerated, rename comms and init spi

    * big comms refactor, building now

    * misra fixes

    * more fixes

    * misra try 3

    * cleanup

    * this belongs in a separate PR

    * remove unneccesary file

    * revert llspi changes

    * llspi misra fix

    * enable SPI on F4 and setup gpio

    * duh

    * wip: spi comms

    * more spi wip

    * dynamic sector erasing

    * Revert "dynamic sector erasing"

    This reverts commit fce1215.

    * more sectors to be erased

    * debugging

    * woah, this works

    * cleanup on the panda side

    * add sync and checksum checks, and fix recovery on errors

    * this seems relatively stable

    * add retrying

    * this is stabler

    * some endianness and endpoint fixes

    * builds

    * revert that

    * add that back

    * checksum start

    * start splitting up driver

    * spi behind flag

    * cleanup test

    * bump up timeout

    Co-authored-by: Comma Device <device@comma.ai>
    Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

commit 281eb77
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Nov 8 20:17:02 2022 -0800

    GM Camera: use ECM brake pressed bit (commaai#1138)

    * GM camera: use ECM brake pressed bit

    * back to ECMEngineStatus

    * length 8

    * common gmcamera class

    * move to longitudinal base

    * Revert "move to longitudinal base"

    This reverts commit 67abe4c.

    * fix

commit 8f7befa
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Nov 8 19:50:11 2022 -0800

    GM: clean up safety classes (commaai#1143)

    * add PCM_CRUISE flag to GM safety tests (like safety code)

    * pcm_status_msg

    * rm 2

commit a01513d
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Nov 8 13:37:02 2022 -0800

    safety replay: fix hyundai segments (commaai#1140)

    * fix hyundai safety replay

    * clean up

commit 1ccdff9
Author: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com>
Date:   Tue Nov 8 01:44:13 2022 -0500

    HKG CAN-FD: support radar ACC cars (commaai#1134)

    * HKG: Car Port for Genesis GV70 2023

    * Revert "HKG: Car Port for Genesis GV70 2023"

    This reverts commit 01bfda6.

    * 0x1a0 rx check

    * Wrong one oops

    * Check 0x1a0 based on param

    * no need

    * getting a bit messy, clean up soon!

    * clean up

    * clean up

    Co-authored-by: Shane Smiskol <shane@smiskol.com>

commit ca681ff
Author: Shane Smiskol <shane@smiskol.com>
Date:   Mon Nov 7 22:13:17 2022 -0800

    Hyundai: CAMERA_SCC works on both safety modes (commaai#1139)

    * Make camera SCC work on both safety modes

    * update in safety

    * move to common

commit f3fc343
Author: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com>
Date:   Fri Nov 4 19:43:33 2022 -0400

    Hyundai CAN-FD: support for ICE cars (commaai#1031)

    * Hyundai: Car Port for Santa Cruz 2022

    New struct and params for CAN-FD ICE models

    fixup! New struct and params for CAN-FD ICE models

    * Longitudinal Control: ICE CAN-FD models

    * fixup! Longitudinal Control: ICE CAN-FD models

    * fixup! Longitudinal Control: ICE CAN-FD models

    * fixup! Longitudinal Control: ICE CAN-FD models

    * fixup! Longitudinal Control: ICE CAN-FD models

    * Gate radar disable behind HDA2 only

    * Remove unnecessary HDA2 checks

    * Fix MISRA violation

    * not needed, in HYUNDAI_CANFD_HDA2_LONG_TX_MSGS

    * revert longitudinal changes

    * fix addr check logic, clean up

    * revert more long stuff

    * fix addr check

    * temp

    * tests

    * work?

    Co-authored-by: Shane Smiskol <shane@smiskol.com>

commit 34cfc43
Author: Shane Smiskol <shane@smiskol.com>
Date:   Fri Nov 4 15:34:16 2022 -0700

    Hyundai CAN-FD: more complete tests (commaai#1133)

    * more complete tests

    * use parameterized_class

    * make clear this only tests EV right now

    * fix python linter

    * rename reference

    * clean up and fix python linter again

commit 0b86dfa
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Fri Nov 4 11:35:40 2022 -0700

    python lib: only import spidev as necessary

commit c8d108e
Author: Shane Smiskol <shane@smiskol.com>
Date:   Fri Nov 4 00:54:54 2022 -0700

    Hyundai CAN-FD long: fix brake address check (commaai#1132)

    * we don't check 0x65 any more

    * fix

    * that too

commit a42b104
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Thu Nov 3 22:18:12 2022 -0700

    SPI handle in python lib (commaai#1131)

    * SPI handle in python lib

    * add spidev

    * unify those

    * clean up connect

    * clean that up

    Co-authored-by: Robbe Derks <robbe.derks@gmail.com>

commit 2e0cba0
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Thu Nov 3 20:50:42 2022 -0700

    bump timeout for full HITL tests

commit b3e9292
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Thu Nov 3 17:24:28 2022 -0700

    HITL test fixups (commaai#1117)

    * automated -> hitl

    * simplify

    * jenkinsfile cleanup

    * cleanup

    * fix new linter errors

    * fix ws cleanup

    * some retry

    * more cleaning up after ourselves

    * unpin scons

    * bump opendbc

    * fix quotes

    * enable flaky

    * debug print

    Co-authored-by: Bruce Wayne <batman@comma.ai>

commit 49e2034
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Thu Nov 3 16:34:18 2022 -0700

    tres (commaai#1130)

    * tres

    * pull out chiplet

    * add to python lib

commit bfce4c7
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Thu Nov 3 14:36:09 2022 -0700

    Hyundai: update tests with new DBC names (commaai#1129)

    * Hyundai: update tests with new DBC names

    * fixed

commit 73a4099
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Nov 3 00:23:42 2022 -0700

    safety replay: fix setting desired torque (commaai#1127)

    * .

    * Update tests/safety_replay/helpers.py

commit 9147cba
Author: Igor Biletskyy <briskspirit@users.noreply.github.com>
Date:   Wed Nov 2 16:57:14 2022 -0700

    F4: more RAM (commaai#1126)

    * F4 more ram

    * more flash

commit f7c74e0
Author: Igor Biletskyy <briskspirit@users.noreply.github.com>
Date:   Wed Nov 2 14:28:23 2022 -0700

    bugfix: D2 SRAM clocks and CRun CPU state (commaai#1125)

    D2 SRAM clocks

commit 0ca6d9d
Author: Jason Young <46612682+jyoung8607@users.noreply.github.com>
Date:   Tue Nov 1 11:13:58 2022 -0400

    VW MQB: Longitudinal safety (commaai#920)

    * VW MQB: Longitudinal safety

    * disregard ACC_13 for now

    * abstraction cleanup

    * fix long control flag name

    * quick hack

    * VW MQB: Cleanup message counter handling

    * various cleanup

    * try without ACC_04

    * follow DBC updates

    * bump Docker opendbc ref

    * additional main switch and cancel handling/testing

    * pacify linter

    * style

    * handle the overlap tests like HKG CANFD

    * update replay route

    * commonize elements between MQB and PQ

    * Apply suggestions from code review

    Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

    * proper use of globals/conventions

    * make these global

    * this is better for now

    * better comment on accel boundary scaling

    * spelling error

    * reset on init

    * try bumping openpilot

    Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

commit cf4aa6b
Author: Jason Shuler <jshuler@gmail.com>
Date:   Tue Nov 1 03:58:18 2022 -0400

    GM: longitudinal support for camera-integrated cars (commaai#1014)

    * Allow brake TX on PT bus

    * Initial Panda GM cam harness support
     * Complete rewrite / simplification
     * Add param for cam harness (default is OBD2)
       - Forward btw 0 and 2
       - Filter LKAS and optionally ACC from cam
     * Add param for stock ACC
       - Allows ACC on PT bus when set, not otherwise
       - Allows ACC from cam when set, not otherwise
     * Add temporary WIP EPS timing workaround in ifdef

    * Remove keepalive; regen == braking

    * Fix MISRA violations

    * EPS timing opt-in by param

    * Minor clean up

    * remove timing code for readability

    fix and formatting

    * we only need to send one message if cam harness and stock long

    * Simplify params

    * Removed dup brake msg

    * revised params, split 3-ways

    * add test

    * clean up a bit, no need to send ACC yet

    like this

    * split out button enable and pcm enable into seperate tests

    * some formatting

    some formatting

    * GM CAM uses PCM cruise for controls_allowed

    * fix gas safety tests

    * misra

    * fix static analysis

    comment

    * fix brake pressed

    * Add OP VOACC override stock cam

    * Add VOACC safetyparam to init.py

    * openpilot long safety

    * do this in another PR

    * add back

    * add safety tests

    * rename

    * struct for safety

    * not used

    * temporary fault fix

    * adjust max gas

    * allow PSCMStatus in long mode

    * stash

    * fix max gas

    * fix and clean up tests

    * clean up longitudinal tests into a common class

    * fix pylint

    * subclass

    * clean that up

    * rm

    * blocking

    * comment

    * comment

    * lower case

    * brake bus

    Co-authored-by: Shane Smiskol <shane@smiskol.com>

commit 997e328
Author: Shane Smiskol <shane@smiskol.com>
Date:   Mon Oct 31 19:40:44 2022 -0700

    Nissan: check two wheel speeds for standstill (commaai#1124)

    * safety

    * use already parsed wheel speed

commit 494c5a4
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Oct 27 21:23:36 2022 -0700

    GM Cam: pass on useless tests (commaai#1122)

    * pass

    * Caps

commit 187fdee
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Oct 27 17:51:20 2022 -0700

    safety: remove pre-enable state (commaai#1121)

    * current_controls_allowed is now unused

    * reduce diff

    * remove from honda

    * these test nothing

    * fix

commit 609a8e0
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Thu Oct 27 13:58:19 2022 -0700

    fan: reset error integral when disabled (commaai#1119)

commit bd8d248
Author: Igor Biletskyy <briskspirit@users.noreply.github.com>
Date:   Tue Oct 25 21:15:46 2022 -0700

    H7: free up 29120 bytes of RAM (commaai#1120)

    free up some RAM

commit 2db69bc
Author: Shane Smiskol <shane@smiskol.com>
Date:   Fri Oct 21 18:11:31 2022 -0700

    Revert "GM: different brake thresholds by platform (commaai#1104)" (commaai#1116)

    This reverts commit 5962bcd.

commit d51dd49
Author: Shane Smiskol <shane@smiskol.com>
Date:   Fri Oct 21 00:20:01 2022 -0700

    GM: more longitudinal safety (commaai#1115)

    * seems cleaner

    * abort struct

    * fix

    * add variable in test_gm (TODO: add tests)

    * fix test for new safety

    * cmt

    * && -> ||

commit fcb1a5a
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Thu Oct 20 19:52:06 2022 -0700

    Hyundai CAN-FD: common brake pressed signal (commaai#1113)

    * Hyundai CAN-FD: common brake pressed signal

    * change bit

    Co-authored-by: Shane Smiskol <shane@smiskol.com>

commit 54f9390
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Oct 19 23:25:22 2022 -0700

    GM: allow TX PSCMStatus message (commaai#1111)

    * forwarding

    * add to tx msgs

    * don't block

    * Revert "don't block"

    This reverts commit b1ca52f.

    * fix forwarding tests

    * comment

    * add comment

commit 723e60c
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Wed Oct 19 22:58:52 2022 -0700

    Hyundai CAN-FD: fix SCC bus for HDA1

commit 24ccc34
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Wed Oct 19 22:26:22 2022 -0700

    Hyundai CAN-FD: use cruise signals from SCC ECU (commaai#1112)

    * Hyundai CAN-FD: use cruise signals from SCC ECU

    * cleanup

commit dd75186
Author: hoomoose <94947902+hoomoose@users.noreply.github.com>
Date:   Wed Oct 19 16:17:23 2022 -0600

    Hyundai: support button resume on CAN-FD HDA1 (commaai#1102)

    * Update safety_hyundai_canfd.h

    * run tx checks

    * fix tests

    Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

commit b95a65d
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Oct 18 11:22:04 2022 -0700

    GM: match ECM standstill check (commaai#1105)

    * match ECM check

    * fix

    * needs to be <= 10 to avoid a fault, fix for safety tests

    * fix

commit 9ed3f75
Author: Shane Smiskol <shane@smiskol.com>
Date:   Mon Oct 17 20:53:03 2022 -0700

    Fix MISRA violation (commaai#1109)

commit 842cf65
Author: Shane Smiskol <shane@smiskol.com>
Date:   Mon Oct 17 20:27:30 2022 -0700

    Hyundai CAN-FD: support 90deg angle limit bypass (commaai#1098)

    * h90d CAN-FD

    * torque

    * one liner

    * adjust safety

    * Revert "adjust safety"

    This reverts commit e3539ed.

commit bce6f48
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Sun Oct 16 16:37:58 2022 -0700

    CI speedup (commaai#1108)

    * use docker buildkit

    * enable push

    * try this caching

    * no regressions

    * don't copy into the image

    * move that

    * getting there

    * debug

    * little smaller

    * debug

    * configure safe dir

    * no sudo

    * cleanup

    * another timeout

commit 62868c3
Author: Jason Wen <47793918+sunnyhaibin@users.noreply.github.com>
Date:   Sat Oct 15 15:26:01 2022 -0400

    Hyundai: CAN-FD Hybrid gas pressed signal (commaai#1106)

    * Hyundai: Gate 0x105 behind hybrid CAN-FD only

    * update tests

    Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

commit 5962bcd
Author: Shane Smiskol <shane@smiskol.com>
Date:   Fri Oct 14 16:51:53 2022 -0700

    GM: different brake thresholds by platform (commaai#1104)

    * Different brake pressed thresholds

    * Update board/safety/safety_gm.h

commit eabebfe
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Thu Oct 13 07:52:59 2022 -0700

    Hyundai CAN-FD: ignore LKAS steering on HDA2 long mode (commaai#1101)

commit c39528d
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Oct 12 21:48:04 2022 -0700

    Hyundai tests: fix counter in FCA message (commaai#1092)

    * tests: fix counter in FCA message

    * Update tests/safety/test_hyundai.py

    Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

commit de38096
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Wed Oct 12 21:00:24 2022 -0700

    Hyundai: support non-HDA2 EV gas signals (commaai#1100)

    * Hyundai: support non-HDA2 EV gas signals

    * update tests

commit 622ce92
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Wed Oct 12 20:29:15 2022 -0700

    Hyundai: share flags with CAN-FD platform (commaai#1099)

    * Hyundai: share flags with CAN-FD platform

    * update flags there

commit 2f3e282
Author: Greg Hogan <gregjhogan@gmail.com>
Date:   Wed Oct 12 15:28:20 2022 -0700

    CAN-FD non-ISO support (commaai#1082)

    CAN FD non-ISO support

commit ffb3109
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Tue Oct 11 20:50:23 2022 -0700

    Hyundai: HDA2 longitudinal control support (commaai#1096)

    * ev6 long

    * update steering

commit d68b1b0
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Oct 11 17:57:03 2022 -0700

    Hyundai: support 90deg angle limit bypass (commaai#1091)

    * h90d safety

    * quicker rate

    * update comment

    * support multi frames?

    * stash

    * stash

    * might work?

    * stash

    * clean up

    * revert that

    * add test

    * fixup tests

    * clean up

    * remove test

    * try to combine tests

    * Revert "try to combine tests"

    This reverts commit f147955.

    * seems simpler

    * more explicit

    * shouldn't be needed

    * comment

    * fix that test

commit aa0be4d
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Tue Oct 11 17:38:34 2022 -0700

    Hyundai: move shared definitions to a separate file (commaai#1097)

    * Hyundai: move shared definitions to a separate header file

    * same with tests

    * cleanup

commit 0a819ad
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Oct 11 13:20:24 2022 -0700

    Torque request bit: support multiple invalid frames (commaai#1094)

    * h90d safety

    * quicker rate

    * update comment

    * support multi frames?

    * stash

    * stash

    * might work?

    * stash

    * clean up

    * revert that

    * add test

    * fixup tests

    * clean up

    * remove test

    * try to combine tests

    * Revert "try to combine tests"

    This reverts commit f147955.

    * seems simpler

    * more explicit

    * shouldn't be needed

    * no hyundai stuff

    * no line

    * consecutively

    * comment

    * comment

    * comment

    * revert

    * comment

    * check earlier

    check earlier

    * ensure we don't set a negative value

    * add todo comments

    * for loop

commit 3644d94
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Oct 11 11:25:41 2022 -0700

    Revert "Hyundai: steering fault bit safety (commaai#1095)"

    This reverts commit 2334a41.

commit 2334a41
Author: Shane Smiskol <shane@smiskol.com>
Date:   Mon Oct 10 21:56:22 2022 -0700

    Hyundai: steering fault bit safety (commaai#1095)

    comment

    smaller comment

    simpler test

    check controls allowed

    more classical

    more like the buttons

    revert

    flip

commit aaa70b1
Author: Shane Smiskol <shane@smiskol.com>
Date:   Mon Oct 10 17:01:49 2022 -0700

    Toyota: remove redundant test (commaai#1093)

    already test this

commit ca11326
Author: Shane Smiskol <shane@smiskol.com>
Date:   Sun Oct 9 12:39:48 2022 -0700

    GM: abstract PCM-related hw check (commaai#1090)

    abstract hw check to if pcm_cruise or not

commit 1303af2
Author: Shane Smiskol <shane@smiskol.com>
Date:   Fri Oct 7 16:10:09 2022 -0700

    GM: change brake pressed signal (commaai#1089)

    * Match openpilot brake check

    * comment

    * simple

    * Update test

    * doesn't take an int

    * msg varies in size by platform

    * 2 extra bytes of zeros on Escalade

    * label platforms

    * space

commit c09a1cd
Author: Cameron Clough <cameronjclough@gmail.com>
Date:   Fri Oct 7 10:47:04 2022 -0700

    Ford: allow sending buttons msg to camera (commaai#1085)

    * allow sending steering buttons msg to camera

    The DBC lists both the IPMA and PCM as receiving modules for the `CcAslButtnCnclPress` and `CcAsllButtnResPress` signals used to cancel/resume ACC.

    Sending resume to both buses is confirmed to work by three testers, now it's just down to tweaking openpilot to get high reliability.

    * add test for both buses

    * only send TJA to bus 2

commit 3334dc2
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Oct 5 16:35:28 2022 -0700

    IsoTpMessage: parameterize separation time (commaai#1088)

    * parameterize separation time

    * take in seconds and convert

    * fix

    * define once

commit cffc41e
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Oct 5 16:22:53 2022 -0700

    Specify IsoTpMessage keywords

commit 7d19626
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Oct 5 16:12:24 2022 -0700

    IsoTpMessage: param for single frame flow control (commaai#1079)

    * iso-tp: request a single frame at a time

    * behind param

    * this might be more clear

    * like this better

    * fit the theme

    * revert this change

commit 9bcd9b9
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Oct 4 00:20:31 2022 -0700

    GM: update max brake (commaai#1087)

    update max brake

commit e987e6c
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Mon Oct 3 16:05:16 2022 -0700

    add pandaState.safetyRxChecksInvalid field (commaai#1083)

    * add fault for invalid safety RX checks

    * fix test build

    * debug

    * fix debug

    * fix test

    * just a bool in health

commit 4248085
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Sun Oct 2 17:48:22 2022 -0700

    Hyundai: fix addr check race condition (commaai#1084)

commit 1910db8
Author: Shane Smiskol <shane@smiskol.com>
Date:   Fri Sep 30 14:29:41 2022 -0700

    IsoTpMessage.send: setup_only argument (commaai#1081)

    * some fixes

    * some fixes

    * revert to tx not done

    * this should work

    * correct debug prints

    * not true

    * revert this

    * setup_only

commit 51f023b
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Sep 27 18:08:09 2022 -0700

    IsoTpMessage: return if message updated (commaai#1078)

    * extend timeout for each message/frame (not multi-frame full response)

    * linter

commit 10c0991
Author: Robbe Derks <robbe.derks@gmail.com>
Date:   Fri Sep 23 11:17:15 2022 +0200

    Add the 0x600 range for UDS messages (commaai#1077)

    add the 0x600 range for UDS messages

    Co-authored-by: Comma Device <device@comma.ai>

commit 11ea112
Author: Shane Smiskol <shane@smiskol.com>
Date:   Mon Sep 19 20:47:12 2022 -0700

    IsoTpMessage: add separation time to flow control msg (commaai#1074)

    * one frame at a time, 20 ms delay

    * send one at a time

    * update separation time to 10ms

    * comment

commit b861992
Author: Igor Biletskyy <briskspirit@users.noreply.github.com>
Date:   Mon Sep 19 16:11:49 2022 -0700

    merge health.h and can_health.h (commaai#1075)

    init

commit a19f125
Author: Igor Biletskyy <briskspirit@users.noreply.github.com>
Date:   Fri Sep 16 23:51:55 2022 -0700

    check if set CAN speed is valid (commaai#1073)

    * check

    * MISRA

commit fd226de
Author: Igor Biletskyy <briskspirit@users.noreply.github.com>
Date:   Fri Sep 16 21:56:48 2022 -0700

    board struct: add has_canfd (commaai#1072)

    * add

    * gate this

    * and this

    * forgot white

commit 59ede3f
Author: Igor Biletskyy <briskspirit@users.noreply.github.com>
Date:   Fri Sep 16 20:39:18 2022 -0700

    CAN health packet: add speed and canfd info (commaai#1071)

    in

commit 046fd58
Author: Igor Biletksyy <bs@privacy.im>
Date:   Thu Sep 15 14:54:38 2022 -0700

    python lib: check get_packets_versions length

commit f029c99
Author: Igor Biletskyy <briskspirit@users.noreply.github.com>
Date:   Thu Sep 15 13:08:46 2022 -0700

    health packet: fix confusing variable names (commaai#1068)

    * fix naming

    * different buffer overflows

    * naming

commit 0eef8cf
Author: Igor Biletskyy <briskspirit@users.noreply.github.com>
Date:   Thu Sep 15 13:04:10 2022 -0700

    CAN: health message for each CAN module (commaai#1067)

    * initial can health pkt

    * MISRA: variable scope

    * MISRA 10.4

    * typo

    * add total_fwd_cnt

    * check size of can_health_t

    * improve

    * comment

    * that's better

    * move

    * add health check to tests

    * why?

    * ...

    * revert later

    * meh

    * Revert "meh"

    This reverts commit 0eb8432.

    * Revert "revert later"

    This reverts commit 2d98957.

    * adjust test

commit 38257a9
Author: Shane Smiskol <shane@smiskol.com>
Date:   Thu Sep 15 11:22:21 2022 -0700

    Hyundai: lower CAN FD torque rate limits (commaai#1066)

commit 93c0f55
Author: HaraldSchafer <harald.the.engineer@gmail.com>
Date:   Thu Sep 15 10:25:00 2022 +0200

    Update README.md

commit f2ac118
Author: HaraldSchafer <harald.the.engineer@gmail.com>
Date:   Thu Sep 15 10:24:36 2022 +0200

    Update README.md

commit f120999
Author: Shane Smiskol <shane@smiskol.com>
Date:   Wed Sep 14 18:42:16 2022 -0700

    Subaru: match openpilot standstill (commaai#1070)

    match openpilot standstill

commit 19983f1
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Sep 13 13:52:44 2022 -0700

    Chrysler: match openpilot standstill check (commaai#1065)

    * match openpilot standstill, and fix ram standstill parsing

    * misra

    * cmt

commit 788e0b5
Author: Shane Smiskol <shane@smiskol.com>
Date:   Mon Sep 12 21:32:06 2022 -0700

    GM: same regen check as openpilot (commaai#1026)

    * it was only checking a specific bit

    * same check as openpilot

    * reset on init

    * unsigned

    * should fix conflicts

    * common

    * comment

    * Add missing function

    * Tests

    * the alternative is a mess

    typo

    typo

    * draft

    * finish common

    * works but you need RegenSafetyTest before all other classes

    * Revert "works but you need RegenSafetyTest before all other classes"

    This reverts commit 256f3be.

    * This works too

    * need parameterized, subtests nor super() calls correctly reset state

    * Fix test and comment

    * comment

    * another fix...

    * subclass

    * ABC

    * order

    * fix static analysis

    * can do this

    * Revert "can do this"

    This reverts commit 6bc63a3.

    * this is nicer, no pylint errors

    * Update tests/safety/common.py

    * underscore

    * dynamically detect and add tests

    * simpler

    * only for safety modes with a regen message

    * check attr

    * Revert "check attr"

    This reverts commit bc37a7e.

    * need to check at test time not class init time

commit 15eda6a
Author: Igor Biletskyy <briskspirit@users.noreply.github.com>
Date:   Mon Sep 12 14:31:22 2022 -0700

    CAN bus: adjust SJW and time quanta to SAE 2284-3 (commaai#1061)

    * adjust clocks and tq

    * debug console keyboard interrupt

    * MISRA

commit ac21dbe
Author: Igor Biletskyy <briskspirit@users.noreply.github.com>
Date:   Fri Sep 9 20:13:06 2022 -0700

    H7: add chiplet panda support (RPv2) (commaai#1049)

    * temporarily disable Jenkins

    * firmware

    * python lib

    * tests

    * ..

    * usb load switch to high

    * it is still red

    * usb power mode remove

    * Revert "temporarily disable Jenkins"

    This reverts commit a911cfa.

    * forgot this

    * common periph

    * change name

    * board tick

    * add V2 to CI

    * update known bootstub

commit 1b210a8
Author: Igor Biletskyy <briskspirit@users.noreply.github.com>
Date:   Fri Sep 9 15:24:19 2022 -0700

    H7: remove manual bus off handling (commaai#1062)

    remove this

commit 8f13ca3
Author: Cameron Clough <cameronjclough@gmail.com>
Date:   Thu Sep 8 15:35:10 2022 -0700

    Ford safety updates (commaai#1052)

    * allow resume button press while controls allowed

    * add ACCDATA_3 msg

    * change msg name style to match DBC

    * fix

    * wrong msg

    * chmod +x

    * always allow other acc buttons e.g. tja toggle

commit c4c9744
Author: Comma Device <device@comma.ai>
Date:   Wed Sep 7 21:43:52 2022 -0700

    fix dos siren

commit 0ca23b6
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Sep 6 19:12:06 2022 -0700

    Toyota: generic steer fault workaround safety (commaai#939)

    * toyota steer fault safety

    * fix

    * alternative safety

    * no comment

    * should be good

    * same behavior, a bit simpler

    * better tests

    * fix comment

    * update safety comment

    * const is actual number of messages

    * Fix bug

    * misra

    * Fix test

    * clean up logic a bit

    clean up logic a bit

    fix

    * fix

    fix

    * clean up tests

    * unsigned

    * forgot to rename message when merged

    * Comments

    Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

    * Update names

    Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

    * rename rest of variables

    * real time checks

    * clean up safety tests

    * revert

    * add this

    * clean up

    * better name

    * use common steering checks

    * reverse order

    * make common

    * re-organize the safety

    * clean up safety_toyota

    * more clean up

    * add comment back

    * 19

    * recover

    * some variable name clean up

    * rename and reset `valid_steering_msg_count`, another recover message

    * move comment

    * remove reset_toyota_timer, minor test clean up

    * common test

    * use init_tests

    * threshold used to be: frame you can cut steer on, now it's min num of valid frames (next frame you can cut, 18+1)

    * Update tests/safety/test_toyota.py

    Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

    * fix realtime

    * Update board/safety/safety_toyota.h

    * Apply suggestions from code review

    * Update board/safety/safety_toyota.h

    Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

commit 671b5ae
Author: kyle zunich <zunichky@msu.edu>
Date:   Fri Sep 2 13:45:43 2022 -0400

    Update example scripts to support canfd (commaai#1059)

commit 60f366c
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Thu Sep 1 21:11:06 2022 -0700

    fan: don't fully reset integral when recovering from stall (commaai#1058)

    * fan: don't fully reset integral when recovering from stall

    * clip to [0, 70]

    * 50%

commit 13d64d4
Author: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Date:   Wed Aug 31 20:46:07 2022 -0700

    USB power mode + bootkick cleanup (commaai#1051)

    * remove tick

    * remove more

    * delete more

    * board tick

    * update health

    * dos bootkicking

    * cleanup

commit f040d8b
Author: Igor Biletskyy <briskspirit@users.noreply.github.com>
Date:   Wed Aug 31 12:15:36 2022 -0700

    CI: add USB hub reset (commaai#1053)

    USB hub reset

commit 6d2e2bd
Author: Igor Biletksyy <bs@privacy.im>
Date:   Wed Aug 31 10:39:05 2022 -0700

    put is_internal() back for openpilot pandad.py

commit 77cfc32
Author: Shane Smiskol <shane@smiskol.com>
Date:   Tue Aug 30 23:24:37 2022 -0700

    Toyota: match openpilot standstill check (commaai#1045)

    * Match openpilot

    * check against zero value

    * formatting

    * use intermediary variable

    * comment

    * hmm... this works now??

    * fix misra

commit b81dfba
Author: Igor Biletskyy <briskspirit@users.noreply.github.com>
Date:   Tue Aug 30 10:46:12 2022 -0700

    python lib: cleanup hw type check (commaai#1050)

    cleanup
mlocoteta pushed a commit to mlocoteta/panda that referenced this pull request Apr 29, 2023
* it was only checking a specific bit

* same check as openpilot

* reset on init

* unsigned

* should fix conflicts

* common

* comment

* Add missing function

* Tests

* the alternative is a mess

typo

typo

* draft

* finish common

* works but you need RegenSafetyTest before all other classes

* Revert "works but you need RegenSafetyTest before all other classes"

This reverts commit 256f3be.

* This works too

* need parameterized, subtests nor super() calls correctly reset state

* Fix test and comment

* comment

* another fix...

* subclass

* ABC

* order

* fix static analysis

* can do this

* Revert "can do this"

This reverts commit 6bc63a3.

* this is nicer, no pylint errors

* Update tests/safety/common.py

* underscore

* dynamically detect and add tests

* simpler

* only for safety modes with a regen message

* check attr

* Revert "check attr"

This reverts commit bc37a7e.

* need to check at test time not class init time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants