Fix warnings
This commit is contained in:
parent
73e878097e
commit
aba6604e57
|
@ -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 -----------------------------------------------------------*/
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit b2929ad66414b394805ee1d2b9c4778a2f9fe515
|
||||
Subproject commit 66983c30d398a41641b81a8050e11dfbcaecf6ed
|
|
@ -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.
|
||||
|
|
|
@ -15,7 +15,7 @@ public:
|
|||
|
||||
protected:
|
||||
private:
|
||||
unsigned temp;
|
||||
int temp;
|
||||
Unicode::UnicodeChar valueBuffer[3];
|
||||
|
||||
void updateValueBuffer();
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue