From 19f51f13c445a743c466e49ba797c2802bf7cbcc Mon Sep 17 00:00:00 2001 From: Julian Marmier Date: Wed, 5 Jun 2024 17:49:54 +0200 Subject: [PATCH] Revert changes --- Core/Src/ui.c | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/Core/Src/ui.c b/Core/Src/ui.c index 9b4c1f2..a0a2c75 100644 --- a/Core/Src/ui.c +++ b/Core/Src/ui.c @@ -10,13 +10,6 @@ #include "tx_api.h" #include "vehicle.h" -// TODO Remove for STW v2 -#define MOCK_NUM_BUTTONS 5 -#define MOCK_BUTTON_TICK_CHANGE 1000 -uint32_t last_tick = 0; -uint8_t mock_button_counter = 0; -// END TODO - void ui_thread_entry(ULONG _) { GPIO_TypeDef *button_ports[NUM_BUTTONS] = {BTN1_GPIO_Port, BTN2_GPIO_Port, BTN3_GPIO_Port, BTN4_GPIO_Port, @@ -51,22 +44,7 @@ void ui_thread_entry(ULONG _) { tx_event_flags_set(&gui_update_events, GUI_UPDATE_NEXT_SCREEN, TX_OR); } - // TODO restore this for STW24-v2 - // vehicle_broadcast_buttons(button_states); - // END TODO - - // TODO (STW24) Remove for STW24-v2 !! - GPIO_PinState mock_button_states[MOCK_NUM_BUTTONS] = {mock_button_states}; - mock_button_states[mock_button_counter] = GPIO_PIN_SET; - uint32_t now = HAL_GetTick(); - // Wait 1s before moving to the next button - if (abs(now - last_tick) >= MOCK_BUTTON_TICK_CHANGE) { - mock_button_counter++; - mock_button_counter %= MOCK_NUM_BUTTONS; - } - - vehicle_broadcast_buttons(mock_button_states); - // END TODO + vehicle_broadcast_buttons(button_states); // Release so other threads can get scheduled tx_thread_sleep(1);