vtx: fix VTX_SETTINGS_POWER_COUNT and add dummy entries to saPowerNames
[inav.git] / src / main / target / SPRACINGF7DUAL / config.c
blob332f792d9218be0aa8926da33a8de51257370f81
1 /*
2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 #include <stdbool.h>
22 #include <stdint.h>
24 #include "platform.h"
26 #include "common/axis.h"
28 #include "drivers/sensor.h"
29 #include "drivers/compass/compass.h"
30 #include "drivers/serial.h"
32 #include "fc/rc_controls.h"
34 #include "flight/failsafe.h"
35 #include "flight/mixer.h"
36 #include "flight/pid.h"
38 #include "rx/rx.h"
40 #include "io/serial.h"
42 #include "telemetry/telemetry.h"
44 #include "sensors/sensors.h"
45 #include "sensors/compass.h"
46 #include "sensors/barometer.h"
48 #include "config/feature.h"
50 #include "fc/config.h"
52 #ifdef USE_TARGET_CONFIG
54 #define TELEMETRY_UART SERIAL_PORT_USART5
56 void targetConfiguration(void)
58 barometerConfigMutable()->baro_hardware = BARO_BMP280;
60 #ifdef USE_TELEMETRY
61 // change telemetry settings
62 serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(TELEMETRY_UART)].functionMask = FUNCTION_TELEMETRY_SMARTPORT;
63 telemetryConfigMutable()->telemetry_inverted = 1;
64 //telemetryConfigMutable()->halfDuplex = 1;
65 #endif
67 #endif