Broadcast button presses to CAN

This commit is contained in:
2023-04-11 21:32:14 +02:00
parent 7065cb455a
commit 30607718ac
4 changed files with 19 additions and 6 deletions

View File

@ -9,8 +9,8 @@ extern "C" {
#define NUM_BUTTONS 6
#define NUM_ENCS 2
#define BUTTON_MIN_PRESS_TIME 50 // ms
#define ENC_MAX_PHASE 50 // ms
#define BUTTON_MIN_INTERVAL 50 // ms
#define ENC_MAX_PHASE 50 // ms
typedef enum { UMK_BTN_RELEASED, UMK_ENC_CW, UMK_ENC_CCW } ButtonMessageKind;

View File

@ -5,6 +5,8 @@
#include "stw_defines.h"
#include "tx_port.h"
#include "stm32h7xx_hal.h"
#ifdef __cplusplus
extern "C" {
#endif
@ -108,6 +110,7 @@ void vehicle_thread_entry(ULONG hfdcan_addr);
void vehicle_select_mission(Mission mission);
void vehicle_broadcast_param(ParamType param, int32_t value);
void vehicle_broadcast_buttons(GPIO_PinState *button_states);
#ifdef __cplusplus
}