diff --git a/src/main/fc/fc_init.c b/src/main/fc/fc_init.c
index f435677fa9..d35f671bcc 100644
--- a/src/main/fc/fc_init.c
+++ b/src/main/fc/fc_init.c
@@ -294,11 +294,15 @@ void init(void)
}
#endif
-#if defined(USE_PWM) || defined(USE_PPM)
- if (feature(FEATURE_RX_PPM)) {
- ppmRxInit(ppmConfig(), motorConfig()->dev.motorPwmProtocol);
- } else if (feature(FEATURE_RX_PARALLEL_PWM)) {
- pwmRxInit(pwmConfig());
+ if (0) {}
+#if defined(USE_PPM)
+ else if (feature(FEATURE_RX_PPM)) {
+ ppmRxInit(ppmConfig(), motorConfig()->dev.motorPwmProtocol);
+ }
+#endif
+#if defined(USE_PWM)
+ else if (feature(FEATURE_RX_PARALLEL_PWM)) {
+ pwmRxInit(pwmConfig());
}
#endif
diff --git a/src/main/fc/fc_msp.c b/src/main/fc/fc_msp.c
index 232a00c1da..c3d27342c2 100755
--- a/src/main/fc/fc_msp.c
+++ b/src/main/fc/fc_msp.c
@@ -812,8 +812,10 @@ static bool mspFcProcessOutCommand(uint8_t cmdMSP, sbuf_t *dst, mspPostProcessFn
#ifdef GPS
case MSP_GPS_CONFIG:
- sbufWriteU8(dst, gpsConfig()->provider); // gps_type
- sbufWriteU8(dst, gpsConfig()->sbasMode); // gps_ubx_sbas
+ sbufWriteU8(dst, gpsConfig()->provider);
+ sbufWriteU8(dst, gpsConfig()->sbasMode);
+ sbufWriteU8(dst, gpsConfig()->autoConfig);
+ sbufWriteU8(dst, gpsConfig()->autoBaud);
break;
case MSP_RAW_GPS:
@@ -1435,8 +1437,10 @@ static mspResult_e mspFcProcessInCommand(uint8_t cmdMSP, sbuf_t *src)
#ifdef GPS
case MSP_SET_GPS_CONFIG:
- gpsConfigMutable()->provider = sbufReadU8(src); // gps_type
- gpsConfigMutable()->sbasMode = sbufReadU8(src); // gps_ubx_sbas
+ gpsConfigMutable()->provider = sbufReadU8(src);
+ gpsConfigMutable()->sbasMode = sbufReadU8(src);
+ gpsConfigMutable()->autoConfig = sbufReadU8(src);
+ gpsConfigMutable()->autoBaud = sbufReadU8(src);
break;
#endif
diff --git a/src/main/io/osd.c b/src/main/io/osd.c
index 995fea8c3f..43e45dd301 100644
--- a/src/main/io/osd.c
+++ b/src/main/io/osd.c
@@ -234,10 +234,10 @@ static void osdDrawSingleElement(uint8_t item)
{
int32_t val;
if (item == OSD_GPS_LAT) {
- buff[0] = 0xA6;
+ buff[0] = 0x64; // right arrow
val = GPS_coord[LAT];
} else {
- buff[0] = 0xA7;
+ buff[0] = 0x60; // down arrow
val = GPS_coord[LON];
}
if (val >= 0) {
diff --git a/src/main/msp/msp_protocol.h b/src/main/msp/msp_protocol.h
index badc002995..843dba0fc3 100644
--- a/src/main/msp/msp_protocol.h
+++ b/src/main/msp/msp_protocol.h
@@ -58,8 +58,8 @@
#define MSP_PROTOCOL_VERSION 0
-#define API_VERSION_MAJOR 1 // increment when major changes are made
-#define API_VERSION_MINOR 33 // increment after a release, to set the version for all changes to go into the following release (if no changes to MSP are made between the releases, this can be reverted before the release)
+#define API_VERSION_MAJOR 1 // increment when major changes are made
+#define API_VERSION_MINOR 34 // increment after a release, to set the version for all changes to go into the following release (if no changes to MSP are made between the releases, this can be reverted before the release)
#define API_VERSION_LENGTH 2
diff --git a/src/main/sensors/current.c b/src/main/sensors/current.c
index 9e3c834243..403166fd6f 100644
--- a/src/main/sensors/current.c
+++ b/src/main/sensors/current.c
@@ -220,11 +220,12 @@ void currentMeterESCReadMotor(uint8_t motorNumber, currentMeter_t *meter)
currentMeterReset(meter);
#else
escSensorData_t *escData = getEscSensorData(motorNumber);
- if (escData->dataAge <= ESC_BATTERY_AGE_MAX) {
+ if (escData && escData->dataAge <= ESC_BATTERY_AGE_MAX) {
meter->amperage = escData->current;
meter->amperageLatest = escData->current;
meter->mAhDrawn = escData->consumption;
- return;
+ } else {
+ currentMeterReset(meter);
}
#endif
}
diff --git a/src/main/sensors/voltage.c b/src/main/sensors/voltage.c
index 22cc1105bc..aa9db9dfeb 100644
--- a/src/main/sensors/voltage.c
+++ b/src/main/sensors/voltage.c
@@ -221,9 +221,13 @@ void voltageMeterESCReadMotor(uint8_t motorNumber, voltageMeter_t *voltageMeter)
voltageMeterReset(voltageMeter);
#else
escSensorData_t *escData = getEscSensorData(motorNumber);
+ if (escData) {
+ voltageMeter->unfiltered = escData->dataAge <= ESC_BATTERY_AGE_MAX ? escData->voltage / 10 : 0;
+ voltageMeter->filtered = voltageMeter->unfiltered; // no filtering for ESC motors currently.
+ } else {
+ voltageMeterReset(voltageMeter);
+ }
- voltageMeter->unfiltered = escData->dataAge <= ESC_BATTERY_AGE_MAX ? escData->voltage / 10 : 0;
- voltageMeter->filtered = voltageMeter->unfiltered; // no filtering for ESC motors currently.
#endif
}
diff --git a/src/main/target/NAZE/initialisation.c b/src/main/target/NAZE/initialisation.c
index 9b121e4b12..0d75c2c698 100644
--- a/src/main/target/NAZE/initialisation.c
+++ b/src/main/target/NAZE/initialisation.c
@@ -32,13 +32,14 @@ void targetBusInit(void)
#endif
#endif
- if (hardwareRevision != NAZE32_SP) {
- i2cInit(I2C_DEVICE);
+ if (hardwareRevision == NAZE32_SP) {
serialRemovePort(SERIAL_PORT_SOFTSERIAL2);
- } else {
+
if (!doesConfigurationUsePort(SERIAL_PORT_USART3)) {
serialRemovePort(SERIAL_PORT_USART3);
i2cInit(I2C_DEVICE);
}
+ } else {
+ i2cInit(I2C_DEVICE);
}
-}
\ No newline at end of file
+}
diff --git a/src/main/target/SPRACINGF3NEO/config.c b/src/main/target/SPRACINGF3NEO/config.c
new file mode 100644
index 0000000000..f7d6bcd2b6
--- /dev/null
+++ b/src/main/target/SPRACINGF3NEO/config.c
@@ -0,0 +1,62 @@
+/*
+ * This file is part of Cleanflight.
+ *
+ * Cleanflight is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * Cleanflight is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Cleanflight. If not, see .
+ */
+
+#include
+#include
+
+#include
+
+#include "common/axis.h"
+
+#include "drivers/sensor.h"
+#include "drivers/compass.h"
+#include "drivers/serial.h"
+
+#include "fc/rc_controls.h"
+
+#include "flight/failsafe.h"
+#include "flight/mixer.h"
+#include "flight/pid.h"
+
+#include "rx/rx.h"
+
+#include "io/serial.h"
+
+#include "telemetry/telemetry.h"
+
+#include "sensors/sensors.h"
+#include "sensors/compass.h"
+#include "sensors/barometer.h"
+
+#include "config/feature.h"
+
+#include "fc/config.h"
+
+#ifdef TARGET_CONFIG
+void targetConfiguration(void)
+{
+ barometerConfigMutable()->baro_hardware = BARO_DEFAULT;
+ compassConfigMutable()->mag_hardware = MAG_DEFAULT;
+ rxConfigMutable()->sbus_inversion = 1;
+ serialConfigMutable()->portConfigs[1].functionMask = FUNCTION_MSP; // So Bluetooth users don't have to change anything.
+ serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(SERIALRX_UART)].functionMask = FUNCTION_RX_SERIAL;
+ serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(TELEMETRY_UART)].functionMask = FUNCTION_TELEMETRY_SMARTPORT;
+ serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(GPS_UART)].functionMask = FUNCTION_GPS;
+ telemetryConfigMutable()->telemetry_inversion = 0;
+ telemetryConfigMutable()->sportHalfDuplex = 0;
+}
+#endif
diff --git a/src/main/target/SPRACINGF3NEO/target.h b/src/main/target/SPRACINGF3NEO/target.h
index 3aa363b92e..ecfc8b282c 100755
--- a/src/main/target/SPRACINGF3NEO/target.h
+++ b/src/main/target/SPRACINGF3NEO/target.h
@@ -18,6 +18,7 @@
#pragma once
#define TARGET_BOARD_IDENTIFIER "SP3N"
+#define TARGET_CONFIG
#define CONFIG_FASTLOOP_PREFERRED_ACC ACC_DEFAULT
@@ -159,8 +160,12 @@
#define OSD
-#define DEFAULT_RX_FEATURE FEATURE_RX_PPM
-#define DEFAULT_FEATURES (FEATURE_TRANSPONDER | FEATURE_RSSI_ADC | FEATURE_TELEMETRY)
+#define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL
+#define DEFAULT_FEATURES (FEATURE_TRANSPONDER | FEATURE_RSSI_ADC | FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_LED_STRIP)
+#define SERIALRX_UART SERIAL_PORT_USART2
+#define GPS_UART SERIAL_PORT_USART3
+#define TELEMETRY_UART SERIAL_PORT_UART5
+#define SERIALRX_PROVIDER SERIALRX_SBUS
#define BUTTONS
#define BUTTON_A_PIN PD2