Change screens if both left and right are pressed

This commit is contained in:
2023-04-11 21:53:36 +02:00
parent 78c3c38988
commit fe58a68b96
12 changed files with 59 additions and 36 deletions

View File

@ -47,6 +47,8 @@ extern TX_EVENT_FLAGS_GROUP gui_update_events;
extern FDCAN_HandleTypeDef hfdcan1;
#define GUI_UPDATE_VEHICLE_STATE (1 << 0)
#define GUI_UPDATE_NEXT_SCREEN (1 << 1)
#define GUI_UPDATE_ALL (GUI_UPDATE_VEHICLE_STATE | GUI_UPDATE_NEXT_SCREEN)
/* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/

View File

@ -12,7 +12,7 @@ extern "C" {
#define BUTTON_MIN_INTERVAL 50 // ms
#define ENC_MAX_PHASE 50 // ms
typedef enum { UMK_BTN_RELEASED, UMK_ENC_CW, UMK_ENC_CCW } ButtonMessageKind;
typedef enum { UMK_BTN_PRESSED, UMK_ENC_CW, UMK_ENC_CCW } ButtonMessageKind;
typedef struct {
ButtonMessageKind kind;