From 86dec4b8babc8d9533a46c53fdb3268ba1ff83fd Mon Sep 17 00:00:00 2001 From: Riccardo Date: Fri, 15 Nov 2019 12:20:15 -0800 Subject: [PATCH] Safety modes that violate ISO26262 requirements are not compiled in RELEASE build --- board/safety.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/board/safety.h b/board/safety.h index 8fea34beb..a231fac7e 100644 --- a/board/safety.h +++ b/board/safety.h @@ -67,17 +67,19 @@ const safety_hook_config safety_hook_registry[] = { {SAFETY_ELM327, &elm327_hooks}, {SAFETY_GM, &gm_hooks}, {SAFETY_HONDA_BOSCH, &honda_bosch_hooks}, - {SAFETY_FORD, &ford_hooks}, - {SAFETY_CADILLAC, &cadillac_hooks}, {SAFETY_HYUNDAI, &hyundai_hooks}, {SAFETY_CHRYSLER, &chrysler_hooks}, - {SAFETY_TESLA, &tesla_hooks}, {SAFETY_SUBARU, &subaru_hooks}, {SAFETY_MAZDA, &mazda_hooks}, {SAFETY_VOLKSWAGEN, &volkswagen_hooks}, +#ifdef ALLOW_DEBUG + {SAFETY_CADILLAC, &cadillac_hooks}, {SAFETY_TOYOTA_IPAS, &toyota_ipas_hooks}, + {SAFETY_TESLA, &tesla_hooks}, {SAFETY_ALLOUTPUT, &alloutput_hooks}, {SAFETY_GM_ASCM, &gm_ascm_hooks}, + {SAFETY_FORD, &ford_hooks}, +#endif }; int set_safety_hooks(uint16_t mode, int16_t param) {