diff --git a/AZURE_RTOS/App/app_azure_rtos.c b/AZURE_RTOS/App/app_azure_rtos.c index 6505f15..2a5b221 100644 --- a/AZURE_RTOS/App/app_azure_rtos.c +++ b/AZURE_RTOS/App/app_azure_rtos.c @@ -27,11 +27,13 @@ /* USER CODE BEGIN Includes */ #include "app.h" #include "main.h" -#include "tx_api.h" -#include "tx_port.h" #include "ui.h" #include "vehicle.h" +#include "app_touchgfx.h" +#include "tx_api.h" +#include "tx_port.h" + /* USER CODE END Includes */ /* Private typedef -----------------------------------------------------------*/ diff --git a/Core/Lib/can-halal b/Core/Lib/can-halal index b2929ad..66983c3 160000 --- a/Core/Lib/can-halal +++ b/Core/Lib/can-halal @@ -1 +1 @@ -Subproject commit b2929ad66414b394805ee1d2b9c4778a2f9fe515 +Subproject commit 66983c30d398a41641b81a8050e11dfbcaecf6ed diff --git a/Core/Src/ui.c b/Core/Src/ui.c index 8205f48..83a350f 100644 --- a/Core/Src/ui.c +++ b/Core/Src/ui.c @@ -39,7 +39,6 @@ void ui_thread_entry(ULONG _) { void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) { // This gets called when an edge on one of the encoder pins is detected. - static uint32_t last_change[NUM_ENCS * 2] = {0}; static GPIO_PinState last_state[NUM_ENCS * 2] = {GPIO_PIN_RESET}; if (GPIO_Pin == ENC2B_Pin) { @@ -48,8 +47,6 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) { // ENC2A, we can just ignore it now. } - uint32_t now = HAL_GetTick(); - uint16_t pin_a, pin_b; int idx_a, idx_b; ButtonMessage msg; @@ -79,14 +76,10 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin) { // Second rising edge, direction depends on which pin changed last if (a_changed && b_changed) { // This shouldn't happen. Ignore this event. - last_change[idx_a] = now; - last_change[idx_b] = now; return; } else if (a_changed) { - last_change[idx_a] = now; msg.kind = UMK_ENC_CCW; } else if (b_changed) { - last_change[idx_b] = now; msg.kind = UMK_ENC_CW; } else { // This shouldn't happen. Ignore this event. diff --git a/TouchGFX/gui/include/gui/containers/TireTemp.hpp b/TouchGFX/gui/include/gui/containers/TireTemp.hpp index bb0b730..142a179 100644 --- a/TouchGFX/gui/include/gui/containers/TireTemp.hpp +++ b/TouchGFX/gui/include/gui/containers/TireTemp.hpp @@ -15,7 +15,7 @@ public: protected: private: - unsigned temp; + int temp; Unicode::UnicodeChar valueBuffer[3]; void updateValueBuffer(); diff --git a/TouchGFX/gui/src/containers/TireTemp.cpp b/TouchGFX/gui/src/containers/TireTemp.cpp index 2cf5b80..d7e6496 100644 --- a/TouchGFX/gui/src/containers/TireTemp.cpp +++ b/TouchGFX/gui/src/containers/TireTemp.cpp @@ -36,7 +36,7 @@ void TireTemp::setTemp(int temp_in_celsius) { void TireTemp::updateValueBuffer() { // Unicode::utoa(temp, valueBuffer, 3, 10); Unicode::snprintf(valueBuffer, - sizeof(valueBuffer) / sizeof(Unicode::UnicodeChar), "%02u", + sizeof(valueBuffer) / sizeof(Unicode::UnicodeChar), "%02d", temp); value.setWildcard(valueBuffer); }