mirror of
https://github.com/infiniteCable2/panda.git
synced 2026-02-19 01:33:52 +08:00
GM: Add support for cam harness & stock ACC (#962)
* 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 * Revert "Add VOACC safetyparam to init.py" This reverts commit 2e46f8746f31c399823d9fae9fb9e77e6fee6eea. * Revert "Add OP VOACC override stock cam" This reverts commit a4b096cc1e7ee572b22e5f4422b9a6d43f94479c. * better comments * better comments better comments fix * move non-base msg definitions to subclass * various comments * TODO: add button safety * add button safety * use new pcm_cruise_check * revert regen braking change * only cancel button allowed * Apply suggestions from code review * Update board/safety/safety_gm.h Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> * fix suggestion * Fix tests * Revert "Fix tests" This reverts commit 500577921f32be24934acc80af98aab3af86d028. * this is a much simpler fix, do full fix in another PR * tx button safety Co-authored-by: Shane Smiskol <shane@smiskol.com> Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
This commit is contained in:
@@ -205,6 +205,8 @@ class Panda:
|
||||
|
||||
FLAG_SUBARU_GEN2 = 1
|
||||
|
||||
FLAG_GM_HW_CAM = 1
|
||||
|
||||
def __init__(self, serial: Optional[str] = None, claim: bool = True):
|
||||
self._serial = serial
|
||||
self._handle = None
|
||||
|
||||
Reference in New Issue
Block a user