From 76d655c16a8d9476aaef3621b5180131a5cc222d Mon Sep 17 00:00:00 2001 From: Marco Correia Date: Wed, 5 Jan 2022 10:47:36 +0000 Subject: [PATCH] No more static variables in the parse function of the radar --- src/cpm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cpm.c b/src/cpm.c index f3aaadc..dccbcd6 100644 --- a/src/cpm.c +++ b/src/cpm.c @@ -354,13 +354,13 @@ void parse_can_data_tm(u_int32_t u32_can_id, int i32_can_len, u_int8_t* au8_can_ void parse_input(u_int8_t* u8_input_buffer, int i32_len) { - static enum state_t s_state = IDLE; + enum state_t s_state = IDLE; u_int8_t u8_input = 0; int i32_i; - static int i32_can_len_counter = 0, i32_can_len = 0, i32_can_id = 0, i32_stop_search = 0; - static unsigned char au8_can_data[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - static int i32_xor = 0; + int i32_can_len_counter = 0, i32_can_len = 0, i32_can_id = 0, i32_stop_search = 0; + unsigned char au8_can_data[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + int i32_xor = 0; for (i32_i = 0; i32_i < i32_len; i32_i++) { u8_input = u8_input_buffer[i32_i];