diff --git a/src/main/target/KAKUTEF4/config.c b/src/main/target/KAKUTEF4/config.c new file mode 100644 index 0000000000..ba1d2f953e --- /dev/null +++ b/src/main/target/KAKUTEF4/config.c @@ -0,0 +1,38 @@ +/* + * 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 "io/serial.h" + +#include "rx/rx.h" + +#include "telemetry/telemetry.h" + + +void targetConfiguration(void) +{ + serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(TELEMETRY_UART)].functionMask = FUNCTION_TELEMETRY_SMARTPORT; + telemetryConfigMutable()->halfDuplex = 0; + telemetryConfigMutable()->telemetry_inverted = true; +} +#endif diff --git a/src/main/target/KAKUTEF4/target.h b/src/main/target/KAKUTEF4/target.h index 87839003c7..7e2e3dc217 100644 --- a/src/main/target/KAKUTEF4/target.h +++ b/src/main/target/KAKUTEF4/target.h @@ -127,10 +127,11 @@ #define RSSI_ADC_PIN PC1 #define RSSI_ADC_CHANNEL ADC_Channel_11 -#define DEFAULT_FEATURES (FEATURE_OSD) +#define DEFAULT_FEATURES ( FEATURE_TELEMETRY | FEATURE_OSD ) #define DEFAULT_RX_FEATURE FEATURE_RX_SERIAL #define SERIALRX_PROVIDER SERIALRX_SBUS #define SERIALRX_UART SERIAL_PORT_USART3 +#define TELEMETRY_UART SERIAL_PORT_USART1 #define USE_SERIAL_4WAY_BLHELI_INTERFACE