Fix warnings
This commit is contained in:
		@ -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 -----------------------------------------------------------*/
 | 
			
		||||
 | 
			
		||||
 Submodule Core/Lib/can-halal updated: b2929ad664...66983c30d3
									
								
							@ -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);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user