1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 16:55:36 +03:00

Update target config for FLYWOOF7DUAL,F405,F411 (#8750)

Update target config for FLYWOOF7DUAL,F405,F411
This commit is contained in:
Michael Keller 2019-09-15 10:41:26 +12:00 committed by GitHub
commit 3bf89decdd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 94 additions and 19 deletions

View file

@ -40,5 +40,5 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
DEF_TIM(TIM3, CH4, PB1, TIM_USE_ANY, 0, 0), // RSSI 1,2
DEF_TIM(TIM5, CH4, PA3, TIM_USE_ANY, 0, 1), // RX2 1,0
DEF_TIM(TIM2, CH3, PB10, TIM_USE_CAMERA_CONTROL, 0, 0), // CAM CC 1,1
DEF_TIM(TIM2, CH4, PB11, TIM_USE_LED, 0, 0), // LED 1,6
DEF_TIM(TIM2, CH1, PA15, TIM_USE_LED, 0, 0), // LED 1,5
};

View file

@ -129,7 +129,7 @@
#define USE_PINIO
#define PINIO1_PIN PB5 // VTX switcher
#define PINIO2_PIN PA15 // Camera switcher
//#define PINIO2_PIN PA15 // Camera switcher
#define USE_PINIOBOX
#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_TELEMETRY | FEATURE_SOFTSERIAL | FEATURE_LED_STRIP)

View file

@ -0,0 +1,36 @@
/*
* This file is part of Cleanflight and Betaflight.
*
* Cleanflight and Betaflight are free software. You can redistribute
* this software and/or modify this software 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 and Betaflight are distributed in the hope that they
* 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 this software.
*
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include "platform.h"
#include "io/serial.h"
#include "pg/piniobox.h"
#include "target.h"
#define USE_TARGET_CONFIG
void targetConfiguration(void)
{
pinioBoxConfigMutable()->permanentId[0] = 40;
pinioBoxConfigMutable()->permanentId[1] = 41;
}

View file

@ -29,7 +29,7 @@
const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
DEF_TIM(TIM11, CH1, PB9, TIM_USE_PPM, 0, 0), // PPM
DEF_TIM(TIM8, CH1, PC6, TIM_USE_PPM, 0, 0), // PPM(2,2)-TX6
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // S1 (1,2)
DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // S2 (1,4)
DEF_TIM(TIM2, CH2, PB3, TIM_USE_MOTOR, 0, 0), // S3 (1,6)
@ -38,5 +38,8 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0), // S6 (2,1)
DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // LED STRIP(2,6)
DEF_TIM(TIM4, CH3, PB8, TIM_USE_CAMERA_CONTROL, 0, 0), // FC CAM(1,7)
DEF_TIM(TIM2, CH3, PB10, TIM_USE_ANY, 0, 0), // TX3-S7(1,1)
DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // TX2-S8(1,0)
DEF_TIM(TIM5, CH4, PA3, TIM_USE_ANY, 0, 1), // RX2(1,3)
};

View file

@ -20,6 +20,7 @@
#pragma once
#define USE_TARGET_CONFIG
#define TARGET_BOARD_IDENTIFIER "FWF7"
#define USBD_PRODUCT_STRING "FLYWOOF7DUAL"
@ -51,11 +52,8 @@
#define USE_ACC
#define USE_ACC_SPI_MPU6000
#define USE_ACC_SPI_ICM20689
#define GYRO_1_ALIGN CW270_DEG
#define GYRO_1_ALIGN CW180_DEG_FLIP
#define GYRO_2_ALIGN CW270_DEG
#define GYRO_CONFIG_USE_GYRO_DEFAULT GYRO_CONFIG_USE_GYRO_2
#define USE_BARO
@ -140,6 +138,11 @@
#define VBAT_ADC_PIN PC1
#define RSSI_ADC_PIN PC2
#define USE_PINIO
#define PINIO1_PIN PB0 // VTX power switcher
#define PINIO2_PIN PB9 // 2xCamera switcher
#define USE_PINIOBOX
#define CURRENT_METER_SCALE_DEFAULT 170
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
@ -158,7 +161,7 @@
#define TARGET_IO_PORTC 0xffff
#define TARGET_IO_PORTD (BIT(2))
#define USABLE_TIMER_CHANNEL_COUNT 9
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(8) |TIM_N(11) )
#define USABLE_TIMER_CHANNEL_COUNT 12
#define USED_TIMERS (TIM_N(1) | TIM_N(2) | TIM_N(3) | TIM_N(4) | TIM_N(5) |TIM_N(8) )

View file

@ -23,6 +23,10 @@
#include "platform.h"
#if defined(FLYWOOF405)
#include "pg/piniobox.h"
#endif
#ifdef USE_TARGET_CONFIG
#include "config_helper.h"
@ -38,6 +42,10 @@ static targetSerialPortFunction_t targetSerialPortFunction[] = {
void targetConfiguration(void)
{
#if defined(FLYWOOF405)
pinioBoxConfigMutable()->permanentId[0] = 40;
pinioBoxConfigMutable()->permanentId[1] = 41;
#endif
targetSerialPortFunctionConfig(targetSerialPortFunction, ARRAYLEN(targetSerialPortFunction));
telemetryConfigMutable()->halfDuplex = 0;
telemetryConfigMutable()->telemetry_inverted = true;

View file

@ -48,7 +48,7 @@ const timerHardware_t timerHardware[USABLE_TIMER_CHANNEL_COUNT] = {
#if defined(KAKUTEF4V2)
DEF_TIM(TIM8, CH3, PC8, TIM_USE_LED, 0, 0), // LED_STRIP - DMA2_ST2
#elif defined(FLYWOOF405)
DEF_TIM(TIM1, CH2, PA9, TIM_USE_PWM, 0, 0), // FC CAM
DEF_TIM(TIM1, CH2, PA9, TIM_USE_CAMERA_CONTROL, 0, 0), // FC CAM
#else
DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0), // S5_OUT - DMA1_ST2
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 1), // S6_OUT - DMA2_ST4

View file

@ -149,7 +149,11 @@
#define USE_ESCSERIAL
#if defined(FLYWOOF405)
#define ESCSERIAL_TIMER_TX_PIN PB8
#define ESCSERIAL_TIMER_TX_PIN PB8
#define USE_PINIO
#define PINIO1_PIN PB12 // VTX power switcher
#define PINIO2_PIN PB13 // 2xCamera switcher
#define USE_PINIOBOX
#else
#define ESCSERIAL_TIMER_TX_PIN PC7 // (HARDARE=0,PPM)
#endif
@ -191,7 +195,7 @@
#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(8))
#elif defined(FLYWOOF405)
#define USABLE_TIMER_CHANNEL_COUNT 11
#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(4)| TIM_N(8))
#define USED_TIMERS ( TIM_N(1) | TIM_N(2) | TIM_N(3)| TIM_N(4)| TIM_N(8)| TIM_N(10))
#else
#define USABLE_TIMER_CHANNEL_COUNT 8
#define USED_TIMERS ( TIM_N(2) | TIM_N(3) | TIM_N(5) | TIM_N(8))