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

* Make camera SCC work on both safety modes

* update in safety

* move to common
This commit is contained in:
Shane Smiskol
2022-11-07 22:13:17 -08:00
committed by GitHub
parent f3fc343262
commit ca681ff829
4 changed files with 5 additions and 6 deletions

View File

@@ -84,8 +84,6 @@ AddrCheckStruct hyundai_legacy_addr_checks[] = {
};
#define HYUNDAI_LEGACY_ADDR_CHECK_LEN (sizeof(hyundai_legacy_addr_checks) / sizeof(hyundai_legacy_addr_checks[0]))
const int HYUNDAI_PARAM_CAMERA_SCC = 8;
bool hyundai_legacy = false;
bool hyundai_camera_scc = false;

View File

@@ -96,8 +96,8 @@ addr_checks hyundai_canfd_rx_checks = {hyundai_canfd_addr_checks, HYUNDAI_CANFD_
uint16_t hyundai_canfd_crc_lut[256];
const int HYUNDAI_PARAM_CANFD_HDA2 = 8;
const int HYUNDAI_PARAM_CANFD_ALT_BUTTONS = 16;
const int HYUNDAI_PARAM_CANFD_HDA2 = 16;
const int HYUNDAI_PARAM_CANFD_ALT_BUTTONS = 32;
bool hyundai_canfd_hda2 = false;
bool hyundai_canfd_alt_buttons = false;

View File

@@ -4,6 +4,7 @@
const int HYUNDAI_PARAM_EV_GAS = 1;
const int HYUNDAI_PARAM_HYBRID_GAS = 2;
const int HYUNDAI_PARAM_LONGITUDINAL = 4;
const int HYUNDAI_PARAM_CAMERA_SCC = 8;
const uint8_t HYUNDAI_PREV_BUTTON_SAMPLES = 8; // roughly 160 ms
const uint32_t HYUNDAI_STANDSTILL_THRSLD = 30; // ~1kph

View File

@@ -215,8 +215,8 @@ class Panda:
FLAG_HYUNDAI_HYBRID_GAS = 2
FLAG_HYUNDAI_LONG = 4
FLAG_HYUNDAI_CAMERA_SCC = 8
FLAG_HYUNDAI_CANFD_HDA2 = 8
FLAG_HYUNDAI_CANFD_ALT_BUTTONS = 16
FLAG_HYUNDAI_CANFD_HDA2 = 16
FLAG_HYUNDAI_CANFD_ALT_BUTTONS = 32
FLAG_TESLA_POWERTRAIN = 1
FLAG_TESLA_LONG_CONTROL = 2