diff --git a/src/main/target/MOTOLABF4/config.c b/src/main/target/MOTOLABF4/config.c new file mode 100644 index 0000000000..e70c4c9d31 --- /dev/null +++ b/src/main/target/MOTOLABF4/config.c @@ -0,0 +1,34 @@ +/* + * 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 + +#ifdef TARGET_CONFIG + +#include "telemetry/telemetry.h" +#include "fc/config.h" + +void targetConfiguration(void) +{ + sdcardConfigMutable()->useDma = true; + telemetryConfigMutable()->halfDuplex = 0; +} +#endif + diff --git a/src/main/target/MOTOLABF4/target.h b/src/main/target/MOTOLABF4/target.h index 4c0a6de425..e6fddfa0f2 100644 --- a/src/main/target/MOTOLABF4/target.h +++ b/src/main/target/MOTOLABF4/target.h @@ -17,6 +17,7 @@ #pragma once +#define TARGET_CONFIG #undef USE_MSP_DISPLAYPORT #ifdef MLTEMPF4 @@ -145,16 +146,15 @@ #define LED_STRIP #define USE_SERIAL_4WAY_BLHELI_INTERFACE -#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT -#define DEFAULT_FEATURES (FEATURE_TELEMETRY | FEATURE_OSD) -// | FEATURE_VTX | -// FEATURE_VBAT | FEATURE_CURRENT_METER | -// FEATURE_SDCARD) #define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL #define SERIALRX_PROVIDER SERIALRX_SBUS #define SERIALRX_UART SERIAL_PORT_UART5 #define SBUS_TELEMETRY_UART SERIAL_PORT_UART4 +#define DEFAULT_FEATURES (FEATURE_TELEMETRY | FEATURE_OSD) +#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC +#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC +#define CURRENT_METER_SCALE_DEFAULT 140 // USART5 Rx, PD2 #define SPEKTRUM_BIND