Skip to content

Commit 48ca92c

Browse files
committed
revert
1 parent 23b9bde commit 48ca92c

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

board/safety.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ void gen_crc_lookup_table_8(uint8_t poly, uint8_t crc_lut[]) {
269269
}
270270
}
271271

272+
#ifdef CANFD
272273
void gen_crc_lookup_table_16(uint16_t poly, uint16_t crc_lut[]) {
273274
for (uint16_t i = 0; i < 256U; i++) {
274275
uint16_t crc = i << 8U;
@@ -282,6 +283,7 @@ void gen_crc_lookup_table_16(uint16_t poly, uint16_t crc_lut[]) {
282283
crc_lut[i] = crc;
283284
}
284285
}
286+
#endif
285287

286288
// 1Hz safety function called by main. Now just a check for lagging safety messages
287289
void safety_tick(const safety_config *cfg) {

board/safety/safety_hyundai.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,6 @@ static safety_config hyundai_init(uint16_t param) {
320320
hyundai_can_canfd_hybrid = GET_FLAG(param, HYUNDAI_PARAM_CAN_CANFD_HYBRID);
321321
hyundai_can_canfd_hybrid_hda2 = hyundai_can_canfd_hybrid && hyundai_canfd_hda2;
322322

323-
if (hyundai_can_canfd_hybrid_hda2) {
324-
gen_crc_lookup_table_16(0x1021, hyundai_canfd_crc_lut);
325-
}
326-
327323
if (hyundai_camera_scc || hyundai_can_canfd_hybrid_hda2) {
328324
hyundai_longitudinal = false;
329325
}

board/safety_declarations.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,9 @@ void update_sample(struct sample_t *sample, int sample_new);
176176
bool get_longitudinal_allowed(void);
177177
int ROUND(float val);
178178
void gen_crc_lookup_table_8(uint8_t poly, uint8_t crc_lut[]);
179+
#ifdef CANFD
179180
void gen_crc_lookup_table_16(uint16_t poly, uint16_t crc_lut[]);
181+
#endif
180182
void generic_rx_checks(bool stock_ecu_detected);
181183
bool steer_torque_cmd_checks(int desired_torque, int steer_req, const SteeringLimits limits);
182184
bool steer_angle_cmd_checks(int desired_angle, bool steer_control_enabled, const SteeringLimits limits);

0 commit comments

Comments
 (0)