Add Transponder to SPF3MINI // Autoconfig adjustment

This commit is contained in:
borisbstyle 2016-03-01 22:46:18 +01:00
parent 16ca4ff16e
commit fb64fc32c5
5 changed files with 17 additions and 1 deletions

View File

@ -42,7 +42,8 @@ typedef enum {
FEATURE_DISPLAY = 1 << 17,
FEATURE_ONESHOT125 = 1 << 18,
FEATURE_BLACKBOX = 1 << 19,
FEATURE_CHANNEL_FORWARDING = 1 << 20
FEATURE_CHANNEL_FORWARDING = 1 << 20,
FEATURE_TRANSPONDER = 1 << 21,
} features_e;
void handleOneshotFeatureChangeOnRestart(void);

View File

@ -123,7 +123,11 @@ void setGyroSamplingSpeed(uint16_t looptime) {
masterConfig.mag_hardware = 1;
masterConfig.pid_process_denom = 2;
} else if (looptime < 375) {
#if defined(LUX_RACE) || defined(COLIBRI_RACE) || defined(MOTOLAB) || defined(ALIENFLIGHTF3)
masterConfig.acc_hardware = 0;
#else
masterConfig.acc_hardware = 1;
#endif
masterConfig.baro_hardware = 1;
masterConfig.mag_hardware = 1;
masterConfig.pid_process_denom = 2;

View File

@ -147,6 +147,7 @@ typedef enum {
SYSTEM_STATE_CONFIG_LOADED = (1 << 0),
SYSTEM_STATE_SENSORS_READY = (1 << 1),
SYSTEM_STATE_MOTORS_READY = (1 << 2),
SYSTEM_STATE_TRANSPONDER_ENABLED = (1 << 3),
SYSTEM_STATE_READY = (1 << 7)
} systemState_e;

View File

@ -941,3 +941,12 @@ void taskLedStrip(void)
}
}
#endif
#ifdef TRANSPONDER
void taskTransponder(void)
{
if (feature(FEATURE_TRANSPONDER)) {
updateTransponder();
}
}
#endif

View File

@ -191,6 +191,7 @@
#define WS2811_DMA_TC_FLAG DMA1_FLAG_TC2
#define WS2811_DMA_HANDLER_IDENTIFER DMA1_CH2_HANDLER
#define TRANSPONDER
#define TRANSPONDER_GPIO GPIOA
#define TRANSPONDER_GPIO_AHB_PERIPHERAL RCC_AHBPeriph_GPIOA