mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
39 lines
863 B
C
39 lines
863 B
C
#pragma once
|
|
|
|
typedef enum rc_alias {
|
|
ROLL = 0,
|
|
PITCH,
|
|
YAW,
|
|
THROTTLE,
|
|
AUX1,
|
|
AUX2,
|
|
AUX3,
|
|
AUX4
|
|
} rc_alias_e;
|
|
|
|
#define ROL_LO (1 << (2 * ROLL))
|
|
#define ROL_CE (3 << (2 * ROLL))
|
|
#define ROL_HI (2 << (2 * ROLL))
|
|
#define PIT_LO (1 << (2 * PITCH))
|
|
#define PIT_CE (3 << (2 * PITCH))
|
|
#define PIT_HI (2 << (2 * PITCH))
|
|
#define YAW_LO (1 << (2 * YAW))
|
|
#define YAW_CE (3 << (2 * YAW))
|
|
#define YAW_HI (2 << (2 * YAW))
|
|
#define THR_LO (1 << (2 * THROTTLE))
|
|
#define THR_CE (3 << (2 * THROTTLE))
|
|
#define THR_HI (2 << (2 * THROTTLE))
|
|
|
|
typedef struct controlRateConfig_s {
|
|
uint8_t rcRate8;
|
|
uint8_t rcExpo8;
|
|
uint8_t thrMid8;
|
|
uint8_t thrExpo8;
|
|
uint8_t rollPitchRate;
|
|
uint8_t yawRate;
|
|
} controlRateConfig_t;
|
|
|
|
extern int16_t rcCommand[4];
|
|
|
|
bool areSticksInApModePosition(uint16_t ap_mode);
|
|
|