push origin development
This commit is contained in:
commit
e57ed066bc
17
Makefile
17
Makefile
|
@ -663,15 +663,14 @@ $(OBJECT_DIR)/$(TARGET)/%.o: %.S
|
||||||
@$(CC) -c -o $@ $(ASFLAGS) $<
|
@$(CC) -c -o $@ $(ASFLAGS) $<
|
||||||
|
|
||||||
|
|
||||||
## all : default task; compile C code, build firmware
|
## all : Build all valid targets
|
||||||
all:
|
all: $(VALID_TARGETS)
|
||||||
for build_target in $(VALID_TARGETS); do \
|
|
||||||
|
$(VALID_TARGETS):
|
||||||
echo "" && \
|
echo "" && \
|
||||||
echo "Building $$build_target" && \
|
echo "Building $@" && \
|
||||||
$(MAKE) -j binary hex TARGET=$$build_target || \
|
$(MAKE) -j binary hex TARGET=$@ && \
|
||||||
break; \
|
echo "Building $@ succeeded."
|
||||||
echo "Building $$build_target succeeded."; \
|
|
||||||
done
|
|
||||||
|
|
||||||
## clean : clean up all temporary / machine-generated files
|
## clean : clean up all temporary / machine-generated files
|
||||||
clean:
|
clean:
|
||||||
|
@ -730,6 +729,8 @@ help: Makefile
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "Usage:"
|
@echo "Usage:"
|
||||||
@echo " make [TARGET=<target>] [OPTIONS=\"<options>\"]"
|
@echo " make [TARGET=<target>] [OPTIONS=\"<options>\"]"
|
||||||
|
@echo "Or:"
|
||||||
|
@echo " make <target> [OPTIONS=\"<options>\"]"
|
||||||
@echo ""
|
@echo ""
|
||||||
@echo "Valid TARGET values are: $(VALID_TARGETS)"
|
@echo "Valid TARGET values are: $(VALID_TARGETS)"
|
||||||
@echo ""
|
@echo ""
|
||||||
|
|
|
@ -49,7 +49,6 @@ void bmp085_extiHandler(extiCallbackRec_t* cb)
|
||||||
isConversionComplete = true;
|
isConversionComplete = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static extiCallbackRec_t bmp085_extiCallbackRec;
|
|
||||||
bool bmp085TestEOCConnected(const bmp085Config_t *config);
|
bool bmp085TestEOCConnected(const bmp085Config_t *config);
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ static const uint32_t channelArray[RTC6705_BAND_MAX][RTC6705_CHANNEL_MAX] = {
|
||||||
* Send a command and return if good
|
* Send a command and return if good
|
||||||
* TODO chip detect
|
* TODO chip detect
|
||||||
*/
|
*/
|
||||||
static bool rtc6705IsReady()
|
static bool rtc6705IsReady(void)
|
||||||
{
|
{
|
||||||
// Sleep a little bit to make sure it has booted
|
// Sleep a little bit to make sure it has booted
|
||||||
delay(50);
|
delay(50);
|
||||||
|
@ -115,7 +115,8 @@ static bool rtc6705IsReady()
|
||||||
* This is easier for when generating the frequency to then
|
* This is easier for when generating the frequency to then
|
||||||
* reverse the bits afterwards
|
* reverse the bits afterwards
|
||||||
*/
|
*/
|
||||||
static uint32_t reverse32(uint32_t in) {
|
static uint32_t reverse32(uint32_t in)
|
||||||
|
{
|
||||||
uint32_t out = 0;
|
uint32_t out = 0;
|
||||||
|
|
||||||
for (uint8_t i = 0 ; i < 32 ; i++)
|
for (uint8_t i = 0 ; i < 32 ; i++)
|
||||||
|
@ -129,7 +130,7 @@ static uint32_t reverse32(uint32_t in) {
|
||||||
/**
|
/**
|
||||||
* Start chip if available
|
* Start chip if available
|
||||||
*/
|
*/
|
||||||
bool rtc6705Init()
|
bool rtc6705Init(void)
|
||||||
{
|
{
|
||||||
DISABLE_RTC6705;
|
DISABLE_RTC6705;
|
||||||
spiSetDivisor(RTC6705_SPI_INSTANCE, SPI_0_5625MHZ_CLOCK_DIVIDER);
|
spiSetDivisor(RTC6705_SPI_INSTANCE, SPI_0_5625MHZ_CLOCK_DIVIDER);
|
||||||
|
|
|
@ -33,6 +33,6 @@
|
||||||
#define RTC6705_FREQ_MIN 5600
|
#define RTC6705_FREQ_MIN 5600
|
||||||
#define RTC6705_FREQ_MAX 5950
|
#define RTC6705_FREQ_MAX 5950
|
||||||
|
|
||||||
bool rtc6705Init();
|
bool rtc6705Init(void);
|
||||||
void rtc6705SetChannel(uint8_t band, uint8_t channel);
|
void rtc6705SetChannel(uint8_t band, uint8_t channel);
|
||||||
void rtc6705SetFreq(uint16_t freq);
|
void rtc6705SetFreq(uint16_t freq);
|
||||||
|
|
|
@ -194,7 +194,11 @@ serialPort_t *findNextSharedSerialPort(uint16_t functionMask, serialPortFunction
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef TELEMETRY
|
||||||
|
#define ALL_TELEMETRY_FUNCTIONS_MASK (TELEMETRY_SHAREABLE_PORT_FUNCTIONS_MASK | FUNCTION_TELEMETRY_HOTT | FUNCTION_TELEMETRY_SMARTPORT)
|
||||||
|
#else
|
||||||
#define ALL_TELEMETRY_FUNCTIONS_MASK (FUNCTION_TELEMETRY_FRSKY | FUNCTION_TELEMETRY_HOTT | FUNCTION_TELEMETRY_SMARTPORT | FUNCTION_TELEMETRY_LTM)
|
#define ALL_TELEMETRY_FUNCTIONS_MASK (FUNCTION_TELEMETRY_FRSKY | FUNCTION_TELEMETRY_HOTT | FUNCTION_TELEMETRY_SMARTPORT | FUNCTION_TELEMETRY_LTM)
|
||||||
|
#endif
|
||||||
#define ALL_FUNCTIONS_SHARABLE_WITH_MSP (FUNCTION_BLACKBOX | ALL_TELEMETRY_FUNCTIONS_MASK)
|
#define ALL_FUNCTIONS_SHARABLE_WITH_MSP (FUNCTION_BLACKBOX | ALL_TELEMETRY_FUNCTIONS_MASK)
|
||||||
|
|
||||||
bool isSerialConfigValid(serialConfig_t *serialConfigToCheck)
|
bool isSerialConfigValid(serialConfig_t *serialConfigToCheck)
|
||||||
|
@ -203,7 +207,8 @@ bool isSerialConfigValid(serialConfig_t *serialConfigToCheck)
|
||||||
/*
|
/*
|
||||||
* rules:
|
* rules:
|
||||||
* - 1 MSP port minimum, max MSP ports is defined and must be adhered to.
|
* - 1 MSP port minimum, max MSP ports is defined and must be adhered to.
|
||||||
* - Only MSP is allowed to be shared with EITHER any telemetry OR blackbox.
|
* - MSP is allowed to be shared with EITHER any telemetry OR blackbox.
|
||||||
|
* - serial RX and FrSky / LTM telemetry can be shared
|
||||||
* - No other sharing combinations are valid.
|
* - No other sharing combinations are valid.
|
||||||
*/
|
*/
|
||||||
uint8_t mspPortCount = 0;
|
uint8_t mspPortCount = 0;
|
||||||
|
@ -223,12 +228,14 @@ bool isSerialConfigValid(serialConfig_t *serialConfigToCheck)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(portConfig->functionMask & FUNCTION_MSP)) {
|
if ((portConfig->functionMask & FUNCTION_MSP) && (portConfig->functionMask & ALL_FUNCTIONS_SHARABLE_WITH_MSP)) {
|
||||||
return false;
|
// MSP & telemetry
|
||||||
}
|
#ifdef TELEMETRY
|
||||||
|
} else if (telemetryCheckRxPortShared(portConfig)) {
|
||||||
if (!(portConfig->functionMask & ALL_FUNCTIONS_SHARABLE_WITH_MSP)) {
|
// serial RX & telemetry
|
||||||
// some other bit must have been set.
|
#endif
|
||||||
|
} else {
|
||||||
|
// some other combination
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,8 @@
|
||||||
#include "drivers/timer.h"
|
#include "drivers/timer.h"
|
||||||
#include "drivers/pwm_rx.h"
|
#include "drivers/pwm_rx.h"
|
||||||
#include "drivers/serial.h"
|
#include "drivers/serial.h"
|
||||||
|
#include "drivers/vtx_rtc6705.h"
|
||||||
|
|
||||||
|
|
||||||
#include "sensors/sensors.h"
|
#include "sensors/sensors.h"
|
||||||
#include "sensors/gyro.h"
|
#include "sensors/gyro.h"
|
||||||
|
@ -72,7 +74,7 @@
|
||||||
|
|
||||||
static uint8_t locked = 0;
|
static uint8_t locked = 0;
|
||||||
|
|
||||||
void vtxInit()
|
void vtxInit(void)
|
||||||
{
|
{
|
||||||
rtc6705Init();
|
rtc6705Init();
|
||||||
if (masterConfig.vtx_mode == 0) {
|
if (masterConfig.vtx_mode == 0) {
|
||||||
|
@ -100,27 +102,27 @@ static void setChannelSaveAndNotify(uint8_t *bandOrChannel, uint8_t step, int32_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void vtxIncrementBand()
|
void vtxIncrementBand(void)
|
||||||
{
|
{
|
||||||
setChannelSaveAndNotify(&(masterConfig.vtx_band), 1, RTC6705_BAND_MIN, RTC6705_BAND_MAX);
|
setChannelSaveAndNotify(&(masterConfig.vtx_band), 1, RTC6705_BAND_MIN, RTC6705_BAND_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vtxDecrementBand()
|
void vtxDecrementBand(void)
|
||||||
{
|
{
|
||||||
setChannelSaveAndNotify(&(masterConfig.vtx_band), -1, RTC6705_BAND_MIN, RTC6705_BAND_MAX);
|
setChannelSaveAndNotify(&(masterConfig.vtx_band), -1, RTC6705_BAND_MIN, RTC6705_BAND_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vtxIncrementChannel()
|
void vtxIncrementChannel(void)
|
||||||
{
|
{
|
||||||
setChannelSaveAndNotify(&(masterConfig.vtx_channel), 1, RTC6705_CHANNEL_MIN, RTC6705_CHANNEL_MAX);
|
setChannelSaveAndNotify(&(masterConfig.vtx_channel), 1, RTC6705_CHANNEL_MIN, RTC6705_CHANNEL_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vtxDecrementChannel()
|
void vtxDecrementChannel(void)
|
||||||
{
|
{
|
||||||
setChannelSaveAndNotify(&(masterConfig.vtx_channel), -1, RTC6705_CHANNEL_MIN, RTC6705_CHANNEL_MAX);
|
setChannelSaveAndNotify(&(masterConfig.vtx_channel), -1, RTC6705_CHANNEL_MIN, RTC6705_CHANNEL_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
void vtxUpdateActivatedChannel()
|
void vtxUpdateActivatedChannel(void)
|
||||||
{
|
{
|
||||||
if (ARMING_FLAG(ARMED)) {
|
if (ARMING_FLAG(ARMED)) {
|
||||||
locked = 1;
|
locked = 1;
|
||||||
|
@ -143,4 +145,5 @@ void vtxUpdateActivatedChannel()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -17,8 +17,6 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "drivers/vtx_rtc6705.h"
|
|
||||||
|
|
||||||
#define VTX_BAND_MIN 1
|
#define VTX_BAND_MIN 1
|
||||||
#define VTX_BAND_MAX 5
|
#define VTX_BAND_MAX 5
|
||||||
#define VTX_CHANNEL_MIN 1
|
#define VTX_CHANNEL_MIN 1
|
||||||
|
@ -32,9 +30,10 @@ typedef struct vtxChannelActivationCondition_s {
|
||||||
channelRange_t range;
|
channelRange_t range;
|
||||||
} vtxChannelActivationCondition_t;
|
} vtxChannelActivationCondition_t;
|
||||||
|
|
||||||
void vtxInit();
|
void vtxInit(void);
|
||||||
void vtxIncrementBand();
|
void vtxIncrementBand(void);
|
||||||
void vtxDecrementBand();
|
void vtxDecrementBand(void);
|
||||||
void vtxIncrementChannel();
|
void vtxIncrementChannel(void);
|
||||||
void vtxDecrementChannel();
|
void vtxDecrementChannel(void);
|
||||||
void vtxUpdateActivatedChannel();
|
void vtxUpdateActivatedChannel(void);
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,10 @@
|
||||||
#include "drivers/serial_uart.h"
|
#include "drivers/serial_uart.h"
|
||||||
#include "io/serial.h"
|
#include "io/serial.h"
|
||||||
|
|
||||||
|
#ifdef TELEMETRY
|
||||||
|
#include "telemetry/telemetry.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "rx/rx.h"
|
#include "rx/rx.h"
|
||||||
#include "rx/ibus.h"
|
#include "rx/ibus.h"
|
||||||
|
|
||||||
|
@ -64,7 +68,19 @@ bool ibusInit(rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig, rcReadRa
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
serialPort_t *ibusPort = openSerialPort(portConfig->identifier, FUNCTION_RX_SERIAL, ibusDataReceive, IBUS_BAUDRATE, MODE_RX, SERIAL_NOT_INVERTED);
|
#ifdef TELEMETRY
|
||||||
|
bool portShared = telemetryCheckRxPortShared(portConfig);
|
||||||
|
#else
|
||||||
|
bool portShared = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
serialPort_t *ibusPort = openSerialPort(portConfig->identifier, FUNCTION_RX_SERIAL, ibusDataReceive, IBUS_BAUDRATE, portShared ? MODE_RXTX : MODE_RX, SERIAL_NOT_INVERTED);
|
||||||
|
|
||||||
|
#ifdef TELEMETRY
|
||||||
|
if (portShared) {
|
||||||
|
telemetrySharedPort = ibusPort;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return ibusPort != NULL;
|
return ibusPort != NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,9 @@
|
||||||
#include "drivers/serial_uart.h"
|
#include "drivers/serial_uart.h"
|
||||||
#include "io/serial.h"
|
#include "io/serial.h"
|
||||||
|
|
||||||
|
#ifdef TELEMETRY
|
||||||
|
#include "telemetry/telemetry.h"
|
||||||
|
#endif
|
||||||
#include "rx/rx.h"
|
#include "rx/rx.h"
|
||||||
#include "rx/sbus.h"
|
#include "rx/sbus.h"
|
||||||
|
|
||||||
|
@ -95,8 +98,20 @@ bool sbusInit(rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig, rcReadRa
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef TELEMETRY
|
||||||
|
bool portShared = telemetryCheckRxPortShared(portConfig);
|
||||||
|
#else
|
||||||
|
bool portShared = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
portOptions_t options = (rxConfig->sbus_inversion) ? (SBUS_PORT_OPTIONS | SERIAL_INVERTED) : SBUS_PORT_OPTIONS;
|
portOptions_t options = (rxConfig->sbus_inversion) ? (SBUS_PORT_OPTIONS | SERIAL_INVERTED) : SBUS_PORT_OPTIONS;
|
||||||
serialPort_t *sBusPort = openSerialPort(portConfig->identifier, FUNCTION_RX_SERIAL, sbusDataReceive, SBUS_BAUDRATE, MODE_RX, options);
|
serialPort_t *sBusPort = openSerialPort(portConfig->identifier, FUNCTION_RX_SERIAL, sbusDataReceive, SBUS_BAUDRATE, portShared ? MODE_RXTX : MODE_RX, options);
|
||||||
|
|
||||||
|
#ifdef TELEMETRY
|
||||||
|
if (portShared) {
|
||||||
|
telemetrySharedPort = sBusPort;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return sBusPort != NULL;
|
return sBusPort != NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -34,6 +34,10 @@
|
||||||
|
|
||||||
#include "config/config.h"
|
#include "config/config.h"
|
||||||
|
|
||||||
|
#ifdef TELEMETRY
|
||||||
|
#include "telemetry/telemetry.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "rx/rx.h"
|
#include "rx/rx.h"
|
||||||
#include "rx/spektrum.h"
|
#include "rx/spektrum.h"
|
||||||
|
|
||||||
|
@ -95,7 +99,19 @@ bool spektrumInit(rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig, rcRe
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
serialPort_t *spektrumPort = openSerialPort(portConfig->identifier, FUNCTION_RX_SERIAL, spektrumDataReceive, SPEKTRUM_BAUDRATE, MODE_RX, SERIAL_NOT_INVERTED);
|
#ifdef TELEMETRY
|
||||||
|
bool portShared = telemetryCheckRxPortShared(portConfig);
|
||||||
|
#else
|
||||||
|
bool portShared = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
serialPort_t *spektrumPort = openSerialPort(portConfig->identifier, FUNCTION_RX_SERIAL, spektrumDataReceive, SPEKTRUM_BAUDRATE, portShared ? MODE_RXTX : MODE_RX, SERIAL_NOT_INVERTED);
|
||||||
|
|
||||||
|
#ifdef TELEMETRY
|
||||||
|
if (portShared) {
|
||||||
|
telemetrySharedPort = spektrumPort;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return spektrumPort != NULL;
|
return spektrumPort != NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,10 @@
|
||||||
#include "drivers/serial_uart.h"
|
#include "drivers/serial_uart.h"
|
||||||
#include "io/serial.h"
|
#include "io/serial.h"
|
||||||
|
|
||||||
|
#ifdef TELEMETRY
|
||||||
|
#include "telemetry/telemetry.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "rx/rx.h"
|
#include "rx/rx.h"
|
||||||
#include "rx/sumd.h"
|
#include "rx/sumd.h"
|
||||||
|
|
||||||
|
@ -63,7 +67,19 @@ bool sumdInit(rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig, rcReadRa
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
serialPort_t *sumdPort = openSerialPort(portConfig->identifier, FUNCTION_RX_SERIAL, sumdDataReceive, SUMD_BAUDRATE, MODE_RX, SERIAL_NOT_INVERTED);
|
#ifdef TELEMETRY
|
||||||
|
bool portShared = telemetryCheckRxPortShared(portConfig);
|
||||||
|
#else
|
||||||
|
bool portShared = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
serialPort_t *sumdPort = openSerialPort(portConfig->identifier, FUNCTION_RX_SERIAL, sumdDataReceive, SUMD_BAUDRATE, portShared ? MODE_RXTX : MODE_RX, SERIAL_NOT_INVERTED);
|
||||||
|
|
||||||
|
#ifdef TELEMETRY
|
||||||
|
if (portShared) {
|
||||||
|
telemetrySharedPort = sumdPort;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return sumdPort != NULL;
|
return sumdPort != NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,10 @@
|
||||||
#include "drivers/serial_uart.h"
|
#include "drivers/serial_uart.h"
|
||||||
#include "io/serial.h"
|
#include "io/serial.h"
|
||||||
|
|
||||||
|
#ifdef TELEMETRY
|
||||||
|
#include "telemetry/telemetry.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "rx/rx.h"
|
#include "rx/rx.h"
|
||||||
#include "rx/sumh.h"
|
#include "rx/sumh.h"
|
||||||
|
|
||||||
|
@ -75,7 +79,19 @@ bool sumhInit(rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig, rcReadRa
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
sumhPort = openSerialPort(portConfig->identifier, FUNCTION_RX_SERIAL, sumhDataReceive, SUMH_BAUDRATE, MODE_RX, SERIAL_NOT_INVERTED);
|
#ifdef TELEMETRY
|
||||||
|
bool portShared = telemetryCheckRxPortShared(portConfig);
|
||||||
|
#else
|
||||||
|
bool portShared = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
sumhPort = openSerialPort(portConfig->identifier, FUNCTION_RX_SERIAL, sumhDataReceive, SUMH_BAUDRATE, portShared ? MODE_RXTX : MODE_RX, SERIAL_NOT_INVERTED);
|
||||||
|
|
||||||
|
#ifdef TELEMETRY
|
||||||
|
if (portShared) {
|
||||||
|
telemetrySharedPort = sumhPort;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return sumhPort != NULL;
|
return sumhPort != NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,10 @@
|
||||||
#include "drivers/serial_uart.h"
|
#include "drivers/serial_uart.h"
|
||||||
#include "io/serial.h"
|
#include "io/serial.h"
|
||||||
|
|
||||||
|
#ifdef TELEMETRY
|
||||||
|
#include "telemetry/telemetry.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "rx/rx.h"
|
#include "rx/rx.h"
|
||||||
#include "rx/xbus.h"
|
#include "rx/xbus.h"
|
||||||
|
|
||||||
|
@ -123,7 +127,19 @@ bool xBusInit(rxConfig_t *rxConfig, rxRuntimeConfig_t *rxRuntimeConfig, rcReadRa
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
serialPort_t *xBusPort = openSerialPort(portConfig->identifier, FUNCTION_RX_SERIAL, xBusDataReceive, baudRate, MODE_RX, SERIAL_NOT_INVERTED);
|
#ifdef TELEMETRY
|
||||||
|
bool portShared = telemetryCheckRxPortShared(portConfig);
|
||||||
|
#else
|
||||||
|
bool portShared = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
serialPort_t *xBusPort = openSerialPort(portConfig->identifier, FUNCTION_RX_SERIAL, xBusDataReceive, baudRate, portShared ? MODE_RXTX : MODE_RX, SERIAL_NOT_INVERTED);
|
||||||
|
|
||||||
|
#ifdef TELEMETRY
|
||||||
|
if (portShared) {
|
||||||
|
telemetrySharedPort = xBusPort;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return xBusPort != NULL;
|
return xBusPort != NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,7 @@ const sonarHardware_t *sonarGetHardwareConfiguration(batteryConfig_t *batteryCon
|
||||||
return &sonarHardware;
|
return &sonarHardware;
|
||||||
|
|
||||||
// TODO - move sonar pin selection to CLI
|
// TODO - move sonar pin selection to CLI
|
||||||
#elif defined(SPRACINGF3) || defined(SPRACINGF3MINI) || defined(FURYF3)
|
#elif defined(SPRACINGF3) || defined(SPRACINGF3MINI) || defined(FURYF3) || defined(RMDO)
|
||||||
UNUSED(batteryConfig);
|
UNUSED(batteryConfig);
|
||||||
static const sonarHardware_t const sonarHardware = {
|
static const sonarHardware_t const sonarHardware = {
|
||||||
.trigger_pin = Pin_0, // RC_CH7 (PB0) - only 3.3v ( add a 1K Ohms resistor )
|
.trigger_pin = Pin_0, // RC_CH7 (PB0) - only 3.3v ( add a 1K Ohms resistor )
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
F3_TARGETS += $(TARGET)
|
||||||
FEATURES = VCP
|
FEATURES = VCP
|
||||||
F3_TARGETS += $(TARGET)
|
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_mpu.c \
|
drivers/accgyro_mpu.c \
|
||||||
|
@ -9,4 +9,5 @@ TARGET_SRC = \
|
||||||
drivers/accgyro_spi_mpu6500.c \
|
drivers/accgyro_spi_mpu6500.c \
|
||||||
drivers/compass_ak8963.c \
|
drivers/compass_ak8963.c \
|
||||||
hardware_revision.c \
|
hardware_revision.c \
|
||||||
drivers/sonar_hcsr04.c
|
drivers/sonar_hcsr04.c
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
F405_TARGETS += $(TARGET)
|
F405_TARGETS += $(TARGET)
|
||||||
FEATURES += SDCARD VCP
|
FEATURES += SDCARD VCP
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_mpu6500.c \
|
drivers/accgyro_mpu6500.c \
|
||||||
|
@ -10,4 +10,5 @@ TARGET_SRC = \
|
||||||
drivers/compass_ak8963.c \
|
drivers/compass_ak8963.c \
|
||||||
drivers/compass_hmc5883l.c \
|
drivers/compass_hmc5883l.c \
|
||||||
drivers/light_ws2811strip.c \
|
drivers/light_ws2811strip.c \
|
||||||
drivers/light_ws2811strip_stm32f4xx.c
|
drivers/light_ws2811strip_stm32f4xx.c
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
F405_TARGETS += $(TARGET)
|
F405_TARGETS += $(TARGET)
|
||||||
FEATURES += SDCARD VCP
|
FEATURES += SDCARD VCP
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_spi_mpu6500.c \
|
drivers/accgyro_spi_mpu6500.c \
|
||||||
drivers/accgyro_mpu6500.c \
|
drivers/accgyro_mpu6500.c \
|
||||||
drivers/barometer_ms5611.c
|
drivers/barometer_ms5611.c
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
FEATURES = ONBOARDFLASH HIGHEND VCP
|
|
||||||
F1_TARGETS += $(TARGET)
|
F1_TARGETS += $(TARGET)
|
||||||
|
FEATURES = ONBOARDFLASH HIGHEND VCP
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_mpu.c \
|
drivers/accgyro_mpu.c \
|
||||||
|
@ -10,4 +10,5 @@ TARGET_SRC = \
|
||||||
drivers/compass_hmc5883l.c \
|
drivers/compass_hmc5883l.c \
|
||||||
drivers/light_ws2811strip.c \
|
drivers/light_ws2811strip.c \
|
||||||
drivers/light_ws2811strip_stm32f10x.c \
|
drivers/light_ws2811strip_stm32f10x.c \
|
||||||
drivers/sonar_hcsr04.c
|
drivers/sonar_hcsr04.c
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
F3_TARGETS += $(TARGET)
|
||||||
FEATURES = VCP SDCARD
|
FEATURES = VCP SDCARD
|
||||||
F3_TARGETS += $(TARGET)
|
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/light_ws2811strip.c \
|
drivers/light_ws2811strip.c \
|
||||||
|
@ -15,4 +15,5 @@ TARGET_SRC = \
|
||||||
drivers/accgyro_l3g4200d.c \
|
drivers/accgyro_l3g4200d.c \
|
||||||
drivers/barometer_ms5611.c \
|
drivers/barometer_ms5611.c \
|
||||||
drivers/barometer_bmp280.c \
|
drivers/barometer_bmp280.c \
|
||||||
drivers/compass_ak8975.c
|
drivers/compass_ak8975.c
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
FLASH_SIZE = 64
|
F1_TARGETS += $(TARGET)
|
||||||
F1_TARGETS += $(TARGET)
|
FLASH_SIZE = 64
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_mpu.c \
|
drivers/accgyro_mpu.c \
|
||||||
|
@ -8,4 +8,5 @@ TARGET_SRC = \
|
||||||
hardware_revision.c \
|
hardware_revision.c \
|
||||||
flight/gtune.c \
|
flight/gtune.c \
|
||||||
blackbox/blackbox.c \
|
blackbox/blackbox.c \
|
||||||
blackbox/blackbox_io.c
|
blackbox/blackbox_io.c
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
FEATURES = VCP
|
|
||||||
F3_TARGETS += $(TARGET)
|
F3_TARGETS += $(TARGET)
|
||||||
|
FEATURES = VCP
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
io/i2c_bst.c \
|
io/i2c_bst.c \
|
||||||
|
@ -14,4 +14,5 @@ TARGET_SRC = \
|
||||||
drivers/compass_ak8975.c \
|
drivers/compass_ak8975.c \
|
||||||
drivers/compass_hmc5883l.c \
|
drivers/compass_hmc5883l.c \
|
||||||
drivers/light_ws2811strip.c \
|
drivers/light_ws2811strip.c \
|
||||||
drivers/light_ws2811strip_stm32f30x.c
|
drivers/light_ws2811strip_stm32f30x.c
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
FEATURES = VCP
|
|
||||||
F3_TARGETS += $(TARGET)
|
F3_TARGETS += $(TARGET)
|
||||||
|
FEATURES = VCP
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_mpu.c \
|
drivers/accgyro_mpu.c \
|
||||||
|
@ -8,8 +8,5 @@ TARGET_SRC = \
|
||||||
drivers/barometer_bmp280.c \
|
drivers/barometer_bmp280.c \
|
||||||
drivers/barometer_spi_bmp280.c \
|
drivers/barometer_spi_bmp280.c \
|
||||||
drivers/light_ws2811strip.c \
|
drivers/light_ws2811strip.c \
|
||||||
drivers/light_ws2811strip_stm32f30x.c
|
drivers/light_ws2811strip_stm32f30x.c
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -72,19 +72,19 @@ const uint16_t airPWM[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
||||||
{ TIM2, GPIOA, Pin_0, TIM_Channel_1, TIM2_IRQn, 0, Mode_IPD}, // PWM1 - RC1
|
{ TIM2, GPIOA, Pin_0, TIM_Channel_1, TIM2_IRQn, 0, Mode_IPD, 0 }, // PWM1 - RC1
|
||||||
{ TIM2, GPIOA, Pin_1, TIM_Channel_2, TIM2_IRQn, 0, Mode_IPD}, // PWM2 - RC2
|
{ TIM2, GPIOA, Pin_1, TIM_Channel_2, TIM2_IRQn, 0, Mode_IPD, 0 }, // PWM2 - RC2
|
||||||
{ TIM2, GPIOA, Pin_2, TIM_Channel_3, TIM2_IRQn, 0, Mode_IPD}, // PWM3 - RC3
|
{ TIM2, GPIOA, Pin_2, TIM_Channel_3, TIM2_IRQn, 0, Mode_IPD, 0 }, // PWM3 - RC3
|
||||||
{ TIM2, GPIOA, Pin_3, TIM_Channel_4, TIM2_IRQn, 0, Mode_IPD}, // PWM4 - RC4
|
{ TIM2, GPIOA, Pin_3, TIM_Channel_4, TIM2_IRQn, 0, Mode_IPD, 0 }, // PWM4 - RC4
|
||||||
{ TIM3, GPIOA, Pin_6, TIM_Channel_1, TIM3_IRQn, 0, Mode_IPD}, // PWM5 - RC5
|
{ TIM3, GPIOA, Pin_6, TIM_Channel_1, TIM3_IRQn, 0, Mode_IPD, 0 }, // PWM5 - RC5
|
||||||
{ TIM3, GPIOA, Pin_7, TIM_Channel_2, TIM3_IRQn, 0, Mode_IPD}, // PWM6 - RC6
|
{ TIM3, GPIOA, Pin_7, TIM_Channel_2, TIM3_IRQn, 0, Mode_IPD, 0 }, // PWM6 - RC6
|
||||||
{ TIM3, GPIOB, Pin_0, TIM_Channel_3, TIM3_IRQn, 0, Mode_IPD}, // PWM7 - RC7
|
{ TIM3, GPIOB, Pin_0, TIM_Channel_3, TIM3_IRQn, 0, Mode_IPD, 0 }, // PWM7 - RC7
|
||||||
{ TIM3, GPIOB, Pin_1, TIM_Channel_4, TIM3_IRQn, 0, Mode_IPD}, // PWM8 - RC8
|
{ TIM3, GPIOB, Pin_1, TIM_Channel_4, TIM3_IRQn, 0, Mode_IPD, 0 }, // PWM8 - RC8
|
||||||
{ TIM1, GPIOA, Pin_8, TIM_Channel_1, TIM1_CC_IRQn, 1, Mode_IPD}, // PWM9 - OUT1
|
{ TIM1, GPIOA, Pin_8, TIM_Channel_1, TIM1_CC_IRQn, 1, Mode_IPD, 0 }, // PWM9 - OUT1
|
||||||
{ TIM1, GPIOA, Pin_11, TIM_Channel_4, TIM1_CC_IRQn, 1, Mode_IPD}, // PWM10 - OUT2
|
{ TIM1, GPIOA, Pin_11, TIM_Channel_4, TIM1_CC_IRQn, 1, Mode_IPD, 0 }, // PWM10 - OUT2
|
||||||
{ TIM4, GPIOB, Pin_6, TIM_Channel_1, TIM4_IRQn, 0, Mode_IPD}, // PWM11 - OUT3
|
{ TIM4, GPIOB, Pin_6, TIM_Channel_1, TIM4_IRQn, 0, Mode_IPD, 0 }, // PWM11 - OUT3
|
||||||
{ TIM4, GPIOB, Pin_7, TIM_Channel_2, TIM4_IRQn, 0, Mode_IPD}, // PWM12 - OUT4
|
{ TIM4, GPIOB, Pin_7, TIM_Channel_2, TIM4_IRQn, 0, Mode_IPD, 0 }, // PWM12 - OUT4
|
||||||
{ TIM4, GPIOB, Pin_8, TIM_Channel_3, TIM4_IRQn, 0, Mode_IPD}, // PWM13 - OUT5
|
{ TIM4, GPIOB, Pin_8, TIM_Channel_3, TIM4_IRQn, 0, Mode_IPD, 0 }, // PWM13 - OUT5
|
||||||
{ TIM4, GPIOB, Pin_9, TIM_Channel_4, TIM4_IRQn, 0, Mode_IPD} // PWM14 - OUT6
|
{ TIM4, GPIOB, Pin_9, TIM_Channel_4, TIM4_IRQn, 0, Mode_IPD, 0 } // PWM14 - OUT6
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -27,12 +27,12 @@
|
||||||
|
|
||||||
#define USE_EXTI
|
#define USE_EXTI
|
||||||
#define MPU6000_CS_GPIO GPIOB
|
#define MPU6000_CS_GPIO GPIOB
|
||||||
#define MPU6000_CS_PIN GPIO_Pin_12
|
#define MPU6000_CS_PIN PB12
|
||||||
#define MPU6000_SPI_INSTANCE SPI2
|
#define MPU6000_SPI_INSTANCE SPI2
|
||||||
|
|
||||||
#define MPU6500_CS_GPIO_CLK_PERIPHERAL RCC_APB2Periph_GPIOB
|
#define MPU6500_CS_GPIO_CLK_PERIPHERAL RCC_APB2Periph_GPIOB
|
||||||
#define MPU6500_CS_GPIO GPIOB
|
#define MPU6500_CS_GPIO GPIOB
|
||||||
#define MPU6500_CS_PIN GPIO_Pin_12
|
#define MPU6500_CS_PIN PB12
|
||||||
#define MPU6500_SPI_INSTANCE SPI2
|
#define MPU6500_SPI_INSTANCE SPI2
|
||||||
|
|
||||||
#define GYRO
|
#define GYRO
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
#define EXTERNAL1_ADC_GPIO_PIN GPIO_Pin_5
|
#define EXTERNAL1_ADC_GPIO_PIN GPIO_Pin_5
|
||||||
#define EXTERNAL1_ADC_CHANNEL ADC_Channel_5
|
#define EXTERNAL1_ADC_CHANNEL ADC_Channel_5
|
||||||
|
|
||||||
#define LED_STRIP
|
//#define LED_STRIP
|
||||||
#define LED_STRIP_TIMER TIM3
|
#define LED_STRIP_TIMER TIM3
|
||||||
|
|
||||||
#define SPEKTRUM_BIND
|
#define SPEKTRUM_BIND
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
FEATURES = ONBOARDFLASH HIGHEND
|
|
||||||
F1_TARGETS += $(TARGET)
|
F1_TARGETS += $(TARGET)
|
||||||
|
FEATURES = ONBOARDFLASH HIGHEND
|
||||||
|
|
||||||
DEVICE_FLAGS = -DSTM32F10X_HD
|
DEVICE_FLAGS = -DSTM32F10X_HD
|
||||||
|
|
||||||
|
@ -21,3 +21,4 @@ TARGET_SRC = \
|
||||||
drivers/light_ws2811strip.c \
|
drivers/light_ws2811strip.c \
|
||||||
drivers/light_ws2811strip_stm32f10x.c \
|
drivers/light_ws2811strip_stm32f10x.c \
|
||||||
drivers/sonar_hcsr04.c
|
drivers/sonar_hcsr04.c
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
F3_TARGETS += $(TARGET)
|
||||||
FEATURES = VCP SDCARD ONBOARDFLASH
|
FEATURES = VCP SDCARD ONBOARDFLASH
|
||||||
F3_TARGETS += $(TARGET)
|
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_mpu.c \
|
drivers/accgyro_mpu.c \
|
||||||
|
@ -11,5 +11,5 @@ TARGET_SRC = \
|
||||||
drivers/light_ws2811strip.c \
|
drivers/light_ws2811strip.c \
|
||||||
drivers/light_ws2811strip_stm32f30x.c \
|
drivers/light_ws2811strip_stm32f30x.c \
|
||||||
drivers/sonar_hcsr04.c \
|
drivers/sonar_hcsr04.c \
|
||||||
drivers/serial_softserial.c
|
drivers/serial_softserial.c
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
F405_TARGETS += $(TARGET)
|
F405_TARGETS += $(TARGET)
|
||||||
FEATURES += SDCARD VCP
|
FEATURES += SDCARD VCP ONBOARDFLASH
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_spi_mpu6000.c \
|
drivers/accgyro_spi_mpu6000.c \
|
||||||
drivers/accgyro_spi_mpu6500.c \
|
drivers/accgyro_spi_mpu6500.c \
|
||||||
drivers/accgyro_mpu6500.c \
|
drivers/accgyro_mpu6500.c \
|
||||||
drivers/barometer_ms5611.c
|
drivers/barometer_ms5611.c
|
||||||
|
|
||||||
|
|
|
@ -81,25 +81,22 @@ const uint16_t airPWM[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
||||||
{ TIM2, GPIOA, Pin_0, TIM_Channel_1, TIM2_IRQn, 0, Mode_AF_PP, GPIO_PinSource0, GPIO_AF_1}, // RC_CH1 - PA0 - *TIM2_CH1
|
{ TIM2, GPIOA, Pin_0, TIM_Channel_1, TIM2_IRQn, 0, Mode_AF_PP, GPIO_PinSource0, GPIO_AF_1, 0}, // RC_CH1 - PA0 - *TIM2_CH1
|
||||||
{ TIM2, GPIOA, Pin_1, TIM_Channel_2, TIM2_IRQn, 0, Mode_AF_PP, GPIO_PinSource1, GPIO_AF_1}, // RC_CH2 - PA1 - *TIM2_CH2, TIM15_CH1N
|
{ TIM2, GPIOA, Pin_1, TIM_Channel_2, TIM2_IRQn, 0, Mode_AF_PP, GPIO_PinSource1, GPIO_AF_1, 0}, // RC_CH2 - PA1 - *TIM2_CH2, TIM15_CH1N
|
||||||
// Production boards swapped RC_CH3/4 swapped to make it easier to use SerialRX using supplied cables - compared to first prototype.
|
{ TIM2, GPIOB, Pin_11, TIM_Channel_4, TIM2_IRQn, 0, Mode_AF_PP, GPIO_PinSource11, GPIO_AF_1, 0}, // RC_CH3 - PB11 - *TIM2_CH4, USART3_RX (AF7)
|
||||||
{ TIM2, GPIOB, Pin_11, TIM_Channel_4, TIM2_IRQn, 0, Mode_AF_PP, GPIO_PinSource11, GPIO_AF_1}, // RC_CH3 - PB11 - *TIM2_CH4, USART3_RX (AF7)
|
{ TIM2, GPIOB, Pin_10, TIM_Channel_3, TIM2_IRQn, 0, Mode_AF_PP, GPIO_PinSource10, GPIO_AF_1, 0}, // RC_CH4 - PB10 - *TIM2_CH3, USART3_TX (AF7)
|
||||||
{ TIM2, GPIOB, Pin_10, TIM_Channel_3, TIM2_IRQn, 0, Mode_AF_PP, GPIO_PinSource10, GPIO_AF_1}, // RC_CH4 - PB10 - *TIM2_CH3, USART3_TX (AF7)
|
{ TIM3, GPIOB, Pin_4, TIM_Channel_1, TIM3_IRQn, 0, Mode_AF_PP, GPIO_PinSource4, GPIO_AF_2, 0}, // RC_CH5 - PB4 - *TIM3_CH1
|
||||||
{ TIM3, GPIOB, Pin_4, TIM_Channel_1, TIM3_IRQn, 0, Mode_AF_PP, GPIO_PinSource4, GPIO_AF_2}, // RC_CH5 - PB4 - *TIM3_CH1
|
{ TIM3, GPIOB, Pin_5, TIM_Channel_2, TIM3_IRQn, 0, Mode_AF_PP, GPIO_PinSource5, GPIO_AF_2, 0}, // RC_CH6 - PB5 - *TIM3_CH2
|
||||||
{ TIM3, GPIOB, Pin_5, TIM_Channel_2, TIM3_IRQn, 0, Mode_AF_PP, GPIO_PinSource5, GPIO_AF_2}, // RC_CH6 - PB5 - *TIM3_CH2
|
{ TIM3, GPIOB, Pin_0, TIM_Channel_3, TIM3_IRQn, 0, Mode_AF_PP, GPIO_PinSource0, GPIO_AF_2, 0}, // RC_CH7 - PB0 - *TIM3_CH3, TIM1_CH2N, TIM8_CH2N
|
||||||
{ TIM3, GPIOB, Pin_0, TIM_Channel_3, TIM3_IRQn, 0, Mode_AF_PP, GPIO_PinSource0, GPIO_AF_2}, // RC_CH7 - PB0 - *TIM3_CH3, TIM1_CH2N, TIM8_CH2N
|
{ TIM3, GPIOB, Pin_1, TIM_Channel_4, TIM3_IRQn, 0, Mode_AF_PP, GPIO_PinSource1, GPIO_AF_2, 0}, // RC_CH8 - PB1 - *TIM3_CH4, TIM1_CH3N, TIM8_CH3N
|
||||||
{ TIM3, GPIOB, Pin_1, TIM_Channel_4, TIM3_IRQn, 0, Mode_AF_PP, GPIO_PinSource1, GPIO_AF_2}, // RC_CH8 - PB1 - *TIM3_CH4, TIM1_CH3N, TIM8_CH3N
|
{ TIM16, GPIOA, Pin_6, TIM_Channel_1, TIM1_UP_TIM16_IRQn, 1, Mode_AF_PP, GPIO_PinSource6, GPIO_AF_1, 0}, // PWM1 - PA6 - TIM3_CH1, TIM8_BKIN, TIM1_BKIN, *TIM16_CH1
|
||||||
|
{ TIM17, GPIOA, Pin_7, TIM_Channel_1, TIM1_TRG_COM_TIM17_IRQn, 1, Mode_AF_PP, GPIO_PinSource7, GPIO_AF_1, 0}, // PWM2 - PA7 - TIM3_CH2, *TIM17_CH1, TIM1_CH1N, TIM8_CH1
|
||||||
{ TIM16, GPIOA, Pin_6, TIM_Channel_1, TIM1_UP_TIM16_IRQn, 1, Mode_AF_PP, GPIO_PinSource6, GPIO_AF_1}, // PWM1 - PA6 - TIM3_CH1, TIM8_BKIN, TIM1_BKIN, *TIM16_CH1
|
{ TIM4, GPIOA, Pin_11, TIM_Channel_1, TIM4_IRQn, 1, Mode_AF_PP, GPIO_PinSource11, GPIO_AF_10, 0}, // PWM3 - PA11
|
||||||
{ TIM17, GPIOA, Pin_7, TIM_Channel_1, TIM1_TRG_COM_TIM17_IRQn, 1, Mode_AF_PP, GPIO_PinSource7, GPIO_AF_1}, // PWM2 - PA7 - TIM3_CH2, *TIM17_CH1, TIM1_CH1N, TIM8_CH1
|
{ TIM4, GPIOA, Pin_12, TIM_Channel_2, TIM4_IRQn, 1, Mode_AF_PP, GPIO_PinSource12, GPIO_AF_10, 0}, // PWM4 - PA12
|
||||||
{ TIM4, GPIOA, Pin_11, TIM_Channel_1, TIM4_IRQn, 1, Mode_AF_PP, GPIO_PinSource11, GPIO_AF_10}, // PWM3 - PA11
|
{ TIM4, GPIOB, Pin_8, TIM_Channel_3, TIM4_IRQn, 1, Mode_AF_PP, GPIO_PinSource8, GPIO_AF_2, 0}, // PWM5 - PB8
|
||||||
{ TIM4, GPIOA, Pin_12, TIM_Channel_2, TIM4_IRQn, 1, Mode_AF_PP, GPIO_PinSource12, GPIO_AF_10}, // PWM4 - PA12
|
{ TIM4, GPIOB, Pin_9, TIM_Channel_4, TIM4_IRQn, 1, Mode_AF_PP, GPIO_PinSource9, GPIO_AF_2, 0}, // PWM6 - PB9
|
||||||
{ TIM4, GPIOB, Pin_8, TIM_Channel_3, TIM4_IRQn, 1, Mode_AF_PP, GPIO_PinSource8, GPIO_AF_2}, // PWM5 - PB8
|
{ TIM15, GPIOA, Pin_2, TIM_Channel_1, TIM1_BRK_TIM15_IRQn, 1, Mode_AF_PP, GPIO_PinSource2, GPIO_AF_9, 0}, // PWM7 - PA2
|
||||||
{ TIM4, GPIOB, Pin_9, TIM_Channel_4, TIM4_IRQn, 1, Mode_AF_PP, GPIO_PinSource9, GPIO_AF_2}, // PWM6 - PB9
|
{ TIM15, GPIOA, Pin_3, TIM_Channel_2, TIM1_BRK_TIM15_IRQn, 1, Mode_AF_PP, GPIO_PinSource3, GPIO_AF_9, 0}, // PWM8 - PA3
|
||||||
{ TIM15, GPIOA, Pin_2, TIM_Channel_1, TIM1_BRK_TIM15_IRQn, 1, Mode_AF_PP, GPIO_PinSource2, GPIO_AF_9}, // PWM7 - PA2
|
{ TIM1, GPIOA, Pin_8, TIM_Channel_1, TIM1_CC_IRQn, 1, Mode_AF_PP, GPIO_PinSource8, GPIO_AF_6, 0}, // GPIO_TIMER / LED_STRIP
|
||||||
{ TIM15, GPIOA, Pin_3, TIM_Channel_2, TIM1_BRK_TIM15_IRQn, 1, Mode_AF_PP, GPIO_PinSource3, GPIO_AF_9}, // PWM8 - PA3
|
|
||||||
|
|
||||||
{ TIM1, GPIOA, Pin_8, TIM_Channel_1, TIM1_CC_IRQn, 1, Mode_AF_PP, GPIO_PinSource8, GPIO_AF_6}, // GPIO_TIMER / LED_STRIP
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -108,6 +108,8 @@
|
||||||
// USART3,
|
// USART3,
|
||||||
#define BIND_PIN PB11
|
#define BIND_PIN PB11
|
||||||
|
|
||||||
|
#define USE_SERIAL_4WAY_BLHELI_INTERFACE
|
||||||
|
/*
|
||||||
#define USE_SERIAL_4WAY_BLHELI_BOOTLOADER
|
#define USE_SERIAL_4WAY_BLHELI_BOOTLOADER
|
||||||
#define USE_SERIAL_4WAY_SK_BOOTLOADER
|
#define USE_SERIAL_4WAY_SK_BOOTLOADER
|
||||||
|
|
||||||
|
@ -125,6 +127,7 @@
|
||||||
#define S1W_RX_GPIO GPIOA
|
#define S1W_RX_GPIO GPIOA
|
||||||
#define S1W_RX_PIN GPIO_Pin_10
|
#define S1W_RX_PIN GPIO_Pin_10
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
|
|
||||||
// IO - stm32f303cc in 48pin package
|
// IO - stm32f303cc in 48pin package
|
||||||
#define TARGET_IO_PORTA 0xffff
|
#define TARGET_IO_PORTA 0xffff
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
|
F3_TARGETS += $(TARGET)
|
||||||
FEATURES = VCP ONBOARDFLASH
|
FEATURES = VCP ONBOARDFLASH
|
||||||
F3_TARGETS += $(TARGET)
|
|
||||||
TARGET_FLAGS = -DSPRACINGF3
|
TARGET_FLAGS = -DSPRACINGF3
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_mpu.c \
|
drivers/accgyro_mpu.c \
|
||||||
drivers/accgyro_mpu6050.c \
|
drivers/accgyro_mpu6050.c \
|
||||||
drivers/barometer_bmp085.c
|
drivers/barometer_bmp085.c
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
FEATURES = VCP
|
|
||||||
F3_TARGETS += $(TARGET)
|
F3_TARGETS += $(TARGET)
|
||||||
|
FEATURES = VCP
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_mpu.c \
|
drivers/accgyro_mpu.c \
|
||||||
drivers/display_ug2864hsweg01.c \
|
drivers/display_ug2864hsweg01.c \
|
||||||
drivers/accgyro_mpu6050.c
|
drivers/accgyro_mpu6050.c
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
FEATURES = VCP
|
|
||||||
F3_TARGETS += $(TARGET)
|
F3_TARGETS += $(TARGET)
|
||||||
|
FEATURES = VCP
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_mpu.c \
|
drivers/accgyro_mpu.c \
|
||||||
|
@ -9,6 +9,3 @@ TARGET_SRC = \
|
||||||
drivers/light_ws2811strip.c \
|
drivers/light_ws2811strip.c \
|
||||||
drivers/light_ws2811strip_stm32f30x.c
|
drivers/light_ws2811strip_stm32f30x.c
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
FEATURES = VCP ONBOARDFLASH
|
|
||||||
F3_TARGETS += $(TARGET)
|
F3_TARGETS += $(TARGET)
|
||||||
|
FEATURES = VCP ONBOARDFLASH
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_mpu.c \
|
drivers/accgyro_mpu.c \
|
||||||
|
@ -9,7 +9,5 @@ TARGET_SRC = \
|
||||||
drivers/compass_hmc5883l.c \
|
drivers/compass_hmc5883l.c \
|
||||||
drivers/light_ws2811strip.c \
|
drivers/light_ws2811strip.c \
|
||||||
drivers/light_ws2811strip_stm32f30x.c \
|
drivers/light_ws2811strip_stm32f30x.c \
|
||||||
drivers/serial_softserial.c
|
drivers/serial_softserial.c
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
FEATURES = ONBOARDFLASH HIGHEND
|
|
||||||
F1_TARGETS += $(TARGET)
|
F1_TARGETS += $(TARGET)
|
||||||
|
FEATURES = ONBOARDFLASH HIGHEND
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_adxl345.c \
|
drivers/accgyro_adxl345.c \
|
||||||
|
@ -18,4 +18,4 @@ TARGET_SRC = \
|
||||||
drivers/light_ws2811strip.c \
|
drivers/light_ws2811strip.c \
|
||||||
drivers/light_ws2811strip_stm32f10x.c \
|
drivers/light_ws2811strip_stm32f10x.c \
|
||||||
drivers/sonar_hcsr04.c \
|
drivers/sonar_hcsr04.c \
|
||||||
hardware_revision.c
|
hardware_revision.c
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FEATURES = VCP
|
|
||||||
F3_TARGETS += $(TARGET)
|
F3_TARGETS += $(TARGET)
|
||||||
|
FEATURES = VCP
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC =
|
|
@ -1,5 +1,5 @@
|
||||||
FEATURES = HIGHEND
|
|
||||||
F1_TARGETS += $(TARGET)
|
F1_TARGETS += $(TARGET)
|
||||||
|
FEATURES = HIGHEND
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_mpu.c \
|
drivers/accgyro_mpu.c \
|
||||||
|
@ -9,4 +9,5 @@ TARGET_SRC = \
|
||||||
drivers/compass_hmc5883l.c \
|
drivers/compass_hmc5883l.c \
|
||||||
drivers/light_ws2811strip.c \
|
drivers/light_ws2811strip.c \
|
||||||
drivers/light_ws2811strip_stm32f10x.c \
|
drivers/light_ws2811strip_stm32f10x.c \
|
||||||
drivers/sonar_hcsr04.c
|
drivers/sonar_hcsr04.c
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
FEATURES = ONBOARDFLASH HIGHEND
|
|
||||||
F1_TARGETS += $(TARGET)
|
F1_TARGETS += $(TARGET)
|
||||||
|
FEATURES = ONBOARDFLASH HIGHEND
|
||||||
|
|
||||||
DEVICE_FLAGS = -DSTM32F10X_HD
|
DEVICE_FLAGS = -DSTM32F10X_HD
|
||||||
|
|
||||||
|
@ -21,3 +21,4 @@ TARGET_SRC = \
|
||||||
drivers/light_ws2811strip.c \
|
drivers/light_ws2811strip.c \
|
||||||
drivers/light_ws2811strip_stm32f10x.c \
|
drivers/light_ws2811strip_stm32f10x.c \
|
||||||
drivers/sonar_hcsr04.c
|
drivers/sonar_hcsr04.c
|
||||||
|
|
||||||
|
|
|
@ -4,5 +4,5 @@ FEATURES += VCP ONBOARDFLASH
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_spi_mpu6000.c \
|
drivers/accgyro_spi_mpu6000.c \
|
||||||
drivers/barometer_ms5611.c \
|
drivers/barometer_ms5611.c \
|
||||||
drivers/compass_hmc5883l.c
|
drivers/compass_hmc5883l.c
|
||||||
|
|
||||||
|
|
|
@ -81,25 +81,22 @@ const uint16_t airPWM[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
|
||||||
{ TIM2, GPIOA, Pin_0, TIM_Channel_1, TIM2_IRQn, 0, Mode_AF_PP, GPIO_PinSource0, GPIO_AF_1}, // RC_CH1 - PA0 - *TIM2_CH1
|
{ TIM2, GPIOA, Pin_0, TIM_Channel_1, TIM2_IRQn, 0, Mode_AF_PP, GPIO_PinSource0, GPIO_AF_1 ,0}, // RC_CH1 - PA0 - *TIM2_CH1
|
||||||
{ TIM2, GPIOA, Pin_1, TIM_Channel_2, TIM2_IRQn, 0, Mode_AF_PP, GPIO_PinSource1, GPIO_AF_1}, // RC_CH2 - PA1 - *TIM2_CH2, TIM15_CH1N
|
{ TIM2, GPIOA, Pin_1, TIM_Channel_2, TIM2_IRQn, 0, Mode_AF_PP, GPIO_PinSource1, GPIO_AF_1 ,0}, // RC_CH2 - PA1 - *TIM2_CH2, TIM15_CH1N
|
||||||
// Production boards swapped RC_CH3/4 swapped to make it easier to use SerialRX using supplied cables - compared to first prototype.
|
{ TIM2, GPIOB, Pin_11, TIM_Channel_4, TIM2_IRQn, 0, Mode_AF_PP, GPIO_PinSource11, GPIO_AF_1 ,0}, // RC_CH3 - PB11 - *TIM2_CH4, USART3_RX (AF7)
|
||||||
{ TIM2, GPIOB, Pin_11, TIM_Channel_4, TIM2_IRQn, 0, Mode_AF_PP, GPIO_PinSource11, GPIO_AF_1}, // RC_CH3 - PB11 - *TIM2_CH4, USART3_RX (AF7)
|
{ TIM2, GPIOB, Pin_10, TIM_Channel_3, TIM2_IRQn, 0, Mode_AF_PP, GPIO_PinSource10, GPIO_AF_1 ,0}, // RC_CH4 - PB10 - *TIM2_CH3, USART3_TX (AF7)
|
||||||
{ TIM2, GPIOB, Pin_10, TIM_Channel_3, TIM2_IRQn, 0, Mode_AF_PP, GPIO_PinSource10, GPIO_AF_1}, // RC_CH4 - PB10 - *TIM2_CH3, USART3_TX (AF7)
|
{ TIM3, GPIOB, Pin_4, TIM_Channel_1, TIM3_IRQn, 0, Mode_AF_PP, GPIO_PinSource4, GPIO_AF_2 ,0}, // RC_CH5 - PB4 - *TIM3_CH1
|
||||||
{ TIM3, GPIOB, Pin_4, TIM_Channel_1, TIM3_IRQn, 0, Mode_AF_PP, GPIO_PinSource4, GPIO_AF_2}, // RC_CH5 - PB4 - *TIM3_CH1
|
{ TIM3, GPIOB, Pin_5, TIM_Channel_2, TIM3_IRQn, 0, Mode_AF_PP, GPIO_PinSource5, GPIO_AF_2 ,0}, // RC_CH6 - PB5 - *TIM3_CH2
|
||||||
{ TIM3, GPIOB, Pin_5, TIM_Channel_2, TIM3_IRQn, 0, Mode_AF_PP, GPIO_PinSource5, GPIO_AF_2}, // RC_CH6 - PB5 - *TIM3_CH2
|
{ TIM3, GPIOB, Pin_0, TIM_Channel_3, TIM3_IRQn, 0, Mode_AF_PP, GPIO_PinSource0, GPIO_AF_2 ,0}, // RC_CH7 - PB0 - *TIM3_CH3, TIM1_CH2N, TIM8_CH2N
|
||||||
{ TIM3, GPIOB, Pin_0, TIM_Channel_3, TIM3_IRQn, 0, Mode_AF_PP, GPIO_PinSource0, GPIO_AF_2}, // RC_CH7 - PB0 - *TIM3_CH3, TIM1_CH2N, TIM8_CH2N
|
{ TIM3, GPIOB, Pin_1, TIM_Channel_4, TIM3_IRQn, 0, Mode_AF_PP, GPIO_PinSource1, GPIO_AF_2 ,0}, // RC_CH8 - PB1 - *TIM3_CH4, TIM1_CH3N, TIM8_CH3N
|
||||||
{ TIM3, GPIOB, Pin_1, TIM_Channel_4, TIM3_IRQn, 0, Mode_AF_PP, GPIO_PinSource1, GPIO_AF_2}, // RC_CH8 - PB1 - *TIM3_CH4, TIM1_CH3N, TIM8_CH3N
|
{ TIM16, GPIOA, Pin_6, TIM_Channel_1, TIM1_UP_TIM16_IRQn, 1, Mode_AF_PP, GPIO_PinSource6, GPIO_AF_1 ,0}, // PWM1 - PA6 - TIM3_CH1, TIM8_BKIN, TIM1_BKIN, *TIM16_CH1
|
||||||
|
{ TIM17, GPIOA, Pin_7, TIM_Channel_1, TIM1_TRG_COM_TIM17_IRQn, 1, Mode_AF_PP, GPIO_PinSource7, GPIO_AF_1 ,0}, // PWM2 - PA7 - TIM3_CH2, *TIM17_CH1, TIM1_CH1N, TIM8_CH1
|
||||||
{ TIM16, GPIOA, Pin_6, TIM_Channel_1, TIM1_UP_TIM16_IRQn, 1, Mode_AF_PP, GPIO_PinSource6, GPIO_AF_1}, // PWM1 - PA6 - TIM3_CH1, TIM8_BKIN, TIM1_BKIN, *TIM16_CH1
|
{ TIM4, GPIOA, Pin_11, TIM_Channel_1, TIM4_IRQn, 1, Mode_AF_PP, GPIO_PinSource11, GPIO_AF_10 ,0}, // PWM3 - PA11
|
||||||
{ TIM17, GPIOA, Pin_7, TIM_Channel_1, TIM1_TRG_COM_TIM17_IRQn, 1, Mode_AF_PP, GPIO_PinSource7, GPIO_AF_1}, // PWM2 - PA7 - TIM3_CH2, *TIM17_CH1, TIM1_CH1N, TIM8_CH1
|
{ TIM4, GPIOA, Pin_12, TIM_Channel_2, TIM4_IRQn, 1, Mode_AF_PP, GPIO_PinSource12, GPIO_AF_10 ,0}, // PWM4 - PA12
|
||||||
{ TIM4, GPIOA, Pin_11, TIM_Channel_1, TIM4_IRQn, 1, Mode_AF_PP, GPIO_PinSource11, GPIO_AF_10}, // PWM3 - PA11
|
{ TIM4, GPIOB, Pin_8, TIM_Channel_3, TIM4_IRQn, 1, Mode_AF_PP, GPIO_PinSource8, GPIO_AF_2 ,0}, // PWM5 - PB8
|
||||||
{ TIM4, GPIOA, Pin_12, TIM_Channel_2, TIM4_IRQn, 1, Mode_AF_PP, GPIO_PinSource12, GPIO_AF_10}, // PWM4 - PA12
|
{ TIM4, GPIOB, Pin_9, TIM_Channel_4, TIM4_IRQn, 1, Mode_AF_PP, GPIO_PinSource9, GPIO_AF_2 ,0}, // PWM6 - PB9
|
||||||
{ TIM4, GPIOB, Pin_8, TIM_Channel_3, TIM4_IRQn, 1, Mode_AF_PP, GPIO_PinSource8, GPIO_AF_2}, // PWM5 - PB8
|
{ TIM15, GPIOA, Pin_2, TIM_Channel_1, TIM1_BRK_TIM15_IRQn, 1, Mode_AF_PP, GPIO_PinSource2, GPIO_AF_9 ,0}, // PWM7 - PA2
|
||||||
{ TIM4, GPIOB, Pin_9, TIM_Channel_4, TIM4_IRQn, 1, Mode_AF_PP, GPIO_PinSource9, GPIO_AF_2}, // PWM6 - PB9
|
{ TIM15, GPIOA, Pin_3, TIM_Channel_2, TIM1_BRK_TIM15_IRQn, 1, Mode_AF_PP, GPIO_PinSource3, GPIO_AF_9 ,0}, // PWM8 - PA3
|
||||||
{ TIM15, GPIOA, Pin_2, TIM_Channel_1, TIM1_BRK_TIM15_IRQn, 1, Mode_AF_PP, GPIO_PinSource2, GPIO_AF_9}, // PWM7 - PA2
|
{ TIM1, GPIOA, Pin_8, TIM_Channel_1, TIM1_CC_IRQn, 1, Mode_AF_PP, GPIO_PinSource8, GPIO_AF_6 ,0}, // GPIO_TIMER / LED_STRIP
|
||||||
{ TIM15, GPIOA, Pin_3, TIM_Channel_2, TIM1_BRK_TIM15_IRQn, 1, Mode_AF_PP, GPIO_PinSource3, GPIO_AF_9}, // PWM8 - PA3
|
|
||||||
|
|
||||||
{ TIM1, GPIOA, Pin_8, TIM_Channel_1, TIM1_CC_IRQn, 1, Mode_AF_PP, GPIO_PinSource8, GPIO_AF_6}, // GPIO_TIMER / LED_STRIP
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
F3_TARGETS += $(TARGET)
|
||||||
FEATURES = VCP ONBOARDFLASH
|
FEATURES = VCP ONBOARDFLASH
|
||||||
F3_TARGETS += $(TARGET)
|
|
||||||
TARGET_FLAGS = -DSPRACINGF3
|
TARGET_FLAGS = -DSPRACINGF3
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
|
@ -9,5 +9,5 @@ TARGET_SRC = \
|
||||||
drivers/light_ws2811strip.c \
|
drivers/light_ws2811strip.c \
|
||||||
drivers/light_ws2811strip_stm32f30x.c \
|
drivers/light_ws2811strip_stm32f30x.c \
|
||||||
drivers/serial_softserial.c \
|
drivers/serial_softserial.c \
|
||||||
drivers/sonar_hcsr04.c
|
drivers/sonar_hcsr04.c
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
FEATURES = VCP ONBOARDFLASH
|
|
||||||
F3_TARGETS += $(TARGET)
|
F3_TARGETS += $(TARGET)
|
||||||
|
FEATURES = VCP ONBOARDFLASH
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_mpu.c \
|
drivers/accgyro_mpu.c \
|
||||||
|
@ -7,6 +7,6 @@ TARGET_SRC = \
|
||||||
drivers/light_ws2811strip.c \
|
drivers/light_ws2811strip.c \
|
||||||
drivers/light_ws2811strip_stm32f30x.c \
|
drivers/light_ws2811strip_stm32f30x.c \
|
||||||
drivers/serial_softserial.c \
|
drivers/serial_softserial.c \
|
||||||
drivers/vtx_rtc6705.c
|
drivers/vtx_rtc6705.c \
|
||||||
|
io/vtx.c
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
FEATURES = VCP
|
|
||||||
F3_TARGETS += $(TARGET)
|
F3_TARGETS += $(TARGET)
|
||||||
|
FEATURES = VCP
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_mpu.c \
|
drivers/accgyro_mpu.c \
|
||||||
|
@ -8,7 +8,5 @@ TARGET_SRC = \
|
||||||
drivers/barometer_bmp280.c \
|
drivers/barometer_bmp280.c \
|
||||||
drivers/compass_ak8975.c \
|
drivers/compass_ak8975.c \
|
||||||
drivers/light_ws2811strip.c \
|
drivers/light_ws2811strip.c \
|
||||||
drivers/light_ws2811strip_stm32f30x.c
|
drivers/light_ws2811strip_stm32f30x.c
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
FEATURES = VCP ONBOARDFLASH
|
|
||||||
F3_TARGETS += $(TARGET)
|
F3_TARGETS += $(TARGET)
|
||||||
|
FEATURES = VCP ONBOARDFLASH
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_mpu.c \
|
drivers/accgyro_mpu.c \
|
||||||
|
@ -12,4 +12,5 @@ TARGET_SRC = \
|
||||||
drivers/light_ws2811strip.c \
|
drivers/light_ws2811strip.c \
|
||||||
drivers/light_ws2811strip_stm32f30x.c \
|
drivers/light_ws2811strip_stm32f30x.c \
|
||||||
drivers/serial_softserial.c \
|
drivers/serial_softserial.c \
|
||||||
drivers/sonar_hcsr04.c
|
drivers/sonar_hcsr04.c
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
FEATURES = VCP SDCARD
|
|
||||||
F3_TARGETS += $(TARGET)
|
F3_TARGETS += $(TARGET)
|
||||||
|
FEATURES = VCP SDCARD
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_mpu.c \
|
drivers/accgyro_mpu.c \
|
||||||
|
@ -12,5 +12,5 @@ TARGET_SRC = \
|
||||||
drivers/serial_usb_vcp.c \
|
drivers/serial_usb_vcp.c \
|
||||||
drivers/transponder_ir.c \
|
drivers/transponder_ir.c \
|
||||||
drivers/transponder_ir_stm32f30x.c \
|
drivers/transponder_ir_stm32f30x.c \
|
||||||
io/transponder_ir.c
|
io/transponder_ir.c
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
F3_TARGETS += $(TARGET)
|
||||||
FEATURES = VCP SDCARD
|
FEATURES = VCP SDCARD
|
||||||
F3_TARGETS += $(TARGET)
|
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/accgyro_mpu.c \
|
drivers/accgyro_mpu.c \
|
||||||
|
@ -15,5 +15,5 @@ TARGET_SRC = \
|
||||||
drivers/sonar_hcsr04.c \
|
drivers/sonar_hcsr04.c \
|
||||||
drivers/transponder_ir.c \
|
drivers/transponder_ir.c \
|
||||||
drivers/transponder_ir_stm32f30x.c \
|
drivers/transponder_ir_stm32f30x.c \
|
||||||
io/transponder_ir.c
|
io/transponder_ir.c
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
F3_TARGETS += $(TARGET)
|
||||||
FEATURES = VCP SDCARD
|
FEATURES = VCP SDCARD
|
||||||
F3_TARGETS += $(TARGET)
|
|
||||||
|
|
||||||
TARGET_SRC = \
|
TARGET_SRC = \
|
||||||
drivers/light_ws2811strip.c \
|
drivers/light_ws2811strip.c \
|
||||||
|
@ -15,4 +15,5 @@ TARGET_SRC = \
|
||||||
drivers/accgyro_l3g4200d.c \
|
drivers/accgyro_l3g4200d.c \
|
||||||
drivers/barometer_ms5611.c \
|
drivers/barometer_ms5611.c \
|
||||||
drivers/barometer_bmp280.c \
|
drivers/barometer_bmp280.c \
|
||||||
drivers/compass_ak8975.c
|
drivers/compass_ak8975.c
|
||||||
|
|
||||||
|
|
|
@ -477,16 +477,23 @@ bool hasEnoughTimeLapsedSinceLastTelemetryTransmission(uint32_t currentMillis)
|
||||||
|
|
||||||
void checkFrSkyTelemetryState(void)
|
void checkFrSkyTelemetryState(void)
|
||||||
{
|
{
|
||||||
bool newTelemetryEnabledValue = telemetryDetermineEnabledState(frskyPortSharing);
|
if (portConfig && telemetryCheckRxPortShared(portConfig)) {
|
||||||
|
if (!frskyTelemetryEnabled && telemetrySharedPort != NULL) {
|
||||||
|
frskyPort = telemetrySharedPort;
|
||||||
|
frskyTelemetryEnabled = true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
bool newTelemetryEnabledValue = telemetryDetermineEnabledState(frskyPortSharing);
|
||||||
|
|
||||||
if (newTelemetryEnabledValue == frskyTelemetryEnabled) {
|
if (newTelemetryEnabledValue == frskyTelemetryEnabled) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (newTelemetryEnabledValue)
|
||||||
|
configureFrSkyTelemetryPort();
|
||||||
|
else
|
||||||
|
freeFrSkyTelemetryPort();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newTelemetryEnabledValue)
|
|
||||||
configureFrSkyTelemetryPort();
|
|
||||||
else
|
|
||||||
freeFrSkyTelemetryPort();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void handleFrSkyTelemetry(rxConfig_t *rxConfig, uint16_t deadband3d_throttle)
|
void handleFrSkyTelemetry(rxConfig_t *rxConfig, uint16_t deadband3d_throttle)
|
||||||
|
|
|
@ -300,12 +300,19 @@ void configureLtmTelemetryPort(void)
|
||||||
|
|
||||||
void checkLtmTelemetryState(void)
|
void checkLtmTelemetryState(void)
|
||||||
{
|
{
|
||||||
bool newTelemetryEnabledValue = telemetryDetermineEnabledState(ltmPortSharing);
|
if (portConfig && telemetryCheckRxPortShared(portConfig)) {
|
||||||
if (newTelemetryEnabledValue == ltmEnabled)
|
if (!ltmEnabled && telemetrySharedPort != NULL) {
|
||||||
return;
|
ltmPort = telemetrySharedPort;
|
||||||
if (newTelemetryEnabledValue)
|
ltmEnabled = true;
|
||||||
configureLtmTelemetryPort();
|
}
|
||||||
else
|
} else {
|
||||||
freeLtmTelemetryPort();
|
bool newTelemetryEnabledValue = telemetryDetermineEnabledState(ltmPortSharing);
|
||||||
|
if (newTelemetryEnabledValue == ltmEnabled)
|
||||||
|
return;
|
||||||
|
if (newTelemetryEnabledValue)
|
||||||
|
configureLtmTelemetryPort();
|
||||||
|
else
|
||||||
|
freeLtmTelemetryPort();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -74,6 +74,13 @@ bool telemetryDetermineEnabledState(portSharing_e portSharing)
|
||||||
return enabled;
|
return enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool telemetryCheckRxPortShared(serialPortConfig_t *portConfig)
|
||||||
|
{
|
||||||
|
return portConfig->functionMask & FUNCTION_RX_SERIAL && portConfig->functionMask & TELEMETRY_SHAREABLE_PORT_FUNCTIONS_MASK;
|
||||||
|
}
|
||||||
|
|
||||||
|
serialPort_t *telemetrySharedPort = NULL;
|
||||||
|
|
||||||
void telemetryCheckState(void)
|
void telemetryCheckState(void)
|
||||||
{
|
{
|
||||||
checkFrSkyTelemetryState();
|
checkFrSkyTelemetryState();
|
||||||
|
|
|
@ -48,6 +48,9 @@ typedef struct telemetryConfig_s {
|
||||||
uint8_t hottAlarmSoundInterval;
|
uint8_t hottAlarmSoundInterval;
|
||||||
} telemetryConfig_t;
|
} telemetryConfig_t;
|
||||||
|
|
||||||
|
bool telemetryCheckRxPortShared(serialPortConfig_t *portConfig);
|
||||||
|
extern serialPort_t *telemetrySharedPort;
|
||||||
|
|
||||||
void telemetryCheckState(void);
|
void telemetryCheckState(void);
|
||||||
void telemetryProcess(rxConfig_t *rxConfig, uint16_t deadband3d_throttle);
|
void telemetryProcess(rxConfig_t *rxConfig, uint16_t deadband3d_throttle);
|
||||||
|
|
||||||
|
@ -55,4 +58,6 @@ bool telemetryDetermineEnabledState(portSharing_e portSharing);
|
||||||
|
|
||||||
void telemetryUseConfig(telemetryConfig_t *telemetryConfig);
|
void telemetryUseConfig(telemetryConfig_t *telemetryConfig);
|
||||||
|
|
||||||
|
#define TELEMETRY_SHAREABLE_PORT_FUNCTIONS_MASK (FUNCTION_TELEMETRY_FRSKY | FUNCTION_TELEMETRY_LTM)
|
||||||
|
|
||||||
#endif /* TELEMETRY_COMMON_H_ */
|
#endif /* TELEMETRY_COMMON_H_ */
|
||||||
|
|
70
top_makefile
70
top_makefile
|
@ -1,70 +0,0 @@
|
||||||
ALL_TARGETS := naze
|
|
||||||
ALL_TARGETS += cc3d
|
|
||||||
ALL_TARGETS += cc3d_opbl
|
|
||||||
ALL_TARGETS += spracingf3
|
|
||||||
ALL_TARGETS += spracingf3evo
|
|
||||||
ALL_TARGETS += spracingf3mini
|
|
||||||
ALL_TARGETS += sparky
|
|
||||||
ALL_TARGETS += alienflightf1
|
|
||||||
ALL_TARGETS += alienflightf3
|
|
||||||
ALL_TARGETS += colibri_race
|
|
||||||
ALL_TARGETS += lux_race
|
|
||||||
ALL_TARGETS += motolab
|
|
||||||
ALL_TARGETS += rmdo
|
|
||||||
ALL_TARGETS += ircfusionf3
|
|
||||||
ALL_TARGETS += afromini
|
|
||||||
ALL_TARGETS += doge
|
|
||||||
ALL_TARGETS += singularity
|
|
||||||
ALL_TARGETS += sirinfpv
|
|
||||||
|
|
||||||
CLEAN_TARGETS := $(addprefix clean_, $(ALL_TARGETS))
|
|
||||||
|
|
||||||
clean_naze naze : opts := TARGET=NAZE
|
|
||||||
clean_cc3d cc3d: opts := TARGET=CC3D
|
|
||||||
clean_cc3d_opbl cc3d_opbl : opts := TARGET=CC3D_OPBL
|
|
||||||
clean_spracingf3mini spracingf3mini : opts := TARGET=SPRACINGF3MINI
|
|
||||||
clean_spracingf3 spracingf3 : opts := TARGET=SPRACINGF3
|
|
||||||
clean_spracingf3evo spracingf3evo : opts := TARGET=SPRACINGF3EVO
|
|
||||||
clean_sparky sparky : opts := TARGET=SPARKY
|
|
||||||
clean_alienflightf1 alienflightf1 : opts := TARGET=ALIENFLIGHTF1
|
|
||||||
clean_alienflightf3 alienflightf3 : opts := TARGET=ALIENFLIGHTF3
|
|
||||||
clean_colibri_race colibri_race : opts := TARGET=COLIBRI_RACE
|
|
||||||
clean_lux_race lux_race : opts := TARGET=LUX_RACE
|
|
||||||
clean_motolab motolab : opts := TARGET=MOTOLAB
|
|
||||||
clean_rmdo rmdo : opts := TARGET=RMDO
|
|
||||||
clean_ircfusionf3 ircfusionf3 : opts := TARGET=IRCFUSIONF3
|
|
||||||
clean_afromini afromini : opts := TARGET=AFROMINI
|
|
||||||
clean_doge doge : opts := TARGET=DOGE
|
|
||||||
clean_singularity singularity : opts := TARGET=SINGULARITY
|
|
||||||
clean_sirinfpv sirinfpv: opts := TARGET=SIRINFPV
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: all clean
|
|
||||||
all: everything
|
|
||||||
clean: clean_everything
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY: clean_everything
|
|
||||||
clean_everything: $(CLEAN_TARGETS)
|
|
||||||
|
|
||||||
.PHONY: everything
|
|
||||||
everything: $(ALL_TARGETS)
|
|
||||||
|
|
||||||
|
|
||||||
.PHONY:$(ALL_TARGETS)
|
|
||||||
$(ALL_TARGETS):
|
|
||||||
make -f Makefile hex binary $(opts)
|
|
||||||
|
|
||||||
.PHONY: $(CLEAN_TARGETS)
|
|
||||||
$(CLEAN_TARGETS):
|
|
||||||
make -f Makefile clean $(opts)
|
|
||||||
|
|
||||||
.PHONY: help
|
|
||||||
help:
|
|
||||||
@echo "This is your new top makefile. synopsis: make <target>" .
|
|
||||||
@echo "Valid targets":
|
|
||||||
@echo "all"
|
|
||||||
@echo "clean"
|
|
||||||
@echo "$(ALL_TARGETS)"
|
|
||||||
@echo "$(CLEAN_TARGETS)"
|
|
||||||
|
|
Loading…
Reference in New Issue