From d186a8b51079d6215d178b7ada4a2d97b72c6902 Mon Sep 17 00:00:00 2001
From: Wayne <118108543+wchnflr@users.noreply.github.com>
Date: Sat, 19 Aug 2023 00:08:21 -0400
Subject: [PATCH 01/61] Create FLYWOOF405S_AIO
---
src/main/target/FLYWOOF405S_AIO | 1 +
1 file changed, 1 insertion(+)
create mode 100644 src/main/target/FLYWOOF405S_AIO
diff --git a/src/main/target/FLYWOOF405S_AIO b/src/main/target/FLYWOOF405S_AIO
new file mode 100644
index 0000000000..8b13789179
--- /dev/null
+++ b/src/main/target/FLYWOOF405S_AIO
@@ -0,0 +1 @@
+
From 56dc75b769d48a2053bf9c3ac369efea191d3faa Mon Sep 17 00:00:00 2001
From: Wayne <118108543+wchnflr@users.noreply.github.com>
Date: Sat, 19 Aug 2023 00:10:43 -0400
Subject: [PATCH 02/61] Delete FLYWOOF405S_AIO
---
src/main/target/FLYWOOF405S_AIO | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 src/main/target/FLYWOOF405S_AIO
diff --git a/src/main/target/FLYWOOF405S_AIO b/src/main/target/FLYWOOF405S_AIO
deleted file mode 100644
index 8b13789179..0000000000
--- a/src/main/target/FLYWOOF405S_AIO
+++ /dev/null
@@ -1 +0,0 @@
-
From 2efa875baf8bb7988d140f64c9e7536cf084ee83 Mon Sep 17 00:00:00 2001
From: Wayne <118108543+wchnflr@users.noreply.github.com>
Date: Sat, 19 Aug 2023 00:14:55 -0400
Subject: [PATCH 03/61] Create CMakeLists
---
src/main/target/FLYWOOF405S_AIO/CMakeLists | 1 +
1 file changed, 1 insertion(+)
create mode 100644 src/main/target/FLYWOOF405S_AIO/CMakeLists
diff --git a/src/main/target/FLYWOOF405S_AIO/CMakeLists b/src/main/target/FLYWOOF405S_AIO/CMakeLists
new file mode 100644
index 0000000000..f7a888b242
--- /dev/null
+++ b/src/main/target/FLYWOOF405S_AIO/CMakeLists
@@ -0,0 +1 @@
+target_stm32f405xg(FLYWOOF405S_AIO)
From ac14e690c294ca3ea7c1d1c5f848289bae1b30b6 Mon Sep 17 00:00:00 2001
From: Wayne <118108543+wchnflr@users.noreply.github.com>
Date: Sat, 19 Aug 2023 00:15:17 -0400
Subject: [PATCH 04/61] Add files via upload
---
src/main/target/FLYWOOF405S_AIO/target.c | 38 +++++
src/main/target/FLYWOOF405S_AIO/target.h | 175 +++++++++++++++++++++++
2 files changed, 213 insertions(+)
create mode 100644 src/main/target/FLYWOOF405S_AIO/target.c
create mode 100644 src/main/target/FLYWOOF405S_AIO/target.h
diff --git a/src/main/target/FLYWOOF405S_AIO/target.c b/src/main/target/FLYWOOF405S_AIO/target.c
new file mode 100644
index 0000000000..1191b9f181
--- /dev/null
+++ b/src/main/target/FLYWOOF405S_AIO/target.c
@@ -0,0 +1,38 @@
+/*
+ * This file is part of INAV.
+ *
+ * INAV 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.
+ *
+ * INAV 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 INAV. If not, see .
+ */
+
+#include
+#include
+#include "drivers/io.h"
+#include "drivers/pwm_mapping.h"
+#include "drivers/timer.h"
+
+timerHardware_t timerHardware[] = {
+ DEF_TIM(TIM3, CH3, PB0, TIM_USE_MC_MOTOR | TIM_USE_FW_MOTOR, 0, 0), // S1 D(1,3,2)
+ DEF_TIM(TIM3, CH4, PB1, TIM_USE_MC_MOTOR | TIM_USE_FW_MOTOR, 0, 0), // S2 D(1,0,2)
+
+ DEF_TIM(TIM2, CH4, PA3, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 1), // S3 D(1,7,5)
+ DEF_TIM(TIM2, CH3, PA2, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S4 D(1,2,5)
+ DEF_TIM(TIM3, CH2, PB5, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S5 D(2,4,7)
+ DEF_TIM(TIM8, CH4, PC9, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S6
+ DEF_TIM(TIM8, CH3, PC8, TIM_USE_MC_SERVO | TIM_USE_FW_SERVO, 0, 0), // S7
+
+ DEF_TIM(TIM1, CH2, PA9, TIM_USE_LED, 0, 0), //2812LED D(1,5,3)
+ DEF_TIM(TIM10, CH1, PB8, TIM_USE_PPM, 0, 0), // PPM
+};
+
+const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/FLYWOOF405S_AIO/target.h b/src/main/target/FLYWOOF405S_AIO/target.h
new file mode 100644
index 0000000000..3ba0063d96
--- /dev/null
+++ b/src/main/target/FLYWOOF405S_AIO/target.h
@@ -0,0 +1,175 @@
+/*
+ * This file is part of INAV.
+ *
+ * INAV 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.
+ *
+ * INAV 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 INAV. If not, see .
+ */
+
+#pragma once
+
+#define TARGET_BOARD_IDENTIFIER "F4SA"
+#define USBD_PRODUCT_STRING "FLYWOOF405S_AIO"
+
+
+#define LED0 PC14 //Green
+#define BEEPER PC13
+#define BEEPER_INVERTED
+
+// *************** SPI1 Gyro & ACC *******************
+#define USE_SPI
+#define USE_SPI_DEVICE_1
+
+#define SPI1_SCK_PIN PA5
+#define SPI1_MISO_PIN PA6
+#define SPI1_MOSI_PIN PA7
+
+#define USE_IMU_MPU6000
+#define IMU_MPU6000_ALIGN CW180_DEG
+#define MPU6000_CS_PIN PB12
+#define MPU6000_SPI_BUS BUS_SPI1
+
+#define USE_IMU_BMI270
+#define IMU_BMI270_ALIGN CW180_DEG
+#define BMI270_CS_PIN PB12
+#define BMI270_SPI_BUS BUS_SPI1
+
+#define USE_IMU_ICM42605
+#define IMU_ICM42605_ALIGN CW270_DEG
+#define ICM42605_CS_PIN PB12
+#define ICM42605_SPI_BUS BUS_SPI1
+
+#define USE_EXTI
+#define GYRO_INT_EXTI PB13
+#define USE_MPU_DATA_READY_SIGNAL
+
+// *************** I2C /Baro/Mag *********************
+#define USE_I2C
+#define USE_I2C_DEVICE_1
+#define I2C1_SCL PB8
+#define I2C1_SDA PB9
+
+#define USE_BARO
+#define BARO_I2C_BUS BUS_I2C1
+#define USE_BARO_BMP280
+#define USE_BARO_MS5611
+#define USE_BARO_BMP085
+#define USE_BARO_DPS310
+#define USE_BARO_SPL06
+
+#define USE_MAG
+#define MAG_I2C_BUS BUS_I2C1
+#define USE_MAG_AK8963
+#define USE_MAG_AK8975
+#define USE_MAG_HMC5883
+#define USE_MAG_QMC5883
+#define USE_MAG_IST8310
+#define USE_MAG_MAG3110
+#define USE_MAG_LIS3MDL
+
+#define USE_RANGEFINDER
+#define USE_RANGEFINDER_HCSR04_I2C
+#define RANGEFINDER_I2C_BUS BUS_I2C1
+#define PITOT_I2C_BUS BUS_I2C1
+#define TEMPERATURE_I2C_BUS BUS_I2C1
+
+
+
+// *************** SPI2 OSD ***************************
+#define USE_SPI_DEVICE_3
+#define SPI3_SCK_PIN PC10
+#define SPI3_MISO_PIN PC11
+#define SPI3_MOSI_PIN PC12
+
+#define USE_OSD
+#define USE_MAX7456
+#define MAX7456_SPI_BUS BUS_SPI3
+#define MAX7456_CS_PIN PB14//
+
+// *************** Onboard flash ********************
+
+#define USE_FLASHFS
+#define USE_FLASH_M25P16
+#define M25P16_CS_PIN PB3
+#define M25P16_SPI_BUS BUS_SPI3
+
+#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
+
+
+// *************** UART *****************************
+#define USB_IO
+#define USE_VCP
+#define VBUS_SENSING_PIN PA8
+#define VBUS_SENSING_ENABLED
+
+#define USE_UART1
+#define UART1_TX_PIN PB6
+#define UART1_RX_PIN PA10
+
+// 20230817 Added UART2
+//#define USE_UART2
+//#define UART2_TX_PIN PD5
+//#define UART2_RX_PIN PD6
+
+#define USE_UART3
+#define UART3_TX_PIN PB10
+#define UART3_RX_PIN PB11
+
+#define USE_UART4
+#define UART4_TX_PIN PA0
+#define UART4_RX_PIN PA1
+
+#define USE_UART5
+#define UART5_TX_PIN NONE
+#define UART5_RX_PIN PD2
+
+#define USE_UART6
+#define UART6_TX_PIN PC6
+#define UART6_RX_PIN PC7
+
+#define SERIAL_PORT_COUNT 6
+
+#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
+#define SERIALRX_PROVIDER SERIALRX_SBUS
+#define SERIALRX_UART SERIAL_PORT_USART3
+
+
+// *************** ADC ***************************
+#define USE_ADC
+#define ADC_INSTANCE ADC1
+#define ADC1_DMA_STREAM DMA2_Stream0
+#define ADC_CHANNEL_1_PIN PC3
+#define ADC_CHANNEL_2_PIN PC2
+#define ADC_CHANNEL_3_PIN PC0
+#define VBAT_ADC_CHANNEL ADC_CHN_1
+#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
+#define RSSI_ADC_CHANNEL ADC_CHN_3
+
+// *************** LED2812 ************************
+#define USE_LED_STRIP
+#define WS2811_PIN PA9
+
+// *************** OTHERS *************************
+#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY | FEATURE_SOFTSERIAL)
+#define CURRENT_METER_SCALE 250
+
+#define USE_DSHOT
+#define USE_ESC_SENSOR
+
+#define USE_SERIAL_4WAY_BLHELI_INTERFACE
+
+#define TARGET_IO_PORTA 0xffff
+#define TARGET_IO_PORTB 0xffff
+#define TARGET_IO_PORTC 0xffff
+#define TARGET_IO_PORTD (BIT(2))
+
+#define MAX_PWM_OUTPUT_PORTS 8
From 45b5c88767db33f5b0750b8acc271bb90b9a7451 Mon Sep 17 00:00:00 2001
From: Wayne <118108543+wchnflr@users.noreply.github.com>
Date: Sat, 19 Aug 2023 00:21:20 -0400
Subject: [PATCH 05/61] Update target.h
---
src/main/target/FLYWOOF405S_AIO/target.h | 5 -----
1 file changed, 5 deletions(-)
diff --git a/src/main/target/FLYWOOF405S_AIO/target.h b/src/main/target/FLYWOOF405S_AIO/target.h
index 3ba0063d96..6cdc18d987 100644
--- a/src/main/target/FLYWOOF405S_AIO/target.h
+++ b/src/main/target/FLYWOOF405S_AIO/target.h
@@ -115,11 +115,6 @@
#define UART1_TX_PIN PB6
#define UART1_RX_PIN PA10
-// 20230817 Added UART2
-//#define USE_UART2
-//#define UART2_TX_PIN PD5
-//#define UART2_RX_PIN PD6
-
#define USE_UART3
#define UART3_TX_PIN PB10
#define UART3_RX_PIN PB11
From 437a805366bf828aa0f580dc5bfe8fe4e0b773b1 Mon Sep 17 00:00:00 2001
From: Wayne <118108543+wchnflr@users.noreply.github.com>
Date: Sat, 19 Aug 2023 07:48:19 -0400
Subject: [PATCH 06/61] Update target.h
Changed MPU6000 and BMI270 gyro orientation from CW180 to CW270
---
src/main/target/FLYWOOF405S_AIO/target.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/target/FLYWOOF405S_AIO/target.h b/src/main/target/FLYWOOF405S_AIO/target.h
index 6cdc18d987..eb6fe6c50d 100644
--- a/src/main/target/FLYWOOF405S_AIO/target.h
+++ b/src/main/target/FLYWOOF405S_AIO/target.h
@@ -34,12 +34,12 @@
#define SPI1_MOSI_PIN PA7
#define USE_IMU_MPU6000
-#define IMU_MPU6000_ALIGN CW180_DEG
+#define IMU_MPU6000_ALIGN CW270_DEG
#define MPU6000_CS_PIN PB12
#define MPU6000_SPI_BUS BUS_SPI1
#define USE_IMU_BMI270
-#define IMU_BMI270_ALIGN CW180_DEG
+#define IMU_BMI270_ALIGN CW270_DEG
#define BMI270_CS_PIN PB12
#define BMI270_SPI_BUS BUS_SPI1
From a19e2ba006a765bf7169a5ac70e81ad2f0ff54d9 Mon Sep 17 00:00:00 2001
From: Wayne <118108543+wchnflr@users.noreply.github.com>
Date: Sat, 19 Aug 2023 23:28:18 -0400
Subject: [PATCH 07/61] Update target.h
Added UART2
Bumped SERIAL_PORT_COUNT from 6 to 7
Changed TARGET_IO_PORTD mask from (BIT(2)) to 0xffff
---
src/main/target/FLYWOOF405S_AIO/target.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/main/target/FLYWOOF405S_AIO/target.h b/src/main/target/FLYWOOF405S_AIO/target.h
index eb6fe6c50d..f52517a507 100644
--- a/src/main/target/FLYWOOF405S_AIO/target.h
+++ b/src/main/target/FLYWOOF405S_AIO/target.h
@@ -115,6 +115,10 @@
#define UART1_TX_PIN PB6
#define UART1_RX_PIN PA10
+#define USE_UART2
+#define UART2_TX_PIN PD5
+#define UART2_RX_PIN PD6
+
#define USE_UART3
#define UART3_TX_PIN PB10
#define UART3_RX_PIN PB11
@@ -131,7 +135,7 @@
#define UART6_TX_PIN PC6
#define UART6_RX_PIN PC7
-#define SERIAL_PORT_COUNT 6
+#define SERIAL_PORT_COUNT 7
#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
#define SERIALRX_PROVIDER SERIALRX_SBUS
@@ -165,6 +169,6 @@
#define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC 0xffff
-#define TARGET_IO_PORTD (BIT(2))
+#define TARGET_IO_PORTD 0xffff
#define MAX_PWM_OUTPUT_PORTS 8
From 00bfca45fcbeca58881a3b5431f72286c945e2f8 Mon Sep 17 00:00:00 2001
From: Wayne <118108543+wchnflr@users.noreply.github.com>
Date: Sun, 20 Aug 2023 23:28:19 -0400
Subject: [PATCH 08/61] Update target.c
Fixed motor map to match Cinerace20 O3 so they don't need to be remapped in INAV Configurator.
---
src/main/target/FLYWOOF405S_AIO/target.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/target/FLYWOOF405S_AIO/target.c b/src/main/target/FLYWOOF405S_AIO/target.c
index 1191b9f181..be743d87be 100644
--- a/src/main/target/FLYWOOF405S_AIO/target.c
+++ b/src/main/target/FLYWOOF405S_AIO/target.c
@@ -22,11 +22,11 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM3, CH3, PB0, TIM_USE_MC_MOTOR | TIM_USE_FW_MOTOR, 0, 0), // S1 D(1,3,2)
+ DEF_TIM(TIM2, CH3, PA2, TIM_USE_MC_MOTOR | TIM_USE_FW_MOTOR, 0, 0), // S1 D(1,3,2)
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MC_MOTOR | TIM_USE_FW_MOTOR, 0, 0), // S2 D(1,0,2)
DEF_TIM(TIM2, CH4, PA3, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 1), // S3 D(1,7,5)
- DEF_TIM(TIM2, CH3, PA2, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S4 D(1,2,5)
+ DEF_TIM(TIM3, CH3, PB0, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S4 D(1,2,5)
DEF_TIM(TIM3, CH2, PB5, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S5 D(2,4,7)
DEF_TIM(TIM8, CH4, PC9, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S6
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MC_SERVO | TIM_USE_FW_SERVO, 0, 0), // S7
From 3fe487d775e5441ca3115f0e394f10f6e1830f3a Mon Sep 17 00:00:00 2001
From: Wayne <118108543+wchnflr@users.noreply.github.com>
Date: Mon, 21 Aug 2023 19:26:46 -0400
Subject: [PATCH 09/61] Update target.c
Remapped Motors 1-4 to match motor direction (Props In or Props Out) arrows in INAV Configurator.
---
src/main/target/FLYWOOF405S_AIO/target.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/main/target/FLYWOOF405S_AIO/target.c b/src/main/target/FLYWOOF405S_AIO/target.c
index be743d87be..3053274656 100644
--- a/src/main/target/FLYWOOF405S_AIO/target.c
+++ b/src/main/target/FLYWOOF405S_AIO/target.c
@@ -22,11 +22,10 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM2, CH3, PA2, TIM_USE_MC_MOTOR | TIM_USE_FW_MOTOR, 0, 0), // S1 D(1,3,2)
- DEF_TIM(TIM3, CH4, PB1, TIM_USE_MC_MOTOR | TIM_USE_FW_MOTOR, 0, 0), // S2 D(1,0,2)
-
- DEF_TIM(TIM2, CH4, PA3, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 1), // S3 D(1,7,5)
- DEF_TIM(TIM3, CH3, PB0, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S4 D(1,2,5)
+ DEF_TIM(TIM3, CH4, PB1, TIM_USE_MC_MOTOR | TIM_USE_FW_MOTOR, 0, 0), // S1 D(1,0,2)
+ DEF_TIM(TIM2, CH3, PA2, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S2 D(1,2,5)
+ DEF_TIM(TIM3, CH3, PB0, TIM_USE_MC_MOTOR | TIM_USE_FW_MOTOR, 0, 0), // S3 D(1,3,2)
+ DEF_TIM(TIM2, CH4, PA3, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 1), // S4 D(1,7,5)
DEF_TIM(TIM3, CH2, PB5, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S5 D(2,4,7)
DEF_TIM(TIM8, CH4, PC9, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S6
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MC_SERVO | TIM_USE_FW_SERVO, 0, 0), // S7
From 46bba40ac19a65763c2e03a808396f8d1287360c Mon Sep 17 00:00:00 2001
From: Wayne <118108543+wchnflr@users.noreply.github.com>
Date: Wed, 30 Aug 2023 02:37:53 -0400
Subject: [PATCH 10/61] Update target.h
Changed TARGET_IO_PORTD mask from 0xffff to 0x0064 to strictly match PD5 and PD6 pins.
---
src/main/target/FLYWOOF405S_AIO/target.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/target/FLYWOOF405S_AIO/target.h b/src/main/target/FLYWOOF405S_AIO/target.h
index f52517a507..c25dedfeb9 100644
--- a/src/main/target/FLYWOOF405S_AIO/target.h
+++ b/src/main/target/FLYWOOF405S_AIO/target.h
@@ -169,6 +169,6 @@
#define TARGET_IO_PORTA 0xffff
#define TARGET_IO_PORTB 0xffff
#define TARGET_IO_PORTC 0xffff
-#define TARGET_IO_PORTD 0xffff
+#define TARGET_IO_PORTD 0x0064
#define MAX_PWM_OUTPUT_PORTS 8
From 46d8e3cb939763250d0f1a5223b617995d639e49 Mon Sep 17 00:00:00 2001
From: Wayne <118108543+wchnflr@users.noreply.github.com>
Date: Thu, 31 Aug 2023 16:32:45 -0700
Subject: [PATCH 11/61] Update target.c
Anothe rearrangement of motor assignments to match S1, S2, S3, S4 in Inav Configurator and actually fly properly.
---
src/main/target/FLYWOOF405S_AIO/target.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/target/FLYWOOF405S_AIO/target.c b/src/main/target/FLYWOOF405S_AIO/target.c
index 3053274656..c7a49c7473 100644
--- a/src/main/target/FLYWOOF405S_AIO/target.c
+++ b/src/main/target/FLYWOOF405S_AIO/target.c
@@ -22,10 +22,10 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM3, CH4, PB1, TIM_USE_MC_MOTOR | TIM_USE_FW_MOTOR, 0, 0), // S1 D(1,0,2)
- DEF_TIM(TIM2, CH3, PA2, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S2 D(1,2,5)
- DEF_TIM(TIM3, CH3, PB0, TIM_USE_MC_MOTOR | TIM_USE_FW_MOTOR, 0, 0), // S3 D(1,3,2)
- DEF_TIM(TIM2, CH4, PA3, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 1), // S4 D(1,7,5)
+ DEF_TIM(TIM2, CH4, PA3, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 1), // S1
+ DEF_TIM(TIM3, CH3, PB0, TIM_USE_MC_MOTOR | TIM_USE_FW_MOTOR, 0, 0), // S2
+ DEF_TIM(TIM2, CH3, PA2, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S3
+ DEF_TIM(TIM3, CH4, PB1, TIM_USE_MC_MOTOR | TIM_USE_FW_MOTOR, 0, 0), // S4
DEF_TIM(TIM3, CH2, PB5, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S5 D(2,4,7)
DEF_TIM(TIM8, CH4, PC9, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S6
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MC_SERVO | TIM_USE_FW_SERVO, 0, 0), // S7
From 5f3aa7aa54dd6d83e0fae794c99db1b27f81312a Mon Sep 17 00:00:00 2001
From: Wayne <118108543+wchnflr@users.noreply.github.com>
Date: Fri, 1 Sep 2023 06:13:44 -0700
Subject: [PATCH 12/61] Update CMakeLists
Added SKIP_RELEASES tag
---
src/main/target/FLYWOOF405S_AIO/CMakeLists | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/target/FLYWOOF405S_AIO/CMakeLists b/src/main/target/FLYWOOF405S_AIO/CMakeLists
index f7a888b242..6e3af8a3cb 100644
--- a/src/main/target/FLYWOOF405S_AIO/CMakeLists
+++ b/src/main/target/FLYWOOF405S_AIO/CMakeLists
@@ -1 +1 @@
-target_stm32f405xg(FLYWOOF405S_AIO)
+target_stm32f405xg(FLYWOOF405S_AIO SKIP_RELEASES)
From 2d8908a798cda8dc34e8cd122e0c14f222b7104c Mon Sep 17 00:00:00 2001
From: Wayne <118108543+wchnflr@users.noreply.github.com>
Date: Wed, 27 Sep 2023 19:44:55 -0400
Subject: [PATCH 13/61] Changed TIM_USE_MC|FW_MOTOR to TIM_USE_OUTPUT_AUTO
---
src/main/target/FLYWOOF405S_AIO/target.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/main/target/FLYWOOF405S_AIO/target.c b/src/main/target/FLYWOOF405S_AIO/target.c
index c7a49c7473..0d51ec0c10 100644
--- a/src/main/target/FLYWOOF405S_AIO/target.c
+++ b/src/main/target/FLYWOOF405S_AIO/target.c
@@ -22,13 +22,13 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM2, CH4, PA3, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 1), // S1
- DEF_TIM(TIM3, CH3, PB0, TIM_USE_MC_MOTOR | TIM_USE_FW_MOTOR, 0, 0), // S2
- DEF_TIM(TIM2, CH3, PA2, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S3
- DEF_TIM(TIM3, CH4, PB1, TIM_USE_MC_MOTOR | TIM_USE_FW_MOTOR, 0, 0), // S4
- DEF_TIM(TIM3, CH2, PB5, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S5 D(2,4,7)
- DEF_TIM(TIM8, CH4, PC9, TIM_USE_MC_MOTOR | TIM_USE_FW_SERVO, 0, 0), // S6
- DEF_TIM(TIM8, CH3, PC8, TIM_USE_MC_SERVO | TIM_USE_FW_SERVO, 0, 0), // S7
+ DEF_TIM(TIM2, CH4, PA3, TIM_USE_OUTPUT_AUTO, 0, 1), // S1
+ DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S2
+ DEF_TIM(TIM2, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0), // S3
+ DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // S4
+ DEF_TIM(TIM3, CH2, PB5, TIM_USE_OUTPUT_AUTO, 0, 0), // S5
+ DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // S6
+ DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0), // S7
DEF_TIM(TIM1, CH2, PA9, TIM_USE_LED, 0, 0), //2812LED D(1,5,3)
DEF_TIM(TIM10, CH1, PB8, TIM_USE_PPM, 0, 0), // PPM
From 13d8fbab909b8fa6241daf84a3f8e53c108ae4c6 Mon Sep 17 00:00:00 2001
From: MrD-RC
Date: Mon, 30 Oct 2023 13:24:55 +0000
Subject: [PATCH 14/61] Move minimum ground speed to a changeable parameter
---
docs/Settings.md | 10 ++++++++++
src/main/fc/settings.yaml | 6 ++++++
src/main/navigation/navigation_fixedwing.c | 7 +++----
src/main/sensors/battery.c | 2 +-
src/main/sensors/battery_config_structs.h | 2 ++
5 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/docs/Settings.md b/docs/Settings.md
index e00265306b..61dc113d7a 100644
--- a/docs/Settings.md
+++ b/docs/Settings.md
@@ -3692,6 +3692,16 @@ When ON, NAV engine will slow down when switching to the next waypoint. This pri
---
+### nav_min_ground_speed
+
+Minimum ground speed for navigation flight modes [m/s]. Default 7 m/s.
+
+| Default | Min | Max |
+| --- | --- | --- |
+| 7 | 6 | 45 |
+
+---
+
### nav_min_rth_distance
Minimum distance from homepoint when RTH full procedure will be activated [cm]. Below this distance, the mode will activate at the current location and the final phase is executed (loiter / land). Above this distance, the full procedure is activated, which may include initial climb and flying directly to the homepoint before entering the loiter / land phase.
diff --git a/src/main/fc/settings.yaml b/src/main/fc/settings.yaml
index 87daf753cf..73d16d8b14 100755
--- a/src/main/fc/settings.yaml
+++ b/src/main/fc/settings.yaml
@@ -1043,6 +1043,12 @@ groups:
default_value: 1000
min: PWM_RANGE_MIN
max: PWM_RANGE_MAX
+ - name: nav_min_ground_speed
+ description: "Minimum ground speed for navigation flight modes [m/s]. Default 7 m/s."
+ default_value: 7
+ field: nav.min_ground_speed
+ min: 6
+ max: 45
- name: nav_mc_hover_thr
description: "Multicopter hover throttle hint for altitude controller. Should be set to approximate throttle value when drone is hovering."
default_value: 1300
diff --git a/src/main/navigation/navigation_fixedwing.c b/src/main/navigation/navigation_fixedwing.c
index e6084e0972..148617a9a4 100755
--- a/src/main/navigation/navigation_fixedwing.c
+++ b/src/main/navigation/navigation_fixedwing.c
@@ -60,9 +60,8 @@
#define NAV_FW_BASE_PITCH_CUTOFF_FREQUENCY_HZ 2.0f
#define NAV_FW_BASE_ROLL_CUTOFF_FREQUENCY_HZ 10.0f
-// If we are going slower than NAV_FW_MIN_VEL_SPEED_BOOST - boost throttle to fight against the wind
+// If we are going slower than the minimum ground speed (currentBatteryProfile->nav.min_ground_speed) - boost throttle to fight against the wind
#define NAV_FW_THROTTLE_SPEED_BOOST_GAIN 1.5f
-#define NAV_FW_MIN_VEL_SPEED_BOOST 700.0f // 7 m/s
// If this is enabled navigation won't be applied if velocity is below 3 m/s
//#define NAV_FW_LIMIT_MIN_FLY_VELOCITY
@@ -552,10 +551,10 @@ int16_t applyFixedWingMinSpeedController(timeUs_t currentTimeUs)
previousTimePositionUpdate = currentTimeUs;
if (deltaMicrosPositionUpdate < MAX_POSITION_UPDATE_INTERVAL_US) {
- float velThrottleBoost = (NAV_FW_MIN_VEL_SPEED_BOOST - posControl.actualState.velXY) * NAV_FW_THROTTLE_SPEED_BOOST_GAIN * US2S(deltaMicrosPositionUpdate);
+ float velThrottleBoost = ((currentBatteryProfile->nav.min_ground_speed * 100.0f) - posControl.actualState.velXY) * NAV_FW_THROTTLE_SPEED_BOOST_GAIN * US2S(deltaMicrosPositionUpdate);
// If we are in the deadband of 50cm/s - don't update speed boost
- if (fabsf(posControl.actualState.velXY - NAV_FW_MIN_VEL_SPEED_BOOST) > 50) {
+ if (fabsf(posControl.actualState.velXY - (currentBatteryProfile->nav.min_ground_speed * 100.0f)) > 50) {
throttleSpeedAdjustment += velThrottleBoost;
}
diff --git a/src/main/sensors/battery.c b/src/main/sensors/battery.c
index 3eaeecc5f0..8f21c55350 100644
--- a/src/main/sensors/battery.c
+++ b/src/main/sensors/battery.c
@@ -134,6 +134,7 @@ void pgResetFn_batteryProfiles(batteryProfile_t *instance)
.failsafe_throttle = SETTING_FAILSAFE_THROTTLE_DEFAULT, // default throttle off.
.nav = {
+ .min_ground_speed = SETTING_NAV_MIN_GROUND_SPEED_DEFAULT,
.mc = {
.hover_throttle = SETTING_NAV_MC_HOVER_THR_DEFAULT,
@@ -147,7 +148,6 @@ void pgResetFn_batteryProfiles(batteryProfile_t *instance)
.launch_throttle = SETTING_NAV_FW_LAUNCH_THR_DEFAULT,
.launch_idle_throttle = SETTING_NAV_FW_LAUNCH_IDLE_THR_DEFAULT, // Motor idle or MOTOR_STOP
}
-
},
#if defined(USE_POWER_LIMITS)
diff --git a/src/main/sensors/battery_config_structs.h b/src/main/sensors/battery_config_structs.h
index 81eafef44a..183a1fd270 100644
--- a/src/main/sensors/battery_config_structs.h
+++ b/src/main/sensors/battery_config_structs.h
@@ -123,6 +123,8 @@ typedef struct batteryProfile_s {
uint16_t launch_throttle; // Launch throttle
} fw;
+ uint8_t min_ground_speed; // Minimum navigation ground speed [m/s]
+
} nav;
#if defined(USE_POWER_LIMITS)
From 835a2240a4d016db22a3ef4fe9cc4cd3abb5adc6 Mon Sep 17 00:00:00 2001
From: Darren Lines
Date: Mon, 30 Oct 2023 13:34:17 +0000
Subject: [PATCH 15/61] Update battery.c
Pump PG
---
src/main/sensors/battery.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/sensors/battery.c b/src/main/sensors/battery.c
index 8f21c55350..3273c2d057 100644
--- a/src/main/sensors/battery.c
+++ b/src/main/sensors/battery.c
@@ -97,7 +97,7 @@ static int32_t mWhDrawn = 0; // energy (milliWatt hours) draw
batteryState_e batteryState;
const batteryProfile_t *currentBatteryProfile;
-PG_REGISTER_ARRAY_WITH_RESET_FN(batteryProfile_t, MAX_BATTERY_PROFILE_COUNT, batteryProfiles, PG_BATTERY_PROFILES, 2);
+PG_REGISTER_ARRAY_WITH_RESET_FN(batteryProfile_t, MAX_BATTERY_PROFILE_COUNT, batteryProfiles, PG_BATTERY_PROFILES, 3);
void pgResetFn_batteryProfiles(batteryProfile_t *instance)
{
From c2577e477733ceb602859a9f35baa24925cc9365 Mon Sep 17 00:00:00 2001
From: "Pawel Spychalski (DzikuVx)"
Date: Tue, 31 Oct 2023 10:34:49 +0100
Subject: [PATCH 16/61] Put getConfigMixerProfile as the last byte in message
---
src/main/fc/fc_msp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/fc/fc_msp.c b/src/main/fc/fc_msp.c
index f504ffb059..fddcde00eb 100644
--- a/src/main/fc/fc_msp.c
+++ b/src/main/fc/fc_msp.c
@@ -462,9 +462,9 @@ static bool mspFcProcessOutCommand(uint16_t cmdMSP, sbuf_t *dst, mspPostProcessF
sbufWriteU16(dst, packSensorStatus());
sbufWriteU16(dst, averageSystemLoadPercent);
sbufWriteU8(dst, (getConfigBatteryProfile() << 4) | getConfigProfile());
- sbufWriteU8(dst, getConfigMixerProfile());
sbufWriteU32(dst, armingFlags);
sbufWriteData(dst, &mspBoxModeFlags, sizeof(mspBoxModeFlags));
+ sbufWriteU8(dst, getConfigMixerProfile());
}
break;
From fac64cecbbe768bfdaab09046d6b13e2bf0dd297 Mon Sep 17 00:00:00 2001
From: breadoven <56191411+breadoven@users.noreply.github.com>
Date: Tue, 31 Oct 2023 21:41:16 +0000
Subject: [PATCH 17/61] Update navigation.c
---
src/main/navigation/navigation.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/navigation/navigation.c b/src/main/navigation/navigation.c
index cb12579b83..c991531f32 100644
--- a/src/main/navigation/navigation.c
+++ b/src/main/navigation/navigation.c
@@ -4055,7 +4055,8 @@ bool navigationPositionEstimateIsHealthy(void)
navArmingBlocker_e navigationIsBlockingArming(bool *usedBypass)
{
- const bool navBoxModesEnabled = IS_RC_MODE_ACTIVE(BOXNAVRTH) || IS_RC_MODE_ACTIVE(BOXNAVWP) || IS_RC_MODE_ACTIVE(BOXNAVPOSHOLD) || (STATE(FIXED_WING_LEGACY) && IS_RC_MODE_ACTIVE(BOXNAVALTHOLD)) || (STATE(FIXED_WING_LEGACY) && (IS_RC_MODE_ACTIVE(BOXNAVCOURSEHOLD) || IS_RC_MODE_ACTIVE(BOXNAVCRUISE)));
+ const bool navBoxModesEnabled = IS_RC_MODE_ACTIVE(BOXNAVRTH) || IS_RC_MODE_ACTIVE(BOXNAVWP) || IS_RC_MODE_ACTIVE(BOXNAVCOURSEHOLD) ||
+ IS_RC_MODE_ACTIVE(BOXNAVCRUISE) || IS_RC_MODE_ACTIVE(BOXNAVPOSHOLD) || (STATE(FIXED_WING_LEGACY) && IS_RC_MODE_ACTIVE(BOXNAVALTHOLD));
if (usedBypass) {
*usedBypass = false;
From 298f45e7f78222434fbf2833b1756fea07bf48dc Mon Sep 17 00:00:00 2001
From: MrD-RC
Date: Thu, 2 Nov 2023 12:50:12 +0000
Subject: [PATCH 18/61] Move parameter out of battery profile, in to normal
settings.
---
docs/Settings.md | 2 +-
src/main/fc/settings.yaml | 12 ++++++------
src/main/navigation/navigation.c | 3 ++-
src/main/navigation/navigation.h | 1 +
src/main/navigation/navigation_fixedwing.c | 6 +++---
src/main/sensors/battery.c | 4 +---
src/main/sensors/battery_config_structs.h | 2 --
7 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/docs/Settings.md b/docs/Settings.md
index 0bf3013629..f111290c14 100644
--- a/docs/Settings.md
+++ b/docs/Settings.md
@@ -3698,7 +3698,7 @@ Minimum ground speed for navigation flight modes [m/s]. Default 7 m/s.
| Default | Min | Max |
| --- | --- | --- |
-| 7 | 6 | 45 |
+| 7 | 6 | 50 |
---
diff --git a/src/main/fc/settings.yaml b/src/main/fc/settings.yaml
index bf007b96b3..0cdac1ac93 100644
--- a/src/main/fc/settings.yaml
+++ b/src/main/fc/settings.yaml
@@ -1046,12 +1046,6 @@ groups:
default_value: 1000
min: PWM_RANGE_MIN
max: PWM_RANGE_MAX
- - name: nav_min_ground_speed
- description: "Minimum ground speed for navigation flight modes [m/s]. Default 7 m/s."
- default_value: 7
- field: nav.min_ground_speed
- min: 6
- max: 45
- name: nav_mc_hover_thr
description: "Multicopter hover throttle hint for altitude controller. Should be set to approximate throttle value when drone is hovering."
default_value: 1300
@@ -2492,6 +2486,12 @@ groups:
field: general.auto_speed
min: 10
max: 2000
+ - name: nav_min_ground_speed
+ description: "Minimum ground speed for navigation flight modes [m/s]. Default 7 m/s."
+ default_value: 7
+ field: general.min_ground_speed
+ min: 6
+ max: 50
- name: nav_max_auto_speed
description: "Maximum speed allowed in fully autonomous modes (RTH, WP) [cm/s] [Multirotor only]"
default_value: 1000
diff --git a/src/main/navigation/navigation.c b/src/main/navigation/navigation.c
index cb12579b83..800e51371e 100644
--- a/src/main/navigation/navigation.c
+++ b/src/main/navigation/navigation.c
@@ -97,7 +97,7 @@ STATIC_ASSERT(NAV_MAX_WAYPOINTS < 254, NAV_MAX_WAYPOINTS_exceeded_allowable_rang
PG_REGISTER_ARRAY(navWaypoint_t, NAV_MAX_WAYPOINTS, nonVolatileWaypointList, PG_WAYPOINT_MISSION_STORAGE, 2);
#endif
-PG_REGISTER_WITH_RESET_TEMPLATE(navConfig_t, navConfig, PG_NAV_CONFIG, 5);
+PG_REGISTER_WITH_RESET_TEMPLATE(navConfig_t, navConfig, PG_NAV_CONFIG, 6);
PG_RESET_TEMPLATE(navConfig_t, navConfig,
.general = {
@@ -132,6 +132,7 @@ PG_RESET_TEMPLATE(navConfig_t, navConfig,
#endif
.waypoint_load_on_boot = SETTING_NAV_WP_LOAD_ON_BOOT_DEFAULT, // load waypoints automatically during boot
.auto_speed = SETTING_NAV_AUTO_SPEED_DEFAULT, // speed in autonomous modes (3 m/s = 10.8 km/h)
+ .min_ground_speed = SETTING_NAV_MIN_GROUND_SPEED_DEFAULT, // Minimum ground speed (m/s)
.max_auto_speed = SETTING_NAV_MAX_AUTO_SPEED_DEFAULT, // max allowed speed autonomous modes
.max_auto_climb_rate = SETTING_NAV_AUTO_CLIMB_RATE_DEFAULT, // 5 m/s
.max_manual_speed = SETTING_NAV_MANUAL_SPEED_DEFAULT,
diff --git a/src/main/navigation/navigation.h b/src/main/navigation/navigation.h
index ecc487cc9e..adce68539c 100644
--- a/src/main/navigation/navigation.h
+++ b/src/main/navigation/navigation.h
@@ -245,6 +245,7 @@ typedef struct navConfig_s {
#endif
bool waypoint_load_on_boot; // load waypoints automatically during boot
uint16_t auto_speed; // autonomous navigation speed cm/sec
+ uint8_t min_ground_speed; // Minimum navigation ground speed [m/s]
uint16_t max_auto_speed; // maximum allowed autonomous navigation speed cm/sec
uint16_t max_auto_climb_rate; // max vertical speed limitation cm/sec
uint16_t max_manual_speed; // manual velocity control max horizontal speed
diff --git a/src/main/navigation/navigation_fixedwing.c b/src/main/navigation/navigation_fixedwing.c
index 148617a9a4..3c60f2f43d 100755
--- a/src/main/navigation/navigation_fixedwing.c
+++ b/src/main/navigation/navigation_fixedwing.c
@@ -60,7 +60,7 @@
#define NAV_FW_BASE_PITCH_CUTOFF_FREQUENCY_HZ 2.0f
#define NAV_FW_BASE_ROLL_CUTOFF_FREQUENCY_HZ 10.0f
-// If we are going slower than the minimum ground speed (currentBatteryProfile->nav.min_ground_speed) - boost throttle to fight against the wind
+// If we are going slower than the minimum ground speed (navConfig()->general.min_ground_speed) - boost throttle to fight against the wind
#define NAV_FW_THROTTLE_SPEED_BOOST_GAIN 1.5f
// If this is enabled navigation won't be applied if velocity is below 3 m/s
@@ -551,10 +551,10 @@ int16_t applyFixedWingMinSpeedController(timeUs_t currentTimeUs)
previousTimePositionUpdate = currentTimeUs;
if (deltaMicrosPositionUpdate < MAX_POSITION_UPDATE_INTERVAL_US) {
- float velThrottleBoost = ((currentBatteryProfile->nav.min_ground_speed * 100.0f) - posControl.actualState.velXY) * NAV_FW_THROTTLE_SPEED_BOOST_GAIN * US2S(deltaMicrosPositionUpdate);
+ float velThrottleBoost = ((navConfig()->general.min_ground_speed * 100.0f) - posControl.actualState.velXY) * NAV_FW_THROTTLE_SPEED_BOOST_GAIN * US2S(deltaMicrosPositionUpdate);
// If we are in the deadband of 50cm/s - don't update speed boost
- if (fabsf(posControl.actualState.velXY - (currentBatteryProfile->nav.min_ground_speed * 100.0f)) > 50) {
+ if (fabsf(posControl.actualState.velXY - (navConfig()->general.min_ground_speed * 100.0f)) > 50) {
throttleSpeedAdjustment += velThrottleBoost;
}
diff --git a/src/main/sensors/battery.c b/src/main/sensors/battery.c
index 3273c2d057..3745ed7a8e 100644
--- a/src/main/sensors/battery.c
+++ b/src/main/sensors/battery.c
@@ -97,7 +97,7 @@ static int32_t mWhDrawn = 0; // energy (milliWatt hours) draw
batteryState_e batteryState;
const batteryProfile_t *currentBatteryProfile;
-PG_REGISTER_ARRAY_WITH_RESET_FN(batteryProfile_t, MAX_BATTERY_PROFILE_COUNT, batteryProfiles, PG_BATTERY_PROFILES, 3);
+PG_REGISTER_ARRAY_WITH_RESET_FN(batteryProfile_t, MAX_BATTERY_PROFILE_COUNT, batteryProfiles, PG_BATTERY_PROFILES, 2);
void pgResetFn_batteryProfiles(batteryProfile_t *instance)
{
@@ -134,8 +134,6 @@ void pgResetFn_batteryProfiles(batteryProfile_t *instance)
.failsafe_throttle = SETTING_FAILSAFE_THROTTLE_DEFAULT, // default throttle off.
.nav = {
- .min_ground_speed = SETTING_NAV_MIN_GROUND_SPEED_DEFAULT,
-
.mc = {
.hover_throttle = SETTING_NAV_MC_HOVER_THR_DEFAULT,
},
diff --git a/src/main/sensors/battery_config_structs.h b/src/main/sensors/battery_config_structs.h
index 183a1fd270..81eafef44a 100644
--- a/src/main/sensors/battery_config_structs.h
+++ b/src/main/sensors/battery_config_structs.h
@@ -123,8 +123,6 @@ typedef struct batteryProfile_s {
uint16_t launch_throttle; // Launch throttle
} fw;
- uint8_t min_ground_speed; // Minimum navigation ground speed [m/s]
-
} nav;
#if defined(USE_POWER_LIMITS)
From 52579eb84bb45e21d5b38aef50fa1cabaa0acd5c Mon Sep 17 00:00:00 2001
From: Jonathan Hudson
Date: Sun, 5 Nov 2023 09:40:11 +0000
Subject: [PATCH 19/61] [GPS] fix GPS discovery for M6 and earlier
---
src/main/io/gps_ublox.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/main/io/gps_ublox.c b/src/main/io/gps_ublox.c
index d03c339077..8fa8366a23 100755
--- a/src/main/io/gps_ublox.c
+++ b/src/main/io/gps_ublox.c
@@ -1042,12 +1042,14 @@ STATIC_PROTOTHREAD(gpsProtocolStateThread)
gpsState.autoConfigStep = 0;
ubx_capabilities.supported = ubx_capabilities.enabledGnss = ubx_capabilities.defaultGnss = 0;
- do {
- pollGnssCapabilities();
- gpsState.autoConfigStep++;
- ptWaitTimeout((ubx_capabilities.capMaxGnss != 0), GPS_CFG_CMD_TIMEOUT_MS);
- } while (gpsState.autoConfigStep < GPS_VERSION_RETRY_TIMES && ubx_capabilities.capMaxGnss == 0);
-
+ // M6 and earlier will never get pass this step, so skip it (#9440)
+ if (gpsState.hwVersion > UBX_HW_VERSION_UBLOX6) {
+ do {
+ pollGnssCapabilities();
+ gpsState.autoConfigStep++;
+ ptWaitTimeout((ubx_capabilities.capMaxGnss != 0), GPS_CFG_CMD_TIMEOUT_MS);
+ } while (gpsState.autoConfigStep < GPS_VERSION_RETRY_TIMES && ubx_capabilities.capMaxGnss == 0);
+ }
// Configure GPS module if enabled
if (gpsState.gpsConfig->autoConfig) {
// Configure GPS
From d135f3ece75de508035a7bf2edb1661457534a3b Mon Sep 17 00:00:00 2001
From: Jonathan Hudson
Date: Sun, 5 Nov 2023 10:23:47 +0000
Subject: [PATCH 20/61] [GPS] update discovery fix for M7N as well
---
src/main/io/gps_ublox.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/main/io/gps_ublox.c b/src/main/io/gps_ublox.c
index 8fa8366a23..da0f54dd2f 100755
--- a/src/main/io/gps_ublox.c
+++ b/src/main/io/gps_ublox.c
@@ -1042,8 +1042,9 @@ STATIC_PROTOTHREAD(gpsProtocolStateThread)
gpsState.autoConfigStep = 0;
ubx_capabilities.supported = ubx_capabilities.enabledGnss = ubx_capabilities.defaultGnss = 0;
- // M6 and earlier will never get pass this step, so skip it (#9440)
- if (gpsState.hwVersion > UBX_HW_VERSION_UBLOX6) {
+ // M7 and earlier will never get pass this step, so skip it (#9440).
+ // UBLOX documents that this is M8N and later
+ if (gpsState.hwVersion > UBX_HW_VERSION_UBLOX7) {
do {
pollGnssCapabilities();
gpsState.autoConfigStep++;
From 4f3b888dc56b0578560e53dfff404f4e7e7869eb Mon Sep 17 00:00:00 2001
From: "Pawel Spychalski (DzikuVx)"
Date: Sun, 5 Nov 2023 11:42:51 +0100
Subject: [PATCH 21/61] ATOMRCF405NAVI_DELUX first take
---
.../ATOMRCF405NAVI_DELUX/CMakeLists.txt | 1 +
src/main/target/ATOMRCF405NAVI_DELUX/config.c | 37 ++++
src/main/target/ATOMRCF405NAVI_DELUX/target.c | 56 ++++++
src/main/target/ATOMRCF405NAVI_DELUX/target.h | 189 ++++++++++++++++++
4 files changed, 283 insertions(+)
create mode 100644 src/main/target/ATOMRCF405NAVI_DELUX/CMakeLists.txt
create mode 100644 src/main/target/ATOMRCF405NAVI_DELUX/config.c
create mode 100644 src/main/target/ATOMRCF405NAVI_DELUX/target.c
create mode 100644 src/main/target/ATOMRCF405NAVI_DELUX/target.h
diff --git a/src/main/target/ATOMRCF405NAVI_DELUX/CMakeLists.txt b/src/main/target/ATOMRCF405NAVI_DELUX/CMakeLists.txt
new file mode 100644
index 0000000000..b9b7af8634
--- /dev/null
+++ b/src/main/target/ATOMRCF405NAVI_DELUX/CMakeLists.txt
@@ -0,0 +1 @@
+target_stm32f405xg(ATOMRCF405NAVI_DELUX)
diff --git a/src/main/target/ATOMRCF405NAVI_DELUX/config.c b/src/main/target/ATOMRCF405NAVI_DELUX/config.c
new file mode 100644
index 0000000000..e8d9b30392
--- /dev/null
+++ b/src/main/target/ATOMRCF405NAVI_DELUX/config.c
@@ -0,0 +1,37 @@
+/*
+ * This file is part of INAV Project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * Alternatively, the contents of this file may be used under the terms
+ * of the GNU General Public License Version 3, as described below:
+ *
+ * This file is free software: you may copy, redistribute 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.
+ *
+ * This file 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 this program. If not, see http://www.gnu.org/licenses/.
+ */
+
+#include
+#include "platform.h"
+#include "fc/fc_msp_box.h"
+#include "io/piniobox.h"
+#include "io/serial.h"
+
+void targetConfiguration(void)
+{
+ serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(SERIAL_PORT_USART1)].functionMask = FUNCTION_MSP;
+ serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(SERIAL_PORT_USART1)].msp_baudrateIndex = BAUD_115200;
+
+ pinioBoxConfigMutable()->permanentId[0] = BOXARM;
+}
diff --git a/src/main/target/ATOMRCF405NAVI_DELUX/target.c b/src/main/target/ATOMRCF405NAVI_DELUX/target.c
new file mode 100644
index 0000000000..e3ff9d8f77
--- /dev/null
+++ b/src/main/target/ATOMRCF405NAVI_DELUX/target.c
@@ -0,0 +1,56 @@
+/*
+ * This file is part of INAV Project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * Alternatively, the contents of this file may be used under the terms
+ * of the GNU General Public License Version 3, as described below:
+ *
+ * This file is free software: you may copy, redistribute 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.
+ *
+ * This file 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 this program. If not, see http://www.gnu.org/licenses/.
+ */
+
+#include
+
+#include "platform.h"
+
+#include "drivers/bus.h"
+#include "drivers/io.h"
+#include "drivers/pwm_mapping.h"
+#include "drivers/timer.h"
+#include "drivers/pinio.h"
+#include "drivers/sensor.h"
+
+timerHardware_t timerHardware[] = {
+ DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S1
+ DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // S2
+
+ DEF_TIM(TIM4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0, 0), // S3
+ DEF_TIM(TIM4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0, 0), // S4
+
+ DEF_TIM(TIM2, CH1, PA15, TIM_USE_OUTPUT_AUTO, 0, 0), // S5
+ DEF_TIM(TIM2, CH3, PB10, TIM_USE_OUTPUT_AUTO, 0, 0), // S6
+ DEF_TIM(TIM2, CH4, PB11, TIM_USE_OUTPUT_AUTO, 0, 0), // S7
+
+ DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0), // S8
+ DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // S9
+ DEF_TIM(TIM8, CH2N, PB14, TIM_USE_SERVO, 0, 0), // S10
+
+ DEF_TIM(TIM1, CH3N, PB15, TIM_USE_SERVO, 0, 0), // S11
+
+ DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // LED_STRIP
+};
+
+const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/ATOMRCF405NAVI_DELUX/target.h b/src/main/target/ATOMRCF405NAVI_DELUX/target.h
new file mode 100644
index 0000000000..1134daa29f
--- /dev/null
+++ b/src/main/target/ATOMRCF405NAVI_DELUX/target.h
@@ -0,0 +1,189 @@
+/*
+ * This file is part of INAV Project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * Alternatively, the contents of this file may be used under the terms
+ * of the GNU General Public License Version 3, as described below:
+ *
+ * This file is free software: you may copy, redistribute 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.
+ *
+ * This file 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 this program. If not, see http://www.gnu.org/licenses/.
+ */
+
+#pragma once
+#define TARGET_BOARD_IDENTIFIER "AT4D"
+
+#define USBD_PRODUCT_STRING "AtomRCF405NAVI_DELUX"
+
+#define LED0 PA13
+#define LED1 PA14
+
+#define BEEPER PB2
+#define BEEPER_INVERTED
+
+/*
+ * SPI defines
+ */
+#define USE_SPI
+
+#define USE_SPI_DEVICE_1
+#define SPI1_SCK_PIN PA5
+#define SPI1_MISO_PIN PA6
+#define SPI1_MOSI_PIN PA7
+
+#define USE_SPI_DEVICE_2
+#define SPI2_SCK_PIN PB13
+#define SPI2_MISO_PIN PC2
+#define SPI2_MOSI_PIN PC3
+
+#define USE_SPI_DEVICE_3
+#define SPI3_SCK_PIN PB3
+#define SPI3_MISO_PIN PB4
+#define SPI3_MOSI_PIN PB5
+
+/*
+ * I2C defines
+ */
+#define USE_I2C
+#define DEFAULT_I2C_BUS BUS_I2C1
+
+#define USE_I2C_DEVICE_1
+#define I2C1_SCL PB8
+#define I2C1_SDA PB9
+
+//ICM42688-P
+#define USE_IMU_ICM42605
+#define IMU_ICM42605_ALIGN CW180_DEG
+#define ICM42605_CS_PIN PA4
+#define ICM42605_SPI_BUS BUS_SPI1
+
+/*
+ * Magnetometer
+ */
+#define USE_MAG
+#define MAG_I2C_BUS DEFAULT_I2C_BUS
+#define USE_MAG_ALL
+
+/*
+ * Barometer
+ */
+#define USE_BARO
+#define BARO_I2C_BUS DEFAULT_I2C_BUS
+#define USE_BARO_ALL
+
+/*
+ * Serial ports
+ */
+#define USE_VCP
+#define USE_UART1
+#define USE_UART2
+#define USE_UART3
+#define USE_UART4
+#define USE_UART5
+#define USE_UART6
+
+#define UART1_TX_PIN PA9
+#define UART1_RX_PIN PA10
+
+#define UART2_TX_PIN PA2
+#define UART2_RX_PIN PA3
+
+#define UART3_TX_PIN PC10
+#define UART3_RX_PIN PC11
+
+#define UART4_TX_PIN PA0
+#define UART4_RX_PIN PA1
+
+#define UART5_TX_PIN PC12
+#define UART5_RX_PIN PD2
+
+#define UART6_TX_PIN PC6
+#define UART6_RX_PIN PC7
+
+#define SERIAL_PORT_COUNT 7
+
+/*
+ * ADC
+ */
+#define USE_ADC
+#define ADC_INSTANCE ADC1
+#define ADC1_DMA_STREAM DMA2_Stream0
+
+#define ADC_CHANNEL_1_PIN PC0
+#define ADC_CHANNEL_2_PIN PC1
+#define ADC_CHANNEL_3_PIN PC4
+#define ADC_CHANNEL_4_PIN PC5
+
+#define VBAT_ADC_CHANNEL ADC_CHN_1
+#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
+#define RSSI_ADC_CHANNEL ADC_CHN_3
+#define AIRSPEED_ADC_CHANNEL ADC_CHN_4
+
+#define CURRENT_METER_SCALE 320
+
+/*
+ * OSD
+ */
+#define USE_MAX7456
+#define MAX7456_SPI_BUS BUS_SPI2
+#define MAX7456_CS_PIN PB12
+
+/*
+ * SD Card
+ */
+#define USE_SDCARD
+#define USE_SDCARD_SPI
+#define SDCARD_SPI_BUS BUS_SPI3
+#define SDCARD_CS_PIN PC14
+#define ENABLE_BLACKBOX_LOGGING_ON_SDCARD_BY_DEFAULT
+
+/*
+ * LED Strip
+ */
+#define USE_LED_STRIP
+#define WS2811_PIN PA8
+
+/*
+ * Other configs
+ */
+#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_BLACKBOX | FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT )
+#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
+#define SERIALRX_PROVIDER SERIALRX_SBUS
+#define SERIALRX_UART SERIAL_PORT_USART2
+
+#define USE_RANGEFINDER
+#define USE_RANGEFINDER_MSP
+#define USE_OPFLOW
+#define USE_OPFLOW_MSP
+
+#define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
+#define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
+#define PITOT_I2C_BUS DEFAULT_I2C_BUS
+
+#define USE_DSHOT
+#define USE_ESC_SENSOR
+#define USE_SERIAL_4WAY_BLHELI_INTERFACE
+
+#define MAX_PWM_OUTPUT_PORTS 11
+
+#define TARGET_IO_PORTA 0xffff
+#define TARGET_IO_PORTB 0xffff
+#define TARGET_IO_PORTC 0xffff
+#define TARGET_IO_PORTD (BIT(2))
+
+#define USE_PINIO
+#define USE_PINIOBOX
+#define PINIO1_PIN PC15
+#define PINIO1_FLAGS PINIO_FLAGS_INVERTED
\ No newline at end of file
From 50930eee9a9693c51fe0d03ae00dcc447c260e05 Mon Sep 17 00:00:00 2001
From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com>
Date: Mon, 6 Nov 2023 10:42:53 +0100
Subject: [PATCH 22/61] Add DPS310 and SPL06 to FLYWOOF745 target
This was requested by flywoo support.
Also add other baros to match their internal target.
---
src/main/target/FLYWOOF745/target.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/main/target/FLYWOOF745/target.h b/src/main/target/FLYWOOF745/target.h
index 3b57ccc4fa..c2b1937c61 100644
--- a/src/main/target/FLYWOOF745/target.h
+++ b/src/main/target/FLYWOOF745/target.h
@@ -140,6 +140,10 @@
#define USE_BARO
#define USE_BARO_BMP280
+#define USE_BARO_MS5611
+#define USE_BARO_BMP085
+#define USE_BARO_DPS310
+#define USE_BARO_SPL06
#define BARO_I2C_BUS BUS_I2C1
#define USE_MAG
From 9783a7b176c9ea40d6c2ebd4fce9f84a9490a035 Mon Sep 17 00:00:00 2001
From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com>
Date: Mon, 6 Nov 2023 21:21:31 +0100
Subject: [PATCH 23/61] Remove PPM entry with conflicting timer.
Fixes #9442
---
src/main/target/KAKUTEF7/target.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/main/target/KAKUTEF7/target.c b/src/main/target/KAKUTEF7/target.c
index 53ae9359de..ce7c14e947 100755
--- a/src/main/target/KAKUTEF7/target.c
+++ b/src/main/target/KAKUTEF7/target.c
@@ -29,7 +29,6 @@
#include "drivers/bus.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM1, CH3, PE13, TIM_USE_PPM, 0, 1), // PPM, DMA2_ST6
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // M1 , DMA1_ST7
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // M2 , DMA1_ST2
@@ -37,8 +36,10 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM1, CH2, PE11, TIM_USE_OUTPUT_AUTO, 0, 1), // M4 , DMA2_ST4
DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // M5 , DMA2_ST7
DEF_TIM(TIM5, CH4, PA3, TIM_USE_OUTPUT_AUTO, 0, 0), // M6 , DMA1_ST1
+ //
+ //DEF_TIM(TIM1, CH3, PE13, TIM_USE_OUTPUT_AUTO, 0, 1), // PPM/M7, DMA2_ST6
- DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 0), // LED_STRIP, DMA1_ST0
+ DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 0), // LED_STRIP, DMA1_ST0
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
From 1f597089d4935aa5af65b0006120f675b215c94e Mon Sep 17 00:00:00 2001
From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com>
Date: Mon, 6 Nov 2023 21:25:40 +0100
Subject: [PATCH 24/61] cleanup
---
src/main/target/KAKUTEF7/target.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
mode change 100755 => 100644 src/main/target/KAKUTEF7/target.c
diff --git a/src/main/target/KAKUTEF7/target.c b/src/main/target/KAKUTEF7/target.c
old mode 100755
new mode 100644
index ce7c14e947..19d524dc71
--- a/src/main/target/KAKUTEF7/target.c
+++ b/src/main/target/KAKUTEF7/target.c
@@ -36,7 +36,7 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM1, CH2, PE11, TIM_USE_OUTPUT_AUTO, 0, 1), // M4 , DMA2_ST4
DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // M5 , DMA2_ST7
DEF_TIM(TIM5, CH4, PA3, TIM_USE_OUTPUT_AUTO, 0, 0), // M6 , DMA1_ST1
- //
+
//DEF_TIM(TIM1, CH3, PE13, TIM_USE_OUTPUT_AUTO, 0, 1), // PPM/M7, DMA2_ST6
DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 0), // LED_STRIP, DMA1_ST0
From 3ef172dacdde07a73a4ab25c504c1c007b572b6b Mon Sep 17 00:00:00 2001
From: "Pawel Spychalski (DzikuVx)"
Date: Mon, 6 Nov 2023 21:55:00 +0100
Subject: [PATCH 25/61] Various PWM output changes. Mainly to get rid of
potential conflicts with new timer allocation
---
.vscode/settings.json | 3 ++-
src/main/target/AIRBOTF4/target.c | 13 +++++-----
src/main/target/ALIENFLIGHTF4/target.c | 10 ++++----
src/main/target/ALIENFLIGHTNGF7/target.c | 2 +-
src/main/target/ANYFC/target.c | 12 +++++-----
src/main/target/ANYFCF7/target.c | 13 +++++-----
src/main/target/ANYFCM7/target.c | 12 +++++-----
src/main/target/AOCODARCF405AIO/target.c | 2 +-
src/main/target/AOCODARCF4V2/target.c | 2 +-
src/main/target/AOCODARCF722AIO/target.c | 2 +-
src/main/target/AOCODARCF7DUAL/target.c | 2 +-
src/main/target/AOCODARCF7MINI/target.c | 2 +-
src/main/target/AXISFLYINGF7PRO/target.c | 2 +-
src/main/target/BEEROTORF4/target.c | 2 +-
src/main/target/BETAFLIGHTF4/target.c | 2 +-
src/main/target/BETAFPVF722/target.c | 2 +-
src/main/target/BLACKPILL_F411/target.c | 2 +-
src/main/target/BLUEJAYF4/target.c | 2 +-
src/main/target/CLRACINGF4AIR/target.c | 4 ++--
src/main/target/COLIBRI/target.c | 16 ++++++-------
src/main/target/DALRCF405/target.c | 2 +-
src/main/target/DALRCF722DUAL/target.c | 2 +-
src/main/target/F4BY/target.c | 16 ++++++-------
src/main/target/FF_F35_LIGHTNING/target.c | 10 ++++----
src/main/target/FF_FORTINIF4/target.c | 2 +-
src/main/target/FIREWORKSV2/target.c | 2 +-
src/main/target/FISHDRONEF4/target.c | 12 +++++-----
src/main/target/FLYWOOF405PRO/target.c | 2 +-
src/main/target/FLYWOOF411/target.c | 2 +-
src/main/target/FLYWOOF745/target.c | 2 +-
src/main/target/FLYWOOF7DUAL/target.c | 2 +-
src/main/target/FOXEERF405/target.c | 2 +-
src/main/target/FOXEERF722DUAL/target.c | 2 +-
src/main/target/FURYF4OSD/target.c | 2 +-
src/main/target/GEPRCF405/target.c | 6 +----
src/main/target/GEPRCF722/target.c | 2 +-
src/main/target/GEPRCF722_BT_HD/target.c | 4 +---
src/main/target/GEPRC_F722_AIO/target.c | 2 +-
src/main/target/HAKRCF405D/target.c | 8 +++----
src/main/target/HAKRCF411D/target.c | 2 +-
src/main/target/HAKRCKD722/target.c | 2 +-
src/main/target/HGLRCF722/target.c | 4 ++--
src/main/target/IFLIGHTF4_SUCCEXD/target.c | 2 +-
src/main/target/IFLIGHTF4_TWING/target.c | 2 +-
src/main/target/IFLIGHTF7_TWING/target.c | 2 +-
src/main/target/IFLIGHT_BLITZ_F7_AIO/target.c | 2 +-
src/main/target/IFLIGHT_BLITZ_F7_PRO/target.c | 2 +-
src/main/target/IFLIGHT_JBF7PRO/target.c | 2 +-
src/main/target/KAKUTEF4/target.c | 2 +-
src/main/target/KAKUTEF7/target.c | 2 +-
src/main/target/KAKUTEF7MINIV3/target.c | 2 +-
src/main/target/KROOZX/target.c | 2 +-
src/main/target/MAMBAF405US/target.c | 2 +-
src/main/target/MAMBAF722/target.c | 2 +-
src/main/target/MAMBAF722_2022A/target.c | 2 +-
src/main/target/MAMBAF722_X8/target.c | 2 +-
src/main/target/MATEKF405/target.c | 2 +-
src/main/target/MATEKF405CAN/target.c | 2 +-
src/main/target/MATEKF405SE/target.c | 2 +-
src/main/target/MATEKF405TE/target.c | 2 +-
src/main/target/MATEKF411/target.c | 2 +-
src/main/target/MATEKF722/target.c | 2 +-
src/main/target/MATEKF722PX/target.c | 7 +++---
src/main/target/MATEKF722SE/target.c | 4 ++--
src/main/target/MATEKF765/target.c | 4 ++--
src/main/target/MATEKH743/target.c | 8 +++----
src/main/target/NEUTRONRCF435SE/target.c | 23 +++++++++---------
src/main/target/NOX/target.c | 5 ++--
src/main/target/OMNIBUSF4/target.c | 24 ++++++++++---------
src/main/target/OMNIBUSF7NXT/target.c | 2 +-
src/main/target/PIXRACER/target.c | 2 +-
src/main/target/RADIX/target.c | 2 +-
src/main/target/REVO/target.c | 12 +++++-----
src/main/target/SAGEATF4/target.c | 6 ++---
src/main/target/SKYSTARSF405HD/target.c | 2 +-
src/main/target/SKYSTARSF722HD/target.c | 2 +-
src/main/target/SPARKY2/target.c | 10 ++++----
src/main/target/SPEEDYBEEF4/target.c | 2 +-
src/main/target/SPEEDYBEEF7/target.c | 2 +-
src/main/target/SPEEDYBEEF7MINI/target.c | 2 +-
src/main/target/SPEEDYBEEF7V2/target.c | 2 +-
src/main/target/SPRACINGF4EVO/target.c | 4 ++--
src/main/target/SPRACINGF7DUAL/target.c | 4 ++--
src/main/target/TMOTORF7/target.c | 2 +-
src/main/target/TMOTORF7V2/target.c | 2 +-
src/main/target/YUPIF4/target.c | 2 +-
src/main/target/YUPIF7/target.c | 2 +-
87 files changed, 186 insertions(+), 188 deletions(-)
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 2cece3ee12..f95df72f1f 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -2,7 +2,8 @@
"files.associations": {
"chrono": "c",
"cmath": "c",
- "ranges": "c"
+ "ranges": "c",
+ "platform.h": "c"
},
"editor.tabSize": 4,
"editor.insertSpaces": true,
diff --git a/src/main/target/AIRBOTF4/target.c b/src/main/target/AIRBOTF4/target.c
index 988543aa32..9273b3dff7 100644
--- a/src/main/target/AIRBOTF4/target.c
+++ b/src/main/target/AIRBOTF4/target.c
@@ -32,12 +32,13 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM1, CH1, PA8, TIM_USE_OUTPUT_AUTO, 0, 0), // S6_OUT
DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED | TIM_USE_ANY, 0, 0), // LED D1_ST0, n/a on older AIRBOTF4
- DEF_TIM(TIM12, CH1, PB14, TIM_USE_PWM | TIM_USE_PPM, 0, 0), // PPM (5th pin on FlexiIO port)
- DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0), // S2_IN
- DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM | TIM_USE_OUTPUT_AUTO, 0, 0), // S3_IN
- DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM | TIM_USE_OUTPUT_AUTO, 0, 0), // S4_IN
- DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM | TIM_USE_OUTPUT_AUTO, 0, 0), // S5_IN
- DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM | TIM_USE_OUTPUT_AUTO, 0, 0), // S6_IN
+ //Airbot F4 don't have those outputs, they exist only in the original Revo
+ // DEF_TIM(TIM12, CH1, PB14, TIM_USE_PWM | TIM_USE_PPM, 0, 0), // PPM (5th pin on FlexiIO port)
+ // DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0), // S2_IN
+ // DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM | TIM_USE_OUTPUT_AUTO, 0, 0), // S3_IN
+ // DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM | TIM_USE_OUTPUT_AUTO, 0, 0), // S4_IN
+ // DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM | TIM_USE_OUTPUT_AUTO, 0, 0), // S5_IN
+ // DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM | TIM_USE_OUTPUT_AUTO, 0, 0), // S6_IN
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/ALIENFLIGHTF4/target.c b/src/main/target/ALIENFLIGHTF4/target.c
index e7ee4cf552..7c6fd6ed84 100644
--- a/src/main/target/ALIENFLIGHTF4/target.c
+++ b/src/main/target/ALIENFLIGHTF4/target.c
@@ -23,11 +23,10 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM1, CH1, PA8, TIM_USE_PWM | TIM_USE_PPM, 0, 1), // PWM1 - PA8 RC1 - DMA2_ST1
- DEF_TIM(TIM3, CH3, PB0, TIM_USE_PWM, 0, 0), // PWM2 - PB0 RC2 - DMA1_ST5
- DEF_TIM(TIM3, CH4, PB1, TIM_USE_PWM, 0, 0), // PWM3 - PB1 RC3 - DMA1_ST7
- DEF_TIM(TIM1, CH2, PB14, TIM_USE_PWM, 0, 1), // PWM4 - PA14 RC4 - DMA2_ST2
- DEF_TIM(TIM1, CH3, PB15, TIM_USE_PWM | TIM_USE_LED, 0, 0), // PWM5 - PA15 RC5 - DMA2_ST6
+ // DEF_TIM(TIM1, CH1, PA8, TIM_USE_PWM | TIM_USE_PPM, 0, 1), // PWM1 - PA8 RC1 - DMA2_ST1
+ // DEF_TIM(TIM3, CH3, PB0, TIM_USE_PWM, 0, 0), // PWM2 - PB0 RC2 - DMA1_ST5
+ // DEF_TIM(TIM3, CH4, PB1, TIM_USE_PWM, 0, 0), // PWM3 - PB1 RC3 - DMA1_ST7
+ // DEF_TIM(TIM1, CH2, PB14, TIM_USE_PWM, 0, 1), // PWM4 - PA14 RC4 - DMA2_ST2
DEF_TIM(TIM4, CH3, PB8, TIM_USE_OUTPUT_AUTO, 0, 0), // PWM6 - PB8 OUT1 - DMA1_ST7
DEF_TIM(TIM4, CH4, PB9, TIM_USE_OUTPUT_AUTO, 0, 0), // PWM7 - PB9 OUT2 - DMA_NONE
DEF_TIM(TIM5, CH1, PA0, TIM_USE_OUTPUT_AUTO, 0, 0), // PWM8 - PA0 OUT3 - DMA1_ST2
@@ -36,6 +35,7 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM8, CH2, PC7, TIM_USE_OUTPUT_AUTO, 0, 0), // PWM11 - PC7 OUT6 - DMA2_ST3
DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 1), // PWM13 - PC8 OUT7 - DMA2_ST4
DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // PWM13 - PC9 OUT8 - DMA2_ST7
+ DEF_TIM(TIM1, CH3, PB15, TIM_USE_LED, 0, 0), // PWM5 - PA15 RC5 - DMA2_ST6
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/ALIENFLIGHTNGF7/target.c b/src/main/target/ALIENFLIGHTNGF7/target.c
index 455747923e..ba8ab6111c 100644
--- a/src/main/target/ALIENFLIGHTNGF7/target.c
+++ b/src/main/target/ALIENFLIGHTNGF7/target.c
@@ -23,7 +23,6 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM1, CH1, PA8, TIM_USE_PPM | TIM_USE_LED, 0, 1), // PPM - DMA2_ST1
DEF_TIM(TIM8, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0, 0), // PWM1 - DMA2_ST2
DEF_TIM(TIM3, CH2, PC7, TIM_USE_OUTPUT_AUTO, 0, 0), // PWM2 - DMA1_ST5
DEF_TIM(TIM8, CH2N, PB14, TIM_USE_OUTPUT_AUTO, 0, 0), // PWM3 - DMA2_ST3
@@ -36,6 +35,7 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM1, CH3N, PB15, TIM_USE_OUTPUT_AUTO, 0, 0), // PWM10 - DMA2_ST6
DEF_TIM(TIM4, CH3, PB8, TIM_USE_OUTPUT_AUTO, 0, 0), // PWM11 - DMA1_ST7
DEF_TIM(TIM4, CH4, PB9, TIM_USE_OUTPUT_AUTO, 0, 0), // PWM12 - DMA_NONE
+ DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 1), // PPM - DMA2_ST1
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/ANYFC/target.c b/src/main/target/ANYFC/target.c
index 5353b58911..a8adb8578e 100644
--- a/src/main/target/ANYFC/target.c
+++ b/src/main/target/ANYFC/target.c
@@ -23,12 +23,12 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM12, CH1, PB14, TIM_USE_PWM | TIM_USE_PPM, 0, 0), // S1_IN
- DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0), // S2_IN
- DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM, 0, 0), // S3_IN
- DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 0), // S4_IN
- DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM, 0, 0), // S6_IN
- DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0), // S5_IN
+ // DEF_TIM(TIM12, CH1, PB14, TIM_USE_PWM | TIM_USE_PPM, 0, 0), // S1_IN
+ // DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0), // S2_IN
+ // DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM, 0, 0), // S3_IN
+ // DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 0), // S4_IN
+ // DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM, 0, 0), // S6_IN
+ // DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0), // S5_IN
DEF_TIM(TIM2, CH2, PB3, TIM_USE_OUTPUT_AUTO, 0, 0), // S10_OUT 16
DEF_TIM(TIM5, CH1, PA0, TIM_USE_OUTPUT_AUTO, 0, 0), // S6_OUT 12
diff --git a/src/main/target/ANYFCF7/target.c b/src/main/target/ANYFCF7/target.c
index 65f807d798..dc523f4c78 100644
--- a/src/main/target/ANYFCF7/target.c
+++ b/src/main/target/ANYFCF7/target.c
@@ -23,12 +23,8 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM12, CH1, PB14, TIM_USE_PWM | TIM_USE_PPM, 0, 0 ), // S1_IN
- DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0 ), // S2_IN
- DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM | TIM_USE_OUTPUT_AUTO, 0, 0 ), // S3_IN DMA2_ST2 DMA2_ST2
- DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM | TIM_USE_OUTPUT_AUTO, 0, 0 ), // S4_IN DMA2_ST3 DMA2_ST2
- DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM | TIM_USE_OUTPUT_AUTO, 0, 0 ), // S5_IN DMA2_ST4 DMA2_ST2
- DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM | TIM_USE_OUTPUT_AUTO, 0, 0 ), // S6_IN DMA2_ST7
+ // DEF_TIM(TIM12, CH1, PB14, TIM_USE_PWM | TIM_USE_PPM, 0, 0 ), // S1_IN
+ // DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0 ), // S2_IN
DEF_TIM(TIM4, CH3, PB8, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S10_OUT 1 DMA1_ST7
DEF_TIM(TIM5, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S6_OUT 2 DMA1_ST0
@@ -40,6 +36,11 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM5, CH1, PA0, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S7_OUT DMA1_ST2
DEF_TIM(TIM2, CH2, PB3, TIM_USE_OUTPUT_AUTO | TIM_USE_LED, 0, 0 ), // S8_OUT DMA1_ST6
DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S9_OUT DMA1_ST4
+
+ DEF_TIM(TIM8, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S3_IN DMA2_ST2 DMA2_ST2
+ DEF_TIM(TIM8, CH2, PC7, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S4_IN DMA2_ST3 DMA2_ST2
+ DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S5_IN DMA2_ST4 DMA2_ST2
+ DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S6_IN DMA2_ST7
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/ANYFCM7/target.c b/src/main/target/ANYFCM7/target.c
index fb69d60a43..7dd30d2250 100644
--- a/src/main/target/ANYFCM7/target.c
+++ b/src/main/target/ANYFCM7/target.c
@@ -26,12 +26,12 @@
#define TIM_EN_N TIMER_OUTPUT_ENABLED | TIMER_OUTPUT_N_CHANNEL
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM12, CH1, PB14, TIM_USE_PWM | TIM_USE_PPM, 0, 0 ), // S1_IN
- DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0 ), // S2_IN
- DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM, 0, 0 ), // S3_IN DMA2_ST2 DMA2_ST2
- DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 0 ), // S4_IN DMA2_ST3 DMA2_ST2
- DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0 ), // S5_IN DMA2_ST4 DMA2_ST2
- DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM, 0, 0 ), // S6_IN DMA2_ST7
+ // DEF_TIM(TIM12, CH1, PB14, TIM_USE_PWM | TIM_USE_PPM, 0, 0 ), // S1_IN
+ // DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0 ), // S2_IN
+ // DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM, 0, 0 ), // S3_IN DMA2_ST2 DMA2_ST2
+ // DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 0 ), // S4_IN DMA2_ST3 DMA2_ST2
+ // DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0 ), // S5_IN DMA2_ST4 DMA2_ST2
+ // DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM, 0, 0 ), // S6_IN DMA2_ST7
DEF_TIM(TIM4, CH3, PB8, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S10_OUT 1 DMA1_ST7
DEF_TIM(TIM2, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S6_OUT 2 DMA1_ST1
diff --git a/src/main/target/AOCODARCF405AIO/target.c b/src/main/target/AOCODARCF405AIO/target.c
index be225da1bf..d2f3d67c42 100644
--- a/src/main/target/AOCODARCF405AIO/target.c
+++ b/src/main/target/AOCODARCF405AIO/target.c
@@ -28,7 +28,7 @@ BUSDEV_REGISTER_SPI_TAG(busdev_mpu6500, DEVHW_MPU6500, MPU6500_SPI_BUS, MPU65
BUSDEV_REGISTER_SPI_TAG(busdev_mpu6000, DEVHW_MPU6000, MPU6000_SPI_BUS, MPU6000_CS_PIN, NONE, 0, DEVFLAGS_NONE, IMU_MPU6500_ALIGN);
BUSDEV_REGISTER_SPI_TAG(busdev_bmi270, DEVHW_BMI270, BMI270_SPI_BUS, BMI270_CS_PIN, NONE, 0, DEVFLAGS_NONE, IMU_BMI270_ALIGN);
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM2, CH2, PA10, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM2, CH2, PA10, TIM_USE_PPM, 0, 0), // PPM
DEF_TIM(TIM3, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0, 0), // S1
DEF_TIM(TIM3, CH2, PC7, TIM_USE_OUTPUT_AUTO, 0, 0), // S2
diff --git a/src/main/target/AOCODARCF4V2/target.c b/src/main/target/AOCODARCF4V2/target.c
index 8581cc5bf1..eccd2f06d8 100644
--- a/src/main/target/AOCODARCF4V2/target.c
+++ b/src/main/target/AOCODARCF4V2/target.c
@@ -25,7 +25,7 @@
#include "drivers/bus.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0 ), // PPM IN
+ // DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0 ), // PPM IN
DEF_TIM(TIM8, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0, 1 ), // S1
DEF_TIM(TIM8, CH2, PC7, TIM_USE_OUTPUT_AUTO, 0, 1 ), // S2
diff --git a/src/main/target/AOCODARCF722AIO/target.c b/src/main/target/AOCODARCF722AIO/target.c
index 90d21bbf2f..038b4121b4 100644
--- a/src/main/target/AOCODARCF722AIO/target.c
+++ b/src/main/target/AOCODARCF722AIO/target.c
@@ -27,7 +27,7 @@
BUSDEV_REGISTER_SPI_TAG(busdev_mpu6500, DEVHW_MPU6500, MPU6500_SPI_BUS, MPU6500_CS_PIN, NONE, 0, DEVFLAGS_NONE, IMU_MPU6500_ALIGN);
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM
DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // S1
DEF_TIM(TIM3, CH2, PB5, TIM_USE_MOTOR, 0, 0), // S2
diff --git a/src/main/target/AOCODARCF7DUAL/target.c b/src/main/target/AOCODARCF7DUAL/target.c
index d09fafeda2..2e7de30b5d 100644
--- a/src/main/target/AOCODARCF7DUAL/target.c
+++ b/src/main/target/AOCODARCF7DUAL/target.c
@@ -30,7 +30,7 @@ BUSDEV_REGISTER_SPI_TAG(busdev_mpu6000, DEVHW_MPU6000, MPU6000_SPI_BUS,
BUSDEV_REGISTER_SPI_TAG(busdev_bmi270, DEVHW_BMI270, BMI270_SPI_BUS, BMI270_CS_PIN, NONE, 0, DEVFLAGS_NONE, IMU_BMI270_ALIGN);
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM1, CH3, PA10, TIM_USE_PPM, 0, 0), //PPM
+ // DEF_TIM(TIM1, CH3, PA10, TIM_USE_PPM, 0, 0), //PPM
DEF_TIM(TIM3, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0, 0), // S1 D(2, 2, 7)
DEF_TIM(TIM3, CH2, PC7, TIM_USE_OUTPUT_AUTO, 0, 0), // S2 D(2, 3, 7)
diff --git a/src/main/target/AOCODARCF7MINI/target.c b/src/main/target/AOCODARCF7MINI/target.c
index 34360bbc03..f01d2c73e8 100644
--- a/src/main/target/AOCODARCF7MINI/target.c
+++ b/src/main/target/AOCODARCF7MINI/target.c
@@ -37,7 +37,7 @@ BUSDEV_REGISTER_SPI_TAG(busdev_mpu6500, DEVHW_MPU6500, MPU6500_SPI_BUS,
BUSDEV_REGISTER_SPI_TAG(busdev_mpu6000, DEVHW_MPU6000, MPU6000_SPI_BUS, MPU6000_CS_PIN, NONE, 0, DEVFLAGS_NONE, IMU_MPU6000_ALIGN);
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM1, CH3, PA10, TIM_USE_PPM, 0, 0), // PPM, RX1
+ // DEF_TIM(TIM1, CH3, PA10, TIM_USE_PPM, 0, 0), // PPM, RX1
DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0), // S1 D(1, 4, 5)
DEF_TIM(TIM3, CH2, PB5, TIM_USE_OUTPUT_AUTO, 0, 0), // S2 D(1, 5, 4)
diff --git a/src/main/target/AXISFLYINGF7PRO/target.c b/src/main/target/AXISFLYINGF7PRO/target.c
index 8d4b966b69..e6ad7b071f 100644
--- a/src/main/target/AXISFLYINGF7PRO/target.c
+++ b/src/main/target/AXISFLYINGF7PRO/target.c
@@ -33,7 +33,7 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM2, CH4, PB11, TIM_USE_OUTPUT_AUTO, 0, 1), // S7
DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // LED STRIP
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM
DEF_TIM(TIM12, CH2, PB15, TIM_USE_ANY, 0, 0), // CAM CONTROL
};
diff --git a/src/main/target/BEEROTORF4/target.c b/src/main/target/BEEROTORF4/target.c
index 28e6a77402..aa4d4893bf 100644
--- a/src/main/target/BEEROTORF4/target.c
+++ b/src/main/target/BEEROTORF4/target.c
@@ -24,7 +24,7 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM IN
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM IN
DEF_TIM(TIM1, CH2N, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // M1 - DMAR: DMA2_ST5
DEF_TIM(TIM1, CH3N, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // M2 -
diff --git a/src/main/target/BETAFLIGHTF4/target.c b/src/main/target/BETAFLIGHTF4/target.c
index 0e10cdbf59..67d8f260ad 100755
--- a/src/main/target/BETAFLIGHTF4/target.c
+++ b/src/main/target/BETAFLIGHTF4/target.c
@@ -24,7 +24,7 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM4, CH3, PB8, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM4, CH3, PB8, TIM_USE_PPM, 0, 0), // PPM
// Motors
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S1_OUT D1_ST7
diff --git a/src/main/target/BETAFPVF722/target.c b/src/main/target/BETAFPVF722/target.c
index e24689c0ca..d44324cd7c 100755
--- a/src/main/target/BETAFPVF722/target.c
+++ b/src/main/target/BETAFPVF722/target.c
@@ -25,7 +25,7 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM1, CH3, PA10, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM1, CH3, PA10, TIM_USE_PPM, 0, 0), // PPM
DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // S1 D(1, 4, 5)
DEF_TIM(TIM3, CH4, PB1, TIM_USE_MOTOR, 0, 0), // S2 D(2, 3, 7)
diff --git a/src/main/target/BLACKPILL_F411/target.c b/src/main/target/BLACKPILL_F411/target.c
index d36b8c19c2..18c0d2edf6 100644
--- a/src/main/target/BLACKPILL_F411/target.c
+++ b/src/main/target/BLACKPILL_F411/target.c
@@ -35,7 +35,7 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0), //ST1 pad -softserial_tx1
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), //RX2 Pad -PPM
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), //RX2 Pad -PPM
};
diff --git a/src/main/target/BLUEJAYF4/target.c b/src/main/target/BLUEJAYF4/target.c
index 0b968380cf..ba48551f76 100644
--- a/src/main/target/BLUEJAYF4/target.c
+++ b/src/main/target/BLUEJAYF4/target.c
@@ -23,7 +23,7 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0 ), // PPM IN
+ // DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0 ), // PPM IN
DEF_TIM(TIM5, CH1, PA0, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S1_OUT - DMA1_ST2
DEF_TIM(TIM5, CH2, PA1, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S2_OUT - DMA1_ST4
diff --git a/src/main/target/CLRACINGF4AIR/target.c b/src/main/target/CLRACINGF4AIR/target.c
index 54fa14c709..beca9ba67e 100644
--- a/src/main/target/CLRACINGF4AIR/target.c
+++ b/src/main/target/CLRACINGF4AIR/target.c
@@ -21,8 +21,7 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM11, CH1, PB9, TIM_USE_PPM, 0, 0),
- DEF_TIM(TIM4, CH3, PB8, TIM_USE_LED, 0, 0),
+ // DEF_TIM(TIM11, CH1, PB9, TIM_USE_PPM, 0, 0),
#if defined(CLRACINGF4AIRV2) || defined(CLRACINGF4AIRV3)
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0),
@@ -39,6 +38,7 @@
DEF_TIM(TIM12, CH2, PB15, TIM_USE_OUTPUT_AUTO, 0, 0),
DEF_TIM(TIM1, CH1, PA8, TIM_USE_OUTPUT_AUTO, 0, 0),
#endif
+ DEF_TIM(TIM4, CH3, PB8, TIM_USE_LED, 0, 0),
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/COLIBRI/target.c b/src/main/target/COLIBRI/target.c
index 932188992b..7affcc4936 100755
--- a/src/main/target/COLIBRI/target.c
+++ b/src/main/target/COLIBRI/target.c
@@ -24,14 +24,14 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM1, CH3, PA10, TIM_USE_PWM | TIM_USE_PPM, 0, 0), // S1_IN
- DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM, 0, 0), // S2_IN
- DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 0), // S3_IN
- DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0), // S4_IN
- DEF_TIM(TIM2, CH1, PA15, TIM_USE_PWM, 0, 0), // S5_IN
- DEF_TIM(TIM2, CH2, PB3, TIM_USE_PWM, 0, 0), // S6_IN
- DEF_TIM(TIM5, CH1, PA0, TIM_USE_PWM, 0, 0), // S7_IN
- DEF_TIM(TIM5, CH2, PA1, TIM_USE_PWM, 0, 0), // S8_IN
+ // DEF_TIM(TIM1, CH3, PA10, TIM_USE_PWM | TIM_USE_PPM, 0, 0), // S1_IN
+ // DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM, 0, 0), // S2_IN
+ // DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM, 0, 0), // S3_IN
+ // DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0), // S4_IN
+ // DEF_TIM(TIM2, CH1, PA15, TIM_USE_PWM, 0, 0), // S5_IN
+ // DEF_TIM(TIM2, CH2, PB3, TIM_USE_PWM, 0, 0), // S6_IN
+ // DEF_TIM(TIM5, CH1, PA0, TIM_USE_PWM, 0, 0), // S7_IN
+ // DEF_TIM(TIM5, CH2, PA1, TIM_USE_PWM, 0, 0), // S8_IN
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S1_OUT
DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0), // S2_OUT
diff --git a/src/main/target/DALRCF405/target.c b/src/main/target/DALRCF405/target.c
index e1cddea261..816ad3cdec 100644
--- a/src/main/target/DALRCF405/target.c
+++ b/src/main/target/DALRCF405/target.c
@@ -22,7 +22,7 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM12, CH2, PB15, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM12, CH2, PB15, TIM_USE_PPM, 0, 0), // PPM
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S1 (1,7)
DEF_TIM(TIM8, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0, 0), // S2 (2,2)
diff --git a/src/main/target/DALRCF722DUAL/target.c b/src/main/target/DALRCF722DUAL/target.c
index 286c00539a..8c4fa74475 100644
--- a/src/main/target/DALRCF722DUAL/target.c
+++ b/src/main/target/DALRCF722DUAL/target.c
@@ -28,7 +28,7 @@
#define TIM_EN_N TIMER_OUTPUT_ENABLED | TIMER_OUTPUT_N_CHANNEL
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM4, CH2, PB7, TIM_USE_PPM ,0, 0),
+ // DEF_TIM(TIM4, CH2, PB7, TIM_USE_PPM ,0, 0),
DEF_TIM(TIM8, CH1, PC6, TIM_USE_OUTPUT_AUTO,0,0), //S1 DMA2_ST2 T8CH1
DEF_TIM(TIM8, CH2, PC7, TIM_USE_OUTPUT_AUTO,0,0), //S2 DMA2_ST3 T8CH2
diff --git a/src/main/target/F4BY/target.c b/src/main/target/F4BY/target.c
index 37d9db8941..8d1b4622f6 100644
--- a/src/main/target/F4BY/target.c
+++ b/src/main/target/F4BY/target.c
@@ -6,14 +6,14 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM3, CH4, PC9, TIM_USE_PPM | TIM_USE_PWM, 0, 0), // S1_IN
- DEF_TIM(TIM3, CH3, PC8, TIM_USE_PWM, 0, 0), // S2_IN
- DEF_TIM(TIM3, CH1, PC6, TIM_USE_PWM, 0, 0), // S3_IN
- DEF_TIM(TIM3, CH2, PC7, TIM_USE_PWM, 0, 0), // S4_IN
- DEF_TIM(TIM4, CH4, PD15, TIM_USE_PWM, 0, 0), // S5_IN
- DEF_TIM(TIM4, CH3, PD14, TIM_USE_PWM, 0, 0), // S6_IN
- DEF_TIM(TIM4, CH2, PD13, TIM_USE_PWM, 0, 0), // S7_IN
- DEF_TIM(TIM4, CH1, PD12, TIM_USE_PWM, 0, 0), // S8_IN
+ // DEF_TIM(TIM3, CH4, PC9, TIM_USE_PPM | TIM_USE_PWM, 0, 0), // S1_IN
+ // DEF_TIM(TIM3, CH3, PC8, TIM_USE_PWM, 0, 0), // S2_IN
+ // DEF_TIM(TIM3, CH1, PC6, TIM_USE_PWM, 0, 0), // S3_IN
+ // DEF_TIM(TIM3, CH2, PC7, TIM_USE_PWM, 0, 0), // S4_IN
+ // DEF_TIM(TIM4, CH4, PD15, TIM_USE_PWM, 0, 0), // S5_IN
+ // DEF_TIM(TIM4, CH3, PD14, TIM_USE_PWM, 0, 0), // S6_IN
+ // DEF_TIM(TIM4, CH2, PD13, TIM_USE_PWM, 0, 0), // S7_IN
+ // DEF_TIM(TIM4, CH1, PD12, TIM_USE_PWM, 0, 0), // S8_IN
DEF_TIM(TIM2, CH1, PA0, TIM_USE_OUTPUT_AUTO, 0, 0), // S1_OUT
DEF_TIM(TIM2, CH2, PA1, TIM_USE_OUTPUT_AUTO, 0, 0), // S2_OUT
diff --git a/src/main/target/FF_F35_LIGHTNING/target.c b/src/main/target/FF_F35_LIGHTNING/target.c
index 83d75497e4..617c085a92 100644
--- a/src/main/target/FF_F35_LIGHTNING/target.c
+++ b/src/main/target/FF_F35_LIGHTNING/target.c
@@ -33,11 +33,11 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0),
DEF_TIM(TIM5, CH4, PA3, TIM_USE_ANY, 0, 0),
-#ifdef WINGFC
- DEF_TIM(TIM2, CH4, PB11, TIM_USE_PPM, 0, 0), // UART3 RX
-#else
- DEF_TIM(TIM2, CH3, PB10, TIM_USE_PPM, 0, 0), // UART3 TX
-#endif
+// #ifdef WINGFC
+// DEF_TIM(TIM2, CH4, PB11, TIM_USE_PPM, 0, 0), // UART3 RX
+// #else
+// DEF_TIM(TIM2, CH3, PB10, TIM_USE_PPM, 0, 0), // UART3 TX
+// #endif
};
diff --git a/src/main/target/FF_FORTINIF4/target.c b/src/main/target/FF_FORTINIF4/target.c
index 5853bc3139..54aae5ce4e 100644
--- a/src/main/target/FF_FORTINIF4/target.c
+++ b/src/main/target/FF_FORTINIF4/target.c
@@ -27,7 +27,7 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 1, 0 ), // S2_OUT - DMA1_ST2
DEF_TIM(TIM2, CH4, PA3, TIM_USE_OUTPUT_AUTO, 1, 1 ), // S3_OUT - DMA1_ST6
DEF_TIM(TIM2, CH3, PA2, TIM_USE_OUTPUT_AUTO, 1, 0 ), // S4_OUT - DMA1_ST1
- DEF_TIM(TIM4, CH4, PB9, TIM_USE_PPM, 0, 0 ), // PPM IN
+ // DEF_TIM(TIM4, CH4, PB9, TIM_USE_PPM, 0, 0 ), // PPM IN
DEF_TIM(TIM4, CH2, PB7, TIM_USE_LED, 0, 0), // LED - DMA1_ST3
};
diff --git a/src/main/target/FIREWORKSV2/target.c b/src/main/target/FIREWORKSV2/target.c
index 8e7cdb9575..7f96e09714 100644
--- a/src/main/target/FIREWORKSV2/target.c
+++ b/src/main/target/FIREWORKSV2/target.c
@@ -44,7 +44,7 @@ BUSDEV_REGISTER_SPI_TAG(busdev_2_mpu6000, DEVHW_MPU6000, IMU_2_SPI_BUS, IMU_
BUSDEV_REGISTER_SPI_TAG(busdev_2_mpu6500, DEVHW_MPU6500, IMU_2_SPI_BUS, IMU_2_CS_PIN, NONE, 1, DEVFLAGS_NONE, IMU_2_ALIGN);
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM10, CH1, PB8, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM10, CH1, PB8, TIM_USE_PPM, 0, 0), // PPM
// Motor output 1: use different set of timers for MC and FW
//DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR | TIM _USE_SERVO, 1, 0), // S1_OUT D(1,7)
diff --git a/src/main/target/FISHDRONEF4/target.c b/src/main/target/FISHDRONEF4/target.c
index b0aec49bc4..93354b5175 100644
--- a/src/main/target/FISHDRONEF4/target.c
+++ b/src/main/target/FISHDRONEF4/target.c
@@ -23,12 +23,12 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM5, CH1, PA0, TIM_USE_PWM | TIM_USE_PPM, 0, 0 ), // PPM IN
- DEF_TIM(TIM5, CH2, PA1, TIM_USE_PWM, 0, 0 ),
- DEF_TIM(TIM3, CH3, PB0, TIM_USE_PWM, 0, 0 ),
- DEF_TIM(TIM2, CH3, PB10, TIM_USE_PWM, 0, 0 ),
- DEF_TIM(TIM2, CH4, PB11, TIM_USE_PWM, 0, 0 ),
- DEF_TIM(TIM1, CH1, PA8, TIM_USE_PWM, 0, 0 ),
+ // DEF_TIM(TIM5, CH1, PA0, TIM_USE_PWM | TIM_USE_PPM, 0, 0 ), // PPM IN
+ // DEF_TIM(TIM5, CH2, PA1, TIM_USE_PWM, 0, 0 ),
+ // DEF_TIM(TIM3, CH3, PB0, TIM_USE_PWM, 0, 0 ),
+ // DEF_TIM(TIM2, CH3, PB10, TIM_USE_PWM, 0, 0 ),
+ // DEF_TIM(TIM2, CH4, PB11, TIM_USE_PWM, 0, 0 ),
+ // DEF_TIM(TIM1, CH1, PA8, TIM_USE_PWM, 0, 0 ),
DEF_TIM(TIM12, CH1, PB14, TIM_USE_OUTPUT_AUTO, 0, 0 ),
DEF_TIM(TIM12, CH2, PB15, TIM_USE_OUTPUT_AUTO, 0, 0 ),
diff --git a/src/main/target/FLYWOOF405PRO/target.c b/src/main/target/FLYWOOF405PRO/target.c
index f61d06ca0e..c0f1c4eec2 100644
--- a/src/main/target/FLYWOOF405PRO/target.c
+++ b/src/main/target/FLYWOOF405PRO/target.c
@@ -34,7 +34,7 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM1, CH2, PA9, TIM_USE_LED, 0, 0), //2812LED D(1,5,3)
- DEF_TIM(TIM10, CH1, PB8, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM10, CH1, PB8, TIM_USE_PPM, 0, 0), // PPM
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/FLYWOOF411/target.c b/src/main/target/FLYWOOF411/target.c
index 965974162b..3946ad0b40 100644
--- a/src/main/target/FLYWOOF411/target.c
+++ b/src/main/target/FLYWOOF411/target.c
@@ -25,7 +25,7 @@
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM9, CH1, PA2, TIM_USE_PPM, 0, 0), // PPM IN
+ // DEF_TIM(TIM9, CH1, PA2, TIM_USE_PPM, 0, 0), // PPM IN
#ifdef FLYWOOF411_V2
DEF_TIM(TIM1, CH1, PA8, TIM_USE_OUTPUT_AUTO, 0, 1), // S1 - D(2,1)
DEF_TIM(TIM2, CH2, PB3, TIM_USE_OUTPUT_AUTO, 0, 0), // S2 - D(1,6)
diff --git a/src/main/target/FLYWOOF745/target.c b/src/main/target/FLYWOOF745/target.c
index 879b66d01f..7c79d1f6a5 100644
--- a/src/main/target/FLYWOOF745/target.c
+++ b/src/main/target/FLYWOOF745/target.c
@@ -30,7 +30,7 @@
#include "drivers/pinio.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM1, CH3, PE13, TIM_USE_PPM, 0, 1), // PPM, DMA2_ST6
+ // DEF_TIM(TIM1, CH3, PE13, TIM_USE_PPM, 0, 1), // PPM, DMA2_ST6
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // M1 , DMA1_ST7
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // M2 , DMA1_ST2
diff --git a/src/main/target/FLYWOOF7DUAL/target.c b/src/main/target/FLYWOOF7DUAL/target.c
index d9d5482e3a..28d5a2ee47 100644
--- a/src/main/target/FLYWOOF7DUAL/target.c
+++ b/src/main/target/FLYWOOF7DUAL/target.c
@@ -38,7 +38,7 @@ BUSDEV_REGISTER_SPI_TAG(busdev_mpu6000_2, DEVHW_MPU6000, GYRO_2_SPI_BUS, GYRO
BUSDEV_REGISTER_SPI_TAG(busdev_mpu6500_2, DEVHW_MPU6500, GYRO_2_SPI_BUS, GYRO_2_CS_PIN, NONE, 1, DEVFLAGS_NONE, GYRO_2_ALIGN);
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM8, CH1, PC6, TIM_USE_PPM, 0, 0), // PPM&SBUS
+ // DEF_TIM(TIM8, CH1, PC6, TIM_USE_PPM, 0, 0), // PPM&SBUS
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // S1 - D(1,2)
DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0), // S2 - D(1,4)
diff --git a/src/main/target/FOXEERF405/target.c b/src/main/target/FOXEERF405/target.c
index 1ad827bb5c..ca6ebe3507 100644
--- a/src/main/target/FOXEERF405/target.c
+++ b/src/main/target/FOXEERF405/target.c
@@ -22,7 +22,7 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM12, CH2, PB15, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM12, CH2, PB15, TIM_USE_PPM, 0, 0), // PPM
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S1 (1,7)
DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0), // S2 (1,4)
diff --git a/src/main/target/FOXEERF722DUAL/target.c b/src/main/target/FOXEERF722DUAL/target.c
index 1933a5134e..fe34e0a45d 100644
--- a/src/main/target/FOXEERF722DUAL/target.c
+++ b/src/main/target/FOXEERF722DUAL/target.c
@@ -29,7 +29,7 @@ BUSDEV_REGISTER_SPI_TAG(busdev_mpu6500, DEVHW_MPU6500, MPU6500_SPI_BUS,
#endif
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM4, CH2, PB7, TIM_USE_PPM, 0, 0), // PPM&SBUS
+ // DEF_TIM(TIM4, CH2, PB7, TIM_USE_PPM, 0, 0), // PPM&SBUS
DEF_TIM(TIM1, CH2, PA9, TIM_USE_OUTPUT_AUTO, 0, 1), // S1 - D(2, 1, 6)
#if defined(FOXEERF722V2)
diff --git a/src/main/target/FURYF4OSD/target.c b/src/main/target/FURYF4OSD/target.c
index c820d0c378..ef414db35e 100644
--- a/src/main/target/FURYF4OSD/target.c
+++ b/src/main/target/FURYF4OSD/target.c
@@ -23,7 +23,7 @@
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM8, CH4, PC9, TIM_USE_PPM, 0, 0 ), // PPM IN
+ // DEF_TIM(TIM8, CH4, PC9, TIM_USE_PPM, 0, 0 ), // PPM IN
DEF_TIM(TIM2, CH4, PA3, TIM_USE_OUTPUT_AUTO, 0, 1 ), // S1_OUT - D(1, 6, 3)
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S2_OUT - D(1, 7, 5)
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S3_OUT - D(1, 2, 5)
diff --git a/src/main/target/GEPRCF405/target.c b/src/main/target/GEPRCF405/target.c
index 68a900898c..c5f5791a92 100644
--- a/src/main/target/GEPRCF405/target.c
+++ b/src/main/target/GEPRCF405/target.c
@@ -24,12 +24,8 @@
#include "drivers/timer.h"
#include "drivers/timer_def.h"
-
-
-
-
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0),
+ // DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0),
DEF_TIM(TIM1, CH1, PA8, TIM_USE_OUTPUT_AUTO, 0, 1),
DEF_TIM(TIM1, CH2, PA9, TIM_USE_OUTPUT_AUTO, 0, 1),
diff --git a/src/main/target/GEPRCF722/target.c b/src/main/target/GEPRCF722/target.c
index 851ae376a5..7061c09ffc 100644
--- a/src/main/target/GEPRCF722/target.c
+++ b/src/main/target/GEPRCF722/target.c
@@ -27,7 +27,7 @@
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0),
+ // DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0),
DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0),
DEF_TIM(TIM3, CH2, PB5, TIM_USE_OUTPUT_AUTO, 0, 0),
diff --git a/src/main/target/GEPRCF722_BT_HD/target.c b/src/main/target/GEPRCF722_BT_HD/target.c
index d1f902eb69..e7a6f1b332 100644
--- a/src/main/target/GEPRCF722_BT_HD/target.c
+++ b/src/main/target/GEPRCF722_BT_HD/target.c
@@ -25,10 +25,8 @@
#include "drivers/timer.h"
#include "drivers/sensor.h"
-
-
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0),
+ // DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0),
DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0),
DEF_TIM(TIM8, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0, 0),
diff --git a/src/main/target/GEPRC_F722_AIO/target.c b/src/main/target/GEPRC_F722_AIO/target.c
index a8ee276fce..60b6b359e8 100644
--- a/src/main/target/GEPRC_F722_AIO/target.c
+++ b/src/main/target/GEPRC_F722_AIO/target.c
@@ -27,7 +27,7 @@
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0),
+ // DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0),
DEF_TIM(TIM8, CH4, PC9, TIM_USE_MOTOR, 0, 0),
DEF_TIM(TIM8, CH3, PC8, TIM_USE_MOTOR, 0, 0),
diff --git a/src/main/target/HAKRCF405D/target.c b/src/main/target/HAKRCF405D/target.c
index 664db47633..0679523028 100644
--- a/src/main/target/HAKRCF405D/target.c
+++ b/src/main/target/HAKRCF405D/target.c
@@ -30,7 +30,7 @@ BUSDEV_REGISTER_SPI_TAG(busdev_mpu6000, DEVHW_MPU6000, MPU6000_SPI_BUS, MPU600
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // PPM
DEF_TIM(TIM3, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0, 0), // S1
DEF_TIM(TIM8, CH2, PC7, TIM_USE_OUTPUT_AUTO, 0, 1), // S2
@@ -41,9 +41,9 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM4, CH1, PB8, TIM_USE_LED, 0, 0), // LED STRIP(2,6)
- DEF_TIM(TIM5, CH1, PA0, TIM_USE_PWM, 0, 0), // PWM1
- DEF_TIM(TIM5, CH2, PA1, TIM_USE_PWM, 0, 0), // PWM2
- DEF_TIM(TIM9, CH1, PA2, TIM_USE_PWM, 0, 0), // PWM3
+ // DEF_TIM(TIM5, CH1, PA0, TIM_USE_PWM, 0, 0), // PWM1
+ // DEF_TIM(TIM5, CH2, PA1, TIM_USE_PWM, 0, 0), // PWM2
+ // DEF_TIM(TIM9, CH1, PA2, TIM_USE_PWM, 0, 0), // PWM3
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/HAKRCF411D/target.c b/src/main/target/HAKRCF411D/target.c
index 1423d2d199..f4fddb456a 100644
--- a/src/main/target/HAKRCF411D/target.c
+++ b/src/main/target/HAKRCF411D/target.c
@@ -23,7 +23,7 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM IN
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM IN
DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0), // S1
DEF_TIM(TIM3, CH2, PB5, TIM_USE_OUTPUT_AUTO, 0, 0), // S2
diff --git a/src/main/target/HAKRCKD722/target.c b/src/main/target/HAKRCKD722/target.c
index 16757ff641..e114f4410b 100644
--- a/src/main/target/HAKRCKD722/target.c
+++ b/src/main/target/HAKRCKD722/target.c
@@ -30,7 +30,7 @@ BUSDEV_REGISTER_SPI_TAG(busdev_icm42688, DEVHW_ICM42605, ICM42605_SPI_BUS, ICM42
BUSDEV_REGISTER_SPI_TAG(busdev_mpu6000, DEVHW_MPU6000, MPU6000_SPI_BUS, MPU6000_CS_PIN, NONE, 0, DEVFLAGS_NONE, IMU_MPU6000_ALIGN);
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM
DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0), // S1
DEF_TIM(TIM3, CH2, PB5, TIM_USE_OUTPUT_AUTO, 0, 0), // S2
diff --git a/src/main/target/HGLRCF722/target.c b/src/main/target/HGLRCF722/target.c
index 1ebbbf6337..e0e4a73e2a 100644
--- a/src/main/target/HGLRCF722/target.c
+++ b/src/main/target/HGLRCF722/target.c
@@ -47,8 +47,8 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0, 0), // S8 UP1-6 D(1, 3, 2)
DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 2), // LED D(2, 6, 0)
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM, RX2
- DEF_TIM(TIM5, CH3, PA2, TIM_USE_PWM, 0, 0), // TX2 & softserial1
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM, RX2
+ // DEF_TIM(TIM5, CH3, PA2, TIM_USE_PWM, 0, 0), // TX2 & softserial1
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/IFLIGHTF4_SUCCEXD/target.c b/src/main/target/IFLIGHTF4_SUCCEXD/target.c
index ad9ab68c9e..b79bc16075 100644
--- a/src/main/target/IFLIGHTF4_SUCCEXD/target.c
+++ b/src/main/target/IFLIGHTF4_SUCCEXD/target.c
@@ -24,7 +24,7 @@
#include "drivers/pinio.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0),
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0),
DEF_TIM(TIM5, CH1, PA0, TIM_USE_MOTOR, 0, 0),
DEF_TIM(TIM2, CH3, PB10, TIM_USE_MOTOR, 0, 0),
diff --git a/src/main/target/IFLIGHTF4_TWING/target.c b/src/main/target/IFLIGHTF4_TWING/target.c
index 87227cf3b0..fcf8b09a85 100644
--- a/src/main/target/IFLIGHTF4_TWING/target.c
+++ b/src/main/target/IFLIGHTF4_TWING/target.c
@@ -30,7 +30,7 @@ BUSDEV_REGISTER_SPI_TAG(busdev_imu0, DEVHW_MPU6500, MPU6500_0_SPI_BUS, MPU6
BUSDEV_REGISTER_SPI_TAG(busdev_imu1, DEVHW_MPU6500, MPU6500_1_SPI_BUS, MPU6500_1_CS_PIN, NONE, 1, DEVFLAGS_NONE, IMU_1_ALIGN);
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM
// Motors
DEF_TIM(TIM1, CH2N, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S1_OUT D2_ST6
diff --git a/src/main/target/IFLIGHTF7_TWING/target.c b/src/main/target/IFLIGHTF7_TWING/target.c
index 6876f07b20..b04f6ee8d3 100644
--- a/src/main/target/IFLIGHTF7_TWING/target.c
+++ b/src/main/target/IFLIGHTF7_TWING/target.c
@@ -30,7 +30,7 @@ BUSDEV_REGISTER_SPI_TAG(busdev_imu0, DEVHW_MPU6500, MPU6500_0_SPI_BUS, MPU6
BUSDEV_REGISTER_SPI_TAG(busdev_imu1, DEVHW_MPU6500, MPU6500_1_SPI_BUS, MPU6500_1_CS_PIN, NONE, 1, DEVFLAGS_NONE, IMU_1_ALIGN);
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0),
+ // DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0),
DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0),
DEF_TIM(TIM8, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0, 0),
diff --git a/src/main/target/IFLIGHT_BLITZ_F7_AIO/target.c b/src/main/target/IFLIGHT_BLITZ_F7_AIO/target.c
index 54ba97a490..e46c36e050 100644
--- a/src/main/target/IFLIGHT_BLITZ_F7_AIO/target.c
+++ b/src/main/target/IFLIGHT_BLITZ_F7_AIO/target.c
@@ -30,7 +30,7 @@
//BUSDEV_REGISTER_SPI_TAG(busdev_icm42605, DEVHW_ICM42605, ICM42605_SPI_BUS, ICM42605_CS_PIN, NONE, 0, DEVFLAGS_NONE, IMU_ICM42605_ALIGN);
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM2, CH2, PB3, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM2, CH2, PB3, TIM_USE_PPM, 0, 0), // PPM
DEF_TIM(TIM3, CH1, PB4, TIM_USE_MOTOR, 0, 0), // S1
DEF_TIM(TIM3, CH3, PB0, TIM_USE_MOTOR, 0, 0), // S2
diff --git a/src/main/target/IFLIGHT_BLITZ_F7_PRO/target.c b/src/main/target/IFLIGHT_BLITZ_F7_PRO/target.c
index b4b6f6de0f..664ff354b4 100644
--- a/src/main/target/IFLIGHT_BLITZ_F7_PRO/target.c
+++ b/src/main/target/IFLIGHT_BLITZ_F7_PRO/target.c
@@ -30,7 +30,7 @@ BUSDEV_REGISTER_SPI_TAG(busdev_mpu6000, DEVHW_MPU6000, MPU6000_SPI_BUS, MPU6000_
BUSDEV_REGISTER_SPI_TAG(busdev_bmi270, DEVHW_BMI270, BMI270_SPI_BUS, BMI270_CS_PIN, NONE, 0, DEVFLAGS_NONE, IMU_BMI270_ALIGN);
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM
DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 1), // S1
DEF_TIM(TIM3, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0, 0), // S2
diff --git a/src/main/target/IFLIGHT_JBF7PRO/target.c b/src/main/target/IFLIGHT_JBF7PRO/target.c
index 676c3d6dae..dcf7ae6438 100644
--- a/src/main/target/IFLIGHT_JBF7PRO/target.c
+++ b/src/main/target/IFLIGHT_JBF7PRO/target.c
@@ -25,7 +25,7 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // S1
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S2
diff --git a/src/main/target/KAKUTEF4/target.c b/src/main/target/KAKUTEF4/target.c
index bf58e5bdca..ba47d09ffe 100755
--- a/src/main/target/KAKUTEF4/target.c
+++ b/src/main/target/KAKUTEF4/target.c
@@ -29,7 +29,7 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0), // PPM IN
+ // DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0), // PPM IN
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S1_OUT - DMA1_ST7
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // S2_OUT - DMA1_ST2
diff --git a/src/main/target/KAKUTEF7/target.c b/src/main/target/KAKUTEF7/target.c
index 53ae9359de..e8ea423012 100755
--- a/src/main/target/KAKUTEF7/target.c
+++ b/src/main/target/KAKUTEF7/target.c
@@ -29,7 +29,7 @@
#include "drivers/bus.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM1, CH3, PE13, TIM_USE_PPM, 0, 1), // PPM, DMA2_ST6
+ // DEF_TIM(TIM1, CH3, PE13, TIM_USE_PPM, 0, 1), // PPM, DMA2_ST6
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // M1 , DMA1_ST7
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // M2 , DMA1_ST2
diff --git a/src/main/target/KAKUTEF7MINIV3/target.c b/src/main/target/KAKUTEF7MINIV3/target.c
index 095038960d..864c1de520 100644
--- a/src/main/target/KAKUTEF7MINIV3/target.c
+++ b/src/main/target/KAKUTEF7MINIV3/target.c
@@ -38,7 +38,7 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0, 0), // S5
DEF_TIM(TIM4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0, 0), // S6
DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // LED STRIP
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // RX2
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // RX2
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/KROOZX/target.c b/src/main/target/KROOZX/target.c
index c77a77aaed..a445a9656f 100755
--- a/src/main/target/KROOZX/target.c
+++ b/src/main/target/KROOZX/target.c
@@ -23,7 +23,7 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0), // PPM IN
+ // DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0), // PPM IN
DEF_TIM(TIM5, CH2, PA1, TIM_USE_MOTOR, 0, 0), // PWM4
DEF_TIM(TIM5, CH4, PA3, TIM_USE_MOTOR, 0, 0), // PWM2
diff --git a/src/main/target/MAMBAF405US/target.c b/src/main/target/MAMBAF405US/target.c
index 1781a047e3..19ba5944c2 100644
--- a/src/main/target/MAMBAF405US/target.c
+++ b/src/main/target/MAMBAF405US/target.c
@@ -25,7 +25,7 @@
#include "drivers/bus.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM11, CH1, PB9, TIM_USE_PPM, 0, 0 ), // PPM IN
+ // DEF_TIM(TIM11, CH1, PB9, TIM_USE_PPM, 0, 0 ), // PPM IN
#ifdef MAMBAF405US_I2C
DEF_TIM(TIM1, CH2, PA9, TIM_USE_OUTPUT_AUTO, 0, 1 ), // S1 pin A9: DMA2 Stream 6 Channel 0
diff --git a/src/main/target/MAMBAF722/target.c b/src/main/target/MAMBAF722/target.c
index b97969e57b..e1afa9b221 100644
--- a/src/main/target/MAMBAF722/target.c
+++ b/src/main/target/MAMBAF722/target.c
@@ -25,7 +25,7 @@
#include "drivers/bus.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM11, CH1, PB9, TIM_USE_PPM, 0, 0 ), // PPM IN
+ // DEF_TIM(TIM11, CH1, PB9, TIM_USE_PPM, 0, 0 ), // PPM IN
DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S1_OUT – D(2, 4, 7)
DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S2_OUT – D(2, 7, 7)
diff --git a/src/main/target/MAMBAF722_2022A/target.c b/src/main/target/MAMBAF722_2022A/target.c
index 9b51f13945..4d37113596 100644
--- a/src/main/target/MAMBAF722_2022A/target.c
+++ b/src/main/target/MAMBAF722_2022A/target.c
@@ -25,7 +25,7 @@
#include "drivers/bus.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM11, CH1, PB9, TIM_USE_PPM, 0, 0 ), // PPM IN
+ // DEF_TIM(TIM11, CH1, PB9, TIM_USE_PPM, 0, 0 ), // PPM IN
DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S1
DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S2
diff --git a/src/main/target/MAMBAF722_X8/target.c b/src/main/target/MAMBAF722_X8/target.c
index 9b51f13945..4d37113596 100644
--- a/src/main/target/MAMBAF722_X8/target.c
+++ b/src/main/target/MAMBAF722_X8/target.c
@@ -25,7 +25,7 @@
#include "drivers/bus.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM11, CH1, PB9, TIM_USE_PPM, 0, 0 ), // PPM IN
+ // DEF_TIM(TIM11, CH1, PB9, TIM_USE_PPM, 0, 0 ), // PPM IN
DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S1
DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S2
diff --git a/src/main/target/MATEKF405/target.c b/src/main/target/MATEKF405/target.c
index 254707887b..1706954b7f 100644
--- a/src/main/target/MATEKF405/target.c
+++ b/src/main/target/MATEKF405/target.c
@@ -22,7 +22,7 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM
DEF_TIM(TIM3, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0, 0), // S1
DEF_TIM(TIM8, CH2, PC7, TIM_USE_OUTPUT_AUTO, 0, 1), // S2 UP(2,1)
diff --git a/src/main/target/MATEKF405CAN/target.c b/src/main/target/MATEKF405CAN/target.c
index 2ab40de1dc..406a74ecd8 100644
--- a/src/main/target/MATEKF405CAN/target.c
+++ b/src/main/target/MATEKF405CAN/target.c
@@ -36,7 +36,7 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM2, CH1, PA15, TIM_USE_LED, 0, 0), //2812LED D(1,5,3)
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), //RX2
+ DEF_TIM(TIM9, CH2, PA3, TIM_USE_ANY, 0, 0), //RX2
DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), //TX2 softserial1_Tx
};
diff --git a/src/main/target/MATEKF405SE/target.c b/src/main/target/MATEKF405SE/target.c
index ef6fceaca9..6aa586e68a 100644
--- a/src/main/target/MATEKF405SE/target.c
+++ b/src/main/target/MATEKF405SE/target.c
@@ -35,7 +35,7 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM2, CH1, PA15, TIM_USE_LED, 0, 0), //2812LED D(1,5,3)
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), //RX2
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), //RX2
DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), //TX2 softserial1_Tx
};
diff --git a/src/main/target/MATEKF405TE/target.c b/src/main/target/MATEKF405TE/target.c
index 79f6269a52..2240915365 100644
--- a/src/main/target/MATEKF405TE/target.c
+++ b/src/main/target/MATEKF405TE/target.c
@@ -42,7 +42,7 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM3, CH4, PB1, TIM_USE_LED, 0, 0), // 2812LED D(1,2,5)
DEF_TIM(TIM11, CH1, PB9, TIM_USE_BEEPER, 0, 0), // BEEPER PWM
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), //RX2
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), //RX2
DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), //TX2 softserial1_Tx
};
diff --git a/src/main/target/MATEKF411/target.c b/src/main/target/MATEKF411/target.c
index fb2ccde3f1..9a15bfd8d1 100755
--- a/src/main/target/MATEKF411/target.c
+++ b/src/main/target/MATEKF411/target.c
@@ -35,7 +35,7 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM2, CH1, PA15, TIM_USE_OUTPUT_AUTO, 0, 0), // S7 D(1,5,3) - clash with S2
DEF_TIM(TIM1, CH1, PA8, TIM_USE_ANY, 0, 0), //softserial_tx2 - 2812LED TIM_USE_LED D(2,1,6)
- DEF_TIM(TIM5, CH1, PA0, TIM_USE_PPM, 0, 0), //use rssi pad for PPM/softserial_tx1
+ DEF_TIM(TIM5, CH1, PA0, TIM_USE_ANY, 0, 0), //use rssi pad for PPM/softserial_tx1
//DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // TX2
};
diff --git a/src/main/target/MATEKF722/target.c b/src/main/target/MATEKF722/target.c
index d2575f42f2..eb4275d39f 100644
--- a/src/main/target/MATEKF722/target.c
+++ b/src/main/target/MATEKF722/target.c
@@ -25,7 +25,7 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // PPM
DEF_TIM(TIM3, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0, 0), // S1 D(1, 4, 5)
DEF_TIM(TIM8, CH2, PC7, TIM_USE_OUTPUT_AUTO, 0, 0), // S2 D(2, 3, 7)
diff --git a/src/main/target/MATEKF722PX/target.c b/src/main/target/MATEKF722PX/target.c
index 170b67d951..da31a68e42 100755
--- a/src/main/target/MATEKF722PX/target.c
+++ b/src/main/target/MATEKF722PX/target.c
@@ -40,10 +40,9 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 2), // LED D(2, 3, 6)
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // RX2, PPM
- DEF_TIM(TIM5, CH3, PA2, TIM_USE_PWM, 0, 0), // TX2, softserial1_tx
-
- DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0), // Cam_ctrl reserved
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // RX2, PPM
+ DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // TX2, softserial1_tx
+ // DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0), // Cam_ctrl reserved
};
diff --git a/src/main/target/MATEKF722SE/target.c b/src/main/target/MATEKF722SE/target.c
index 6e469dfff3..585f3bb399 100644
--- a/src/main/target/MATEKF722SE/target.c
+++ b/src/main/target/MATEKF722SE/target.c
@@ -43,9 +43,9 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 2), // LED D(2, 6, 0)
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM, RX2
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0), // PPM, RX2
- DEF_TIM(TIM5, CH3, PA2, TIM_USE_PWM, 0, 0), // TX2 & softserial1
+ DEF_TIM(TIM5, CH3, PA2, TIM_USE_ANY, 0, 0), // TX2 & softserial1
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/MATEKF765/target.c b/src/main/target/MATEKF765/target.c
index 712beb4c8c..6d0599a29f 100644
--- a/src/main/target/MATEKF765/target.c
+++ b/src/main/target/MATEKF765/target.c
@@ -52,8 +52,8 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // LED_2812 D(2,6,0)
- DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0), // RX6 PPM
- DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0), // TX6
+ // DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0), // RX6 PPM
+ DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0), // TX6 and SoftwareSerial
DEF_TIM(TIM11, CH1, PB9, TIM_USE_BEEPER, 0, 0), // BEEPER PWM for MATEKF765SE
};
diff --git a/src/main/target/MATEKH743/target.c b/src/main/target/MATEKH743/target.c
index 1923e6623a..bc2fb01558 100644
--- a/src/main/target/MATEKH743/target.c
+++ b/src/main/target/MATEKH743/target.c
@@ -51,10 +51,10 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 9), // LED_2812
DEF_TIM(TIM2, CH1, PA15, TIM_USE_BEEPER, 0, 0), // BEEPER PWM
- DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0), // RX6 PPM
- DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0), // TX6
- DEF_TIM(TIM16, CH1, PB8, TIM_USE_ANY, 0, 0), // RX4
- DEF_TIM(TIM17, CH1, PB9, TIM_USE_ANY, 0, 0), // TX4
+ // DEF_TIM(TIM8, CH2, PC7, TIM_USE_PPM, 0, 0), // RX6 PPM
+ DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0), // TX6 SoftwareSerial
+ // DEF_TIM(TIM16, CH1, PB8, TIM_USE_ANY, 0, 0), // RX4
+ // DEF_TIM(TIM17, CH1, PB9, TIM_USE_ANY, 0, 0), // TX4
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/NEUTRONRCF435SE/target.c b/src/main/target/NEUTRONRCF435SE/target.c
index 3a8848911f..54c4932ebe 100644
--- a/src/main/target/NEUTRONRCF435SE/target.c
+++ b/src/main/target/NEUTRONRCF435SE/target.c
@@ -26,20 +26,19 @@
timerHardware_t timerHardware[] = {
- DEF_TIM(TMR5, CH1, PA0, TIM_USE_ANY, 0, 13), // TIM_USE_CAMERA_CONTROL
- DEF_TIM(TMR5, CH2, PA1, TIM_USE_ANY |TIM_USE_LED, 0,7), // PWM1 - LED MCO1 DMA1 CH2
- DEF_TIM(TMR2, CH4, PA3, TIM_USE_ANY |TIM_USE_PPM, 0,6), // PWM2 - PPM DMA1 CH6
+ DEF_TIM(TMR8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0,0), // motor1 DMA2 CH7
+ DEF_TIM(TMR8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0,2), // motor2 DMA2 CH6
+ DEF_TIM(TMR3, CH2, PC7, TIM_USE_OUTPUT_AUTO, 0,1), // motor3 DMA2 CH5
+ DEF_TIM(TMR3, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0,3), // motor4 DMA2 CH4
- DEF_TIM(TMR8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0,0), // motor1 DMA2 CH7
- DEF_TIM(TMR8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0,2), // motor2 DMA2 CH6
- DEF_TIM(TMR3, CH2, PC7, TIM_USE_OUTPUT_AUTO, 0,1), // motor3 DMA2 CH5
- DEF_TIM(TMR3, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0,3), // motor4 DMA2 CH4
-
- DEF_TIM(TMR4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0,11), // PWM1 - OUT5 DMA1 CH7
- DEF_TIM(TMR4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0,10), // PWM2 - OUT6 DMA2 CH1
- DEF_TIM(TMR3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0,9), // PWM3 - OUT7 DMA2 CH2
- DEF_TIM(TMR3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0,8), // PWM4 - OUT8 DMA2 CH3
+ DEF_TIM(TMR4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0,11), // PWM1 - OUT5 DMA1 CH7
+ DEF_TIM(TMR4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0,10), // PWM2 - OUT6 DMA2 CH1
+ DEF_TIM(TMR3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0,9), // PWM3 - OUT7 DMA2 CH2
+ DEF_TIM(TMR3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0,8), // PWM4 - OUT8 DMA2 CH3
+ // DEF_TIM(TMR5, CH1, PA0, TIM_USE_ANY, 0, 13), // TIM_USE_CAMERA_CONTROL
+ DEF_TIM(TMR5, CH2, PA1, TIM_USE_LED, 0,7), // PWM1 - LED MCO1 DMA1 CH2
+ // DEF_TIM(TMR2, CH4, PA3, TIM_USE_ANY |TIM_USE_PPM, 0,6), // PWM2 - PPM DMA1 CH6
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/NOX/target.c b/src/main/target/NOX/target.c
index e2651956e1..647c77bfa1 100755
--- a/src/main/target/NOX/target.c
+++ b/src/main/target/NOX/target.c
@@ -24,8 +24,6 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM2, CH3, PB10, TIM_USE_PPM, 0, 0), //PPM
- DEF_TIM(TIM2, CH1, PA0, TIM_USE_LED, 0, 0), //2812LED
DEF_TIM(TIM5, CH2, PA1, TIM_USE_OUTPUT_AUTO, 0, 0), // S1_OUT
DEF_TIM(TIM1, CH1N, PA7, TIM_USE_OUTPUT_AUTO, 0, 0), // S2_OUT
@@ -34,6 +32,9 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM9, CH1, PA2, TIM_USE_ANY, 0, 0), //UART2 TX
DEF_TIM(TIM9, CH2, PA3, TIM_USE_ANY, 0, 0), //UART2 RX
+
+ // DEF_TIM(TIM2, CH3, PB10, TIM_USE_PPM, 0, 0), //PPM
+ DEF_TIM(TIM2, CH1, PA0, TIM_USE_LED, 0, 0), //2812LED
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/OMNIBUSF4/target.c b/src/main/target/OMNIBUSF4/target.c
index 81b30e11f2..86485aa49f 100644
--- a/src/main/target/OMNIBUSF4/target.c
+++ b/src/main/target/OMNIBUSF4/target.c
@@ -24,17 +24,6 @@
#include "drivers/bus.h"
timerHardware_t timerHardware[] = {
-#if defined(OMNIBUSF4PRO) || defined(OMNIBUSF4V3)
- DEF_TIM(TIM10, CH1, PB8, TIM_USE_PPM, 0, 0), // PPM
- DEF_TIM(TIM4, CH4, PB9, TIM_USE_ANY, 0, 0), // S2_IN
-#else
- DEF_TIM(TIM12, CH1, PB14, TIM_USE_PPM, 0, 0), // PPM
- DEF_TIM(TIM12, CH2, PB15, TIM_USE_ANY, 0, 0), // S2_IN
-#endif
- DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0), // S3_IN, UART6_TX
- DEF_TIM(TIM8, CH2, PC7, TIM_USE_ANY, 0, 0), // S4_IN, UART6_RX
- DEF_TIM(TIM8, CH3, PC8, TIM_USE_ANY, 0, 0), // S5_IN // pad labelled CH5 on OMNIBUSF4PRO
- DEF_TIM(TIM8, CH4, PC9, TIM_USE_ANY, 0, 0), // S6_IN // pad labelled CH6 on OMNIBUSF4PRO
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S1_OUT D1_ST7
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // S2_OUT D1_ST2
@@ -63,6 +52,19 @@ timerHardware_t timerHardware[] = {
#if (defined(OMNIBUSF4PRO) || defined(OMNIBUSF4V3)) && !defined(OMNIBUSF4PRO_LEDSTRIPM5)
DEF_TIM(TIM4, CH1, PB6, TIM_USE_LED, 0, 0), // LED strip for F4 V2 / F4-Pro-0X and later (RCD_CS for F4)
#endif
+
+#if defined(OMNIBUSF4PRO) || defined(OMNIBUSF4V3)
+ // DEF_TIM(TIM10, CH1, PB8, TIM_USE_PPM, 0, 0), // PPM
+ DEF_TIM(TIM4, CH4, PB9, TIM_USE_ANY, 0, 0), // S2_IN
+#else
+ // DEF_TIM(TIM12, CH1, PB14, TIM_USE_PPM, 0, 0), // PPM
+ DEF_TIM(TIM12, CH2, PB15, TIM_USE_ANY, 0, 0), // S2_IN
+#endif
+ DEF_TIM(TIM8, CH1, PC6, TIM_USE_ANY, 0, 0), // S3_IN, UART6_TX
+ DEF_TIM(TIM8, CH2, PC7, TIM_USE_ANY, 0, 0), // S4_IN, UART6_RX
+ DEF_TIM(TIM8, CH3, PC8, TIM_USE_ANY, 0, 0), // S5_IN // pad labelled CH5 on OMNIBUSF4PRO
+ DEF_TIM(TIM8, CH4, PC9, TIM_USE_ANY, 0, 0), // S6_IN // pad labelled CH6 on OMNIBUSF4PRO
+
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/OMNIBUSF7NXT/target.c b/src/main/target/OMNIBUSF7NXT/target.c
index b1eb7332dc..573c3e1bcd 100644
--- a/src/main/target/OMNIBUSF7NXT/target.c
+++ b/src/main/target/OMNIBUSF7NXT/target.c
@@ -36,7 +36,7 @@ BUSDEV_REGISTER_SPI_TAG(busdev_mpu6000, DEVHW_MPU6000, MPU6000_SPI_BUS,
BUSDEV_REGISTER_SPI_TAG(busdev_mpu6500, DEVHW_MPU6500, MPU6500_SPI_BUS, MPU6500_CS_PIN, NONE, 1, DEVFLAGS_NONE, IMU_MPU6500_ALIGN);
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM4, CH2, PB7, TIM_USE_PPM, 0, 0), // PPM / UART1_RX
+ // DEF_TIM(TIM4, CH2, PB7, TIM_USE_PPM, 0, 0), // PPM / UART1_RX
// OUTPUT 1-4
DEF_TIM(TIM3, CH2, PB5, TIM_USE_OUTPUT_AUTO, 1, 0), // D(1, 5, 5)
diff --git a/src/main/target/PIXRACER/target.c b/src/main/target/PIXRACER/target.c
index 73c9d6937a..2364e60aec 100755
--- a/src/main/target/PIXRACER/target.c
+++ b/src/main/target/PIXRACER/target.c
@@ -37,7 +37,7 @@ BUSDEV_REGISTER_I2C_TAG(busdev_mag3110, DEVHW_MAG3110, MAG_I2C_BUS,
BUSDEV_REGISTER_SPI_TAG(busdev_hmc5983_spi, DEVHW_HMC5883, MPU9250_SPI_BUS, PE15, NONE, 1, DEVFLAGS_NONE, 0);
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM3, CH3, PB0, TIM_USE_PPM, 0, 0), // PPM shared uart6 pc7
+ // DEF_TIM(TIM3, CH3, PB0, TIM_USE_PPM, 0, 0), // PPM shared uart6 pc7
DEF_TIM(TIM1, CH4, PE14, TIM_USE_OUTPUT_AUTO, 0, 0), // S1_OUT
DEF_TIM(TIM1, CH3, PE13, TIM_USE_OUTPUT_AUTO, 0, 0), // S2_OUT
diff --git a/src/main/target/RADIX/target.c b/src/main/target/RADIX/target.c
index db78409cda..ba10f01818 100644
--- a/src/main/target/RADIX/target.c
+++ b/src/main/target/RADIX/target.c
@@ -25,7 +25,7 @@
/* TIMERS */
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM12, CH1, PB14, TIM_USE_PPM, 0, 0), // PPM In
+ // DEF_TIM(TIM12, CH1, PB14, TIM_USE_PPM, 0, 0), // PPM In
DEF_TIM(TIM5, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0), // S1
DEF_TIM(TIM5, CH4, PA3, TIM_USE_OUTPUT_AUTO, 0, 0), // S2
DEF_TIM(TIM1, CH3, PA10, TIM_USE_OUTPUT_AUTO, 0, 0), // S3
diff --git a/src/main/target/REVO/target.c b/src/main/target/REVO/target.c
index d1203adadc..e1a2c2e841 100644
--- a/src/main/target/REVO/target.c
+++ b/src/main/target/REVO/target.c
@@ -41,12 +41,12 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM5, CH2, PA1, TIM_USE_OUTPUT_AUTO | TIM_USE_ANY, 0, 0), // S5_OUT / LED
DEF_TIM(TIM5, CH1, PA0, TIM_USE_OUTPUT_AUTO, 0, 0), // S6_OUT D1_ST2
- DEF_TIM(TIM12, CH1, PB14, TIM_USE_PWM | TIM_USE_PPM, 0, 0), // PPM (5th pin on FlexiIO port)
- DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0), // S2_IN
- DEF_TIM(TIM8, CH1, PC6, TIM_USE_PWM | TIM_USE_OUTPUT_AUTO, 0, 0), // S3_IN
- DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM | TIM_USE_OUTPUT_AUTO, 0, 0), // S4_IN
- DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM | TIM_USE_OUTPUT_AUTO, 0, 0), // S5_IN
- DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM | TIM_USE_OUTPUT_AUTO, 0, 0), // S6_IN
+ // DEF_TIM(TIM12, CH1, PB14, TIM_USE_PWM | TIM_USE_PPM, 0, 0), // PPM (5th pin on FlexiIO port)
+ // DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0), // S2_IN
+ DEF_TIM(TIM8, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0, 0), // S3_IN
+ DEF_TIM(TIM8, CH2, PC7, TIM_USE_OUTPUT_AUTO, 0, 0), // S4_IN
+ DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0), // S5_IN
+ DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // S6_IN
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/SAGEATF4/target.c b/src/main/target/SAGEATF4/target.c
index 4887541467..dd0f274b9f 100644
--- a/src/main/target/SAGEATF4/target.c
+++ b/src/main/target/SAGEATF4/target.c
@@ -26,9 +26,7 @@
timerHardware_t timerHardware[] = {
- DEF_TIM(TMR5, CH4, PA3, TIM_USE_PPM, 0, 4), // PPM UART2_RX_PIN DMA1 CH5
- DEF_TIM(TMR2, CH3, PB10, TIM_USE_ANY | TIM_USE_LED, 0,5), // PWM1 - LED MCO1 DMA1 CH6
- DEF_TIM(TMR2, CH4, PB11, TIM_USE_ANY | TIM_USE_BEEPER, 0,6), // PWM2 - BB DMA1 CH7
+ // DEF_TIM(TMR5, CH4, PA3, TIM_USE_PPM, 0, 4), // PPM UART2_RX_PIN DMA1 CH5
DEF_TIM(TMR4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0,0), // motor1 DMA1 CH1
DEF_TIM(TMR4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0,1), // motor2 DMA1 CH2
@@ -40,6 +38,8 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TMR3, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0,10), // PWM3 - OUT7 DMA2 CH4
DEF_TIM(TMR3, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0,11), // PWM4 - OUT8 DMA2 CH5
+ DEF_TIM(TMR2, CH3, PB10, TIM_USE_ANY | TIM_USE_LED, 0,5), // PWM1 - LED MCO1 DMA1 CH6
+ DEF_TIM(TMR2, CH4, PB11, TIM_USE_ANY | TIM_USE_BEEPER, 0,6), // PWM2 - BB DMA1 CH7
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/SKYSTARSF405HD/target.c b/src/main/target/SKYSTARSF405HD/target.c
index 40ab18015a..3da0f45db9 100644
--- a/src/main/target/SKYSTARSF405HD/target.c
+++ b/src/main/target/SKYSTARSF405HD/target.c
@@ -22,7 +22,7 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM1, CH1, PA8, TIM_USE_PPM, 0, 0),
+ // DEF_TIM(TIM1, CH1, PA8, TIM_USE_PPM, 0, 0),
DEF_TIM(TIM4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0, 0),
DEF_TIM(TIM4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0, 0),
diff --git a/src/main/target/SKYSTARSF722HD/target.c b/src/main/target/SKYSTARSF722HD/target.c
index 72ac897455..bee870243a 100644
--- a/src/main/target/SKYSTARSF722HD/target.c
+++ b/src/main/target/SKYSTARSF722HD/target.c
@@ -22,7 +22,7 @@
#include "drivers/timer.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM3, CH1, PB4, TIM_USE_PPM, 0, 0),
+ // DEF_TIM(TIM3, CH1, PB4, TIM_USE_PPM, 0, 0),
DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0), // TIM3_CH3 / TIM8_CH3
DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // TIM3_CH4 / TIM8_CH4
diff --git a/src/main/target/SPARKY2/target.c b/src/main/target/SPARKY2/target.c
index b4b4b29504..9364f231c5 100644
--- a/src/main/target/SPARKY2/target.c
+++ b/src/main/target/SPARKY2/target.c
@@ -24,11 +24,11 @@
#include "drivers/bus.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM | TIM_USE_PPM, 0, 0 ), // PPM IN
- DEF_TIM(TIM12, CH1, PB14, TIM_USE_PWM, 0, 0 ), // S2_IN
- DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0 ), // S3_IN - GPIO_PartialRemap_TIM3
- DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0 ), // S4_IN
- DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM, 0, 0 ), // S5_IN
+ // DEF_TIM(TIM8, CH2, PC7, TIM_USE_PWM | TIM_USE_PPM, 0, 0 ), // PPM IN
+ // DEF_TIM(TIM12, CH1, PB14, TIM_USE_PWM, 0, 0 ), // S2_IN
+ // DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0 ), // S3_IN - GPIO_PartialRemap_TIM3
+ // DEF_TIM(TIM8, CH3, PC8, TIM_USE_PWM, 0, 0 ), // S4_IN
+ // DEF_TIM(TIM8, CH4, PC9, TIM_USE_PWM, 0, 0 ), // S5_IN
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S1_OUT
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S2_OUT
diff --git a/src/main/target/SPEEDYBEEF4/target.c b/src/main/target/SPEEDYBEEF4/target.c
index b45c517bfa..075640d0f0 100644
--- a/src/main/target/SPEEDYBEEF4/target.c
+++ b/src/main/target/SPEEDYBEEF4/target.c
@@ -24,7 +24,7 @@
#include "drivers/bus.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // PPM
DEF_TIM(TIM3, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0, 0), // S1 UP(1,2)
DEF_TIM(TIM3, CH2, PC7, TIM_USE_OUTPUT_AUTO, 0, 0), // S2 UP(2,1)
diff --git a/src/main/target/SPEEDYBEEF7/target.c b/src/main/target/SPEEDYBEEF7/target.c
index 78821f5259..ac38530b84 100644
--- a/src/main/target/SPEEDYBEEF7/target.c
+++ b/src/main/target/SPEEDYBEEF7/target.c
@@ -24,7 +24,7 @@
#include "drivers/bus.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // PPM
DEF_TIM(TIM8, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0, 0), // S1
DEF_TIM(TIM8, CH2, PC7, TIM_USE_OUTPUT_AUTO, 0, 0), // S2
diff --git a/src/main/target/SPEEDYBEEF7MINI/target.c b/src/main/target/SPEEDYBEEF7MINI/target.c
index 32b5792dda..2b0777ab57 100644
--- a/src/main/target/SPEEDYBEEF7MINI/target.c
+++ b/src/main/target/SPEEDYBEEF7MINI/target.c
@@ -46,7 +46,7 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM8, CH3, PC8, TIM_USE_LED, 0, 0), // LED D(2, 6, 0)
- DEF_TIM(TIM1, CH3, PA10, TIM_USE_PPM, 0, 0), // PPM, RX1
+ // DEF_TIM(TIM1, CH3, PA10, TIM_USE_PPM, 0, 0), // PPM, RX1
DEF_TIM(TIM5, CH3, PA2, TIM_USE_PWM, 0, 0), // TX2 & softserial1
};
diff --git a/src/main/target/SPEEDYBEEF7V2/target.c b/src/main/target/SPEEDYBEEF7V2/target.c
index 0914224a05..abf06021a1 100644
--- a/src/main/target/SPEEDYBEEF7V2/target.c
+++ b/src/main/target/SPEEDYBEEF7V2/target.c
@@ -27,7 +27,7 @@
#include "drivers/bus.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM4, CH2, PB7, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM4, CH2, PB7, TIM_USE_PPM, 0, 0), // PPM
DEF_TIM(TIM1, CH1, PA8, TIM_USE_OUTPUT_AUTO, 0, 1), // S1
DEF_TIM(TIM1, CH2, PA9, TIM_USE_OUTPUT_AUTO, 0, 1), // S2
diff --git a/src/main/target/SPRACINGF4EVO/target.c b/src/main/target/SPRACINGF4EVO/target.c
index deabe8665d..5b108168c1 100755
--- a/src/main/target/SPRACINGF4EVO/target.c
+++ b/src/main/target/SPRACINGF4EVO/target.c
@@ -23,8 +23,8 @@
timerHardware_t timerHardware[] =
{
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM | TIM_USE_PWM, 0, 0), // PPM / PWM1 / UART2 RX
- DEF_TIM(TIM9, CH1, PA2, TIM_USE_PWM, 0, 0), // PPM / PWM2 / UART2 TX
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM | TIM_USE_PWM, 0, 0), // PPM / PWM1 / UART2 RX
+ // DEF_TIM(TIM9, CH1, PA2, TIM_USE_PWM, 0, 0), // PPM / PWM2 / UART2 TX
DEF_TIM(TIM8, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0, 1), // ESC 1
DEF_TIM(TIM8, CH2, PC7, TIM_USE_OUTPUT_AUTO, 0, 1), // ESC 2
diff --git a/src/main/target/SPRACINGF7DUAL/target.c b/src/main/target/SPRACINGF7DUAL/target.c
index f47d1a0835..e94835b93c 100644
--- a/src/main/target/SPRACINGF7DUAL/target.c
+++ b/src/main/target/SPRACINGF7DUAL/target.c
@@ -35,8 +35,8 @@ BUSDEV_REGISTER_SPI_TAG(busdev_mpu6500_2, DEVHW_MPU6500, MPU6500_2_SPI_
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM | TIM_USE_PWM, 0, 0), // PPM / PWM1 / UART2 RX
- DEF_TIM(TIM9, CH1, PA2, TIM_USE_PWM, 0, 0), // PPM / PWM2 / UART2 TX
+ // DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM | TIM_USE_PWM, 0, 0), // PPM / PWM1 / UART2 RX
+ // DEF_TIM(TIM9, CH1, PA2, TIM_USE_PWM, 0, 0), // PPM / PWM2 / UART2 TX
#if (SPRACINGF7DUAL_REV <= 1)
DEF_TIM(TIM8, CH2, PC7, TIM_USE_MOTOR, 0, 0), // ESC 1
diff --git a/src/main/target/TMOTORF7/target.c b/src/main/target/TMOTORF7/target.c
index 2f96517ba1..0af36aa68c 100644
--- a/src/main/target/TMOTORF7/target.c
+++ b/src/main/target/TMOTORF7/target.c
@@ -37,7 +37,7 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0, 0),
DEF_TIM(TIM4, CH3, PB8, TIM_USE_OUTPUT_AUTO, 0, 0),
- DEF_TIM(TIM2, CH1, PA15, TIM_USE_PPM, 0, 0),
+ // DEF_TIM(TIM2, CH1, PA15, TIM_USE_PPM, 0, 0),
DEF_TIM(TIM11, CH1, PB9, TIM_USE_ANY, 0, 0),
DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0)
diff --git a/src/main/target/TMOTORF7V2/target.c b/src/main/target/TMOTORF7V2/target.c
index 606ac8819d..c21b0f0229 100644
--- a/src/main/target/TMOTORF7V2/target.c
+++ b/src/main/target/TMOTORF7V2/target.c
@@ -24,7 +24,7 @@
#include "drivers/bus.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // PPM
+ // DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 0), // PPM
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S1
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // S2
diff --git a/src/main/target/YUPIF4/target.c b/src/main/target/YUPIF4/target.c
index 310ab66b0a..837647a89b 100644
--- a/src/main/target/YUPIF4/target.c
+++ b/src/main/target/YUPIF4/target.c
@@ -24,7 +24,7 @@
#include "drivers/bus.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM8, CH3, PC8, TIM_USE_PPM, 0, 0 ), // PPM IN
+ // DEF_TIM(TIM8, CH3, PC8, TIM_USE_PPM, 0, 0 ), // PPM IN
DEF_TIM(TIM5, CH1, PA0, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S1_OUT - DMA1_ST2
DEF_TIM(TIM5, CH2, PA1, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S2_OUT - DMA1_ST4
diff --git a/src/main/target/YUPIF7/target.c b/src/main/target/YUPIF7/target.c
index cd6a17ee68..3587a8bc4b 100644
--- a/src/main/target/YUPIF7/target.c
+++ b/src/main/target/YUPIF7/target.c
@@ -24,7 +24,7 @@
#include "drivers/bus.h"
timerHardware_t timerHardware[] = {
- DEF_TIM(TIM8, CH3, PC8, TIM_USE_PPM, 0, 1 ), // PPM IN
+ // DEF_TIM(TIM8, CH3, PC8, TIM_USE_PPM, 0, 1 ), // PPM IN
DEF_TIM(TIM2, CH1, PA0, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S1_OUT - DMA1_ST2
DEF_TIM(TIM5, CH2, PA1, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S2_OUT - DMA1_ST4
DEF_TIM(TIM5, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S3_OUT - DMA1_ST1
From a47afe2187f7120ef2462b049ab21f7817595c3e Mon Sep 17 00:00:00 2001
From: Darren Lines
Date: Mon, 6 Nov 2023 21:49:20 +0000
Subject: [PATCH 26/61] Show system message when linear descent begins
---
src/main/io/osd.c | 17 ++++++++++++++---
src/main/io/osd.h | 1 +
src/main/navigation/navigation.c | 5 +++++
src/main/navigation/navigation_private.h | 1 +
4 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/src/main/io/osd.c b/src/main/io/osd.c
index 1662094cab..89ee0642a4 100644
--- a/src/main/io/osd.c
+++ b/src/main/io/osd.c
@@ -154,8 +154,9 @@
#define OSD_MIN_FONT_VERSION 3
-static timeMs_t notify_settings_saved = 0;
-static bool savingSettings = false;
+static timeMs_t linearDescentMessageMs = 0;
+static timeMs_t notify_settings_saved = 0;
+static bool savingSettings = false;
static unsigned currentLayout = 0;
static int layoutOverride = -1;
@@ -1011,7 +1012,13 @@ static const char * navigationStateMessage(void)
if (posControl.flags.rthTrackbackActive) {
return OSD_MESSAGE_STR(OSD_MSG_RTH_TRACKBACK);
} else {
- return OSD_MESSAGE_STR(OSD_MSG_HEADING_HOME);
+ if (posControl.rthState.rthLinearDescentActive && (linearDescentMessageMs == 0 || linearDescentMessageMs > millis())) {
+ if (linearDescentMessageMs == 0)
+ linearDescentMessageMs = millis() + 5000; // Show message for 5 seconds.
+
+ return OSD_MESSAGE_STR(OSD_MSG_RTH_LINEAR_DESCENT);
+ } else
+ return OSD_MESSAGE_STR(OSD_MSG_HEADING_HOME);
}
case MW_NAV_STATE_HOLD_INFINIT:
// Used by HOLD flight modes. No information to add.
@@ -1052,6 +1059,10 @@ static const char * navigationStateMessage(void)
// Not used
break;
}
+
+ if (!posControl.rthState.rthLinearDescentActive && linearDescentMessageMs != 0)
+ linearDescentMessageMs = 0;
+
return NULL;
}
diff --git a/src/main/io/osd.h b/src/main/io/osd.h
index f09c9d049b..18851c5d80 100644
--- a/src/main/io/osd.h
+++ b/src/main/io/osd.h
@@ -93,6 +93,7 @@
#define OSD_MSG_RTH_CLIMB "ADJUSTING RTH ALTITUDE"
#define OSD_MSG_RTH_TRACKBACK "RTH BACK TRACKING"
#define OSD_MSG_HEADING_HOME "EN ROUTE TO HOME"
+#define OSD_MSG_RTH_LINEAR_DESCENT "BEGIN LINEAR DESCENT"
#define OSD_MSG_WP_FINISHED "WP END>HOLDING POSITION"
#define OSD_MSG_WP_LANDED "WP END>LANDED"
#define OSD_MSG_PREPARE_NEXT_WP "PREPARING FOR NEXT WAYPOINT"
diff --git a/src/main/navigation/navigation.c b/src/main/navigation/navigation.c
index c991531f32..db04d38bd7 100644
--- a/src/main/navigation/navigation.c
+++ b/src/main/navigation/navigation.c
@@ -1432,6 +1432,7 @@ static navigationFSMEvent_t navOnEnteringState_NAV_STATE_RTH_HEAD_HOME(navigatio
if (homeDistance <= METERS_TO_CENTIMETERS(navConfig()->general.rth_linear_descent_start_distance)) {
posControl.rthState.rthFinalAltitude = posControl.rthState.homePosition.pos.z + navConfig()->general.rth_home_altitude;
+ posControl.rthState.rthLinearDescentActive = true;
}
}
@@ -1442,6 +1443,10 @@ static navigationFSMEvent_t navOnEnteringState_NAV_STATE_RTH_HEAD_HOME(navigatio
if (isWaypointReached(tmpHomePos, 0)) {
// Successfully reached position target - update XYZ-position
setDesiredPosition(tmpHomePos, posControl.rthState.homePosition.heading, NAV_POS_UPDATE_XY | NAV_POS_UPDATE_Z | NAV_POS_UPDATE_HEADING);
+
+ if (navConfig()->general.flags.rth_use_linear_descent)
+ posControl.rthState.rthLinearDescentActive = false;
+
return NAV_FSM_EVENT_SUCCESS; // NAV_STATE_RTH_HOVER_PRIOR_TO_LANDING
} else {
setDesiredPosition(tmpHomePos, 0, NAV_POS_UPDATE_Z | NAV_POS_UPDATE_XY);
diff --git a/src/main/navigation/navigation_private.h b/src/main/navigation/navigation_private.h
index c408f109c9..776eca78ea 100644
--- a/src/main/navigation/navigation_private.h
+++ b/src/main/navigation/navigation_private.h
@@ -350,6 +350,7 @@ typedef struct {
float rthInitialDistance; // Distance when starting flight home
fpVector3_t homeTmpWaypoint; // Temporary storage for home target
fpVector3_t originalHomePosition; // the original rth home - save it, since it could be replaced by safehome or HOME_RESET
+ bool rthLinearDescentActive; // Activation status of Linear Descent
} rthState_t;
typedef enum {
From 62d78ae7c2e6b8ed72e9651ca5aa4b24d62ea76b Mon Sep 17 00:00:00 2001
From: Darren Lines
Date: Tue, 7 Nov 2023 08:13:35 +0000
Subject: [PATCH 27/61] Bug fix
Multiple RTH and early exit from RTH fixed. Message would only be displayed for first RTH.
---
src/main/io/osd.c | 6 +++---
src/main/navigation/navigation.c | 5 ++++-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/main/io/osd.c b/src/main/io/osd.c
index 89ee0642a4..a178d5b55f 100644
--- a/src/main/io/osd.c
+++ b/src/main/io/osd.c
@@ -1001,6 +1001,9 @@ static const char * divertingToSafehomeMessage(void)
static const char * navigationStateMessage(void)
{
+ if (!posControl.rthState.rthLinearDescentActive && linearDescentMessageMs != 0)
+ linearDescentMessageMs = 0;
+
switch (NAV_Status.state) {
case MW_NAV_STATE_NONE:
break;
@@ -1060,9 +1063,6 @@ static const char * navigationStateMessage(void)
break;
}
- if (!posControl.rthState.rthLinearDescentActive && linearDescentMessageMs != 0)
- linearDescentMessageMs = 0;
-
return NULL;
}
diff --git a/src/main/navigation/navigation.c b/src/main/navigation/navigation.c
index db04d38bd7..94014e86c4 100644
--- a/src/main/navigation/navigation.c
+++ b/src/main/navigation/navigation.c
@@ -1227,6 +1227,9 @@ static navigationFSMEvent_t navOnEnteringState_NAV_STATE_RTH_INITIALIZE(navigati
{
UNUSED(previousState);
+ if (navConfig()->general.flags.rth_use_linear_descent && posControl.rthState.rthLinearDescentActive)
+ posControl.rthState.rthLinearDescentActive = false;
+
if ((posControl.flags.estHeadingStatus == EST_NONE) || (posControl.flags.estAltStatus == EST_NONE) || !STATE(GPS_FIX_HOME)) {
// Heading sensor, altitude sensor and HOME fix are mandatory for RTH. If not satisfied - switch to emergency landing
// Relevant to failsafe forced RTH only. Switched RTH blocked in selectNavEventFromBoxModeInput if sensors unavailable.
@@ -1444,7 +1447,7 @@ static navigationFSMEvent_t navOnEnteringState_NAV_STATE_RTH_HEAD_HOME(navigatio
// Successfully reached position target - update XYZ-position
setDesiredPosition(tmpHomePos, posControl.rthState.homePosition.heading, NAV_POS_UPDATE_XY | NAV_POS_UPDATE_Z | NAV_POS_UPDATE_HEADING);
- if (navConfig()->general.flags.rth_use_linear_descent)
+ if (navConfig()->general.flags.rth_use_linear_descent && posControl.rthState.rthLinearDescentActive)
posControl.rthState.rthLinearDescentActive = false;
return NAV_FSM_EVENT_SUCCESS; // NAV_STATE_RTH_HOVER_PRIOR_TO_LANDING
From c6d15733e289e53f4ae5510c8ccbfa90bc0a8c1a Mon Sep 17 00:00:00 2001
From: "Pawel Spychalski (DzikuVx)"
Date: Tue, 7 Nov 2023 10:56:04 +0100
Subject: [PATCH 28/61] change to ANYFCF7
---
src/main/target/ANYFCF7/target.c | 30 ++++++++++++++++--------------
1 file changed, 16 insertions(+), 14 deletions(-)
diff --git a/src/main/target/ANYFCF7/target.c b/src/main/target/ANYFCF7/target.c
index dc523f4c78..b5ef1f12c4 100644
--- a/src/main/target/ANYFCF7/target.c
+++ b/src/main/target/ANYFCF7/target.c
@@ -26,21 +26,23 @@ timerHardware_t timerHardware[] = {
// DEF_TIM(TIM12, CH1, PB14, TIM_USE_PWM | TIM_USE_PPM, 0, 0 ), // S1_IN
// DEF_TIM(TIM12, CH2, PB15, TIM_USE_PWM, 0, 0 ), // S2_IN
- DEF_TIM(TIM4, CH3, PB8, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S10_OUT 1 DMA1_ST7
- DEF_TIM(TIM5, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S6_OUT 2 DMA1_ST0
- DEF_TIM(TIM4, CH4, PB9, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S5_OUT
- DEF_TIM(TIM5, CH4, PA3, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S1_OUT 4 DMA1_ST1 DMA1_ST3
- DEF_TIM(TIM5, CH2, PA1, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S2_OUT 3 DMA1_ST4
- DEF_TIM(TIM9, CH2, PE6, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S3_OUT
- DEF_TIM(TIM3, CH2, PB5, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S4_OUT DMA1_ST5
- DEF_TIM(TIM5, CH1, PA0, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S7_OUT DMA1_ST2
- DEF_TIM(TIM2, CH2, PB3, TIM_USE_OUTPUT_AUTO | TIM_USE_LED, 0, 0 ), // S8_OUT DMA1_ST6
- DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S9_OUT DMA1_ST4
+ DEF_TIM(TIM8, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S3_IN DMA2_ST2 DMA2_ST2
+ DEF_TIM(TIM8, CH2, PC7, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S4_IN DMA2_ST3 DMA2_ST2
+ DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S5_IN DMA2_ST4 DMA2_ST2
+ DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S6_IN DMA2_ST7
+
+ DEF_TIM(TIM4, CH3, PB8, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S10_OUT 1 DMA1_ST7
+ DEF_TIM(TIM5, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S6_OUT 2 DMA1_ST0
+ DEF_TIM(TIM4, CH4, PB9, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S5_OUT
+ DEF_TIM(TIM5, CH4, PA3, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S1_OUT 4 DMA1_ST1 DMA1_ST3
+ DEF_TIM(TIM5, CH2, PA1, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S2_OUT 3 DMA1_ST4
+ DEF_TIM(TIM9, CH2, PE6, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S3_OUT
+ DEF_TIM(TIM3, CH2, PB5, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S4_OUT DMA1_ST5
+ DEF_TIM(TIM5, CH1, PA0, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S7_OUT DMA1_ST2
+ DEF_TIM(TIM2, CH2, PB3, TIM_USE_OUTPUT_AUTO | TIM_USE_LED, 0, 0 ), // S8_OUT DMA1_ST6
+ DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S9_OUT DMA1_ST4
- DEF_TIM(TIM8, CH1, PC6, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S3_IN DMA2_ST2 DMA2_ST2
- DEF_TIM(TIM8, CH2, PC7, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S4_IN DMA2_ST3 DMA2_ST2
- DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S5_IN DMA2_ST4 DMA2_ST2
- DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0 ), // S6_IN DMA2_ST7
+
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
From 5cab1b1820aae7ab2863f4cb658300d48237fa61 Mon Sep 17 00:00:00 2001
From: "Pawel Spychalski (DzikuVx)"
Date: Wed, 8 Nov 2023 12:12:39 +0100
Subject: [PATCH 29/61] Change the SPI of Mamba H743
---
.vscode/settings.json | 3 ++-
src/main/target/MAMBAH743/target.h | 15 +++++++--------
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/.vscode/settings.json b/.vscode/settings.json
index ebbda008b6..9be3fced22 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -4,7 +4,8 @@
"cmath": "c",
"ranges": "c",
"platform.h": "c",
- "timer.h": "c"
+ "timer.h": "c",
+ "bus.h": "c"
},
"editor.tabSize": 4,
"editor.insertSpaces": true,
diff --git a/src/main/target/MAMBAH743/target.h b/src/main/target/MAMBAH743/target.h
index 18070e1775..7fcea85f48 100644
--- a/src/main/target/MAMBAH743/target.h
+++ b/src/main/target/MAMBAH743/target.h
@@ -60,16 +60,15 @@
#ifdef MAMBAH743_2022B
-// SPI4 is used on the second MPU6000 gyro, we do not use it at the moment
-// #define USE_SPI_DEVICE_4
-// #define SPI4_SCK_PIN PE12
-// #define SPI4_MISO_PIN PE13
-// #define SPI4_MOSI_PIN PE14
+#define USE_SPI_DEVICE_4
+#define SPI4_SCK_PIN PE12
+#define SPI4_MISO_PIN PE13
+#define SPI4_MOSI_PIN PE14
#define USE_IMU_ICM42605
-#define IMU_ICM42605_ALIGN CW0_DEG
-#define ICM42605_SPI_BUS BUS_SPI1
-#define ICM42605_CS_PIN PA4
+#define IMU_ICM42605_ALIGN CW270_DEG
+#define ICM42605_SPI_BUS BUS_SPI4
+#define ICM42605_CS_PIN PE11
#endif
From 5c0c3ddb7dc0c4c468bddd27c81c0d3097ecaaad Mon Sep 17 00:00:00 2001
From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com>
Date: Wed, 8 Nov 2023 18:43:27 +0100
Subject: [PATCH 30/61] Change 3d deadband check to use 3d deadband min and max
from ui, instead of mid_throttle_deadband
---
src/main/fc/rc_controls.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/fc/rc_controls.c b/src/main/fc/rc_controls.c
index 8a03ed8128..7dec6d624a 100644
--- a/src/main/fc/rc_controls.c
+++ b/src/main/fc/rc_controls.c
@@ -119,8 +119,8 @@ throttleStatus_e FAST_CODE NOINLINE calculateThrottleStatus(throttleStatusType_e
value = rcCommand[THROTTLE];
}
- const uint16_t mid_throttle_deadband = rcControlsConfig()->mid_throttle_deadband;
- bool midThrottle = value > (PWM_RANGE_MIDDLE - mid_throttle_deadband) && value < (PWM_RANGE_MIDDLE + mid_throttle_deadband);
+ //const uint16_t mid_throttle_deadband = rcControlsConfig()->mid_throttle_deadband;
+ bool midThrottle = value > (rcControlsConfig->deadband_low) && value < (rcControlsConfig->deadband_high);
if ((feature(FEATURE_REVERSIBLE_MOTORS) && midThrottle) || (!feature(FEATURE_REVERSIBLE_MOTORS) && (value < rxConfig()->mincheck))) {
return THROTTLE_LOW;
}
From 27b0b49d1bbcfc499abafc6c4ee79577a2aeacc8 Mon Sep 17 00:00:00 2001
From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com>
Date: Wed, 8 Nov 2023 18:44:44 +0100
Subject: [PATCH 31/61] remove unused variable
---
src/main/fc/rc_controls.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/main/fc/rc_controls.c b/src/main/fc/rc_controls.c
index 7dec6d624a..c9208106f9 100644
--- a/src/main/fc/rc_controls.c
+++ b/src/main/fc/rc_controls.c
@@ -119,7 +119,6 @@ throttleStatus_e FAST_CODE NOINLINE calculateThrottleStatus(throttleStatusType_e
value = rcCommand[THROTTLE];
}
- //const uint16_t mid_throttle_deadband = rcControlsConfig()->mid_throttle_deadband;
bool midThrottle = value > (rcControlsConfig->deadband_low) && value < (rcControlsConfig->deadband_high);
if ((feature(FEATURE_REVERSIBLE_MOTORS) && midThrottle) || (!feature(FEATURE_REVERSIBLE_MOTORS) && (value < rxConfig()->mincheck))) {
return THROTTLE_LOW;
From b41b05715c4a7c65e4d87dfac807831d1937cd3a Mon Sep 17 00:00:00 2001
From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com>
Date: Wed, 8 Nov 2023 18:54:29 +0100
Subject: [PATCH 32/61] Use correct method to read config
---
src/main/fc/rc_controls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/fc/rc_controls.c b/src/main/fc/rc_controls.c
index c9208106f9..9cce60a2a3 100644
--- a/src/main/fc/rc_controls.c
+++ b/src/main/fc/rc_controls.c
@@ -119,7 +119,7 @@ throttleStatus_e FAST_CODE NOINLINE calculateThrottleStatus(throttleStatusType_e
value = rcCommand[THROTTLE];
}
- bool midThrottle = value > (rcControlsConfig->deadband_low) && value < (rcControlsConfig->deadband_high);
+ bool midThrottle = value > (reversibleMotorsConfig()->deadband_low) && value < (reversibleMotorsConfig()->deadband_high);
if ((feature(FEATURE_REVERSIBLE_MOTORS) && midThrottle) || (!feature(FEATURE_REVERSIBLE_MOTORS) && (value < rxConfig()->mincheck))) {
return THROTTLE_LOW;
}
From 9c01d065b3aec3a51a82b01d8952bf6467774c43 Mon Sep 17 00:00:00 2001
From: breadoven <56191411+breadoven@users.noreply.github.com>
Date: Wed, 8 Nov 2023 18:57:28 +0000
Subject: [PATCH 33/61] Update navigation_fixedwing.c
---
src/main/navigation/navigation_fixedwing.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/navigation/navigation_fixedwing.c b/src/main/navigation/navigation_fixedwing.c
index e6084e0972..86746023c7 100755
--- a/src/main/navigation/navigation_fixedwing.c
+++ b/src/main/navigation/navigation_fixedwing.c
@@ -518,8 +518,8 @@ void applyFixedWingPositionController(timeUs_t currentTimeUs)
// POSITION_TARGET_UPDATE_RATE_HZ should be chosen keeping in mind that position target shouldn't be reached until next pos update occurs
// FIXME: verify the above
calculateVirtualPositionTarget_FW(HZ2S(MIN_POSITION_UPDATE_RATE_HZ) * 2);
-
updatePositionHeadingController_FW(currentTimeUs, deltaMicrosPositionUpdate);
+ needToCalculateCircularLoiter = false;
}
else {
// Position update has not occurred in time (first iteration or glitch), reset altitude controller
From 4df28d0dbda920472287cad2dd3cf635aaa991a9 Mon Sep 17 00:00:00 2001
From: "Pawel Spychalski (DzikuVx)"
Date: Thu, 9 Nov 2023 12:52:26 +0100
Subject: [PATCH 34/61] Fix gyro orientation
---
src/main/target/ATOMRCF405NAVI_DELUX/target.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/target/ATOMRCF405NAVI_DELUX/target.h b/src/main/target/ATOMRCF405NAVI_DELUX/target.h
index 1134daa29f..f97d5d92e6 100644
--- a/src/main/target/ATOMRCF405NAVI_DELUX/target.h
+++ b/src/main/target/ATOMRCF405NAVI_DELUX/target.h
@@ -65,7 +65,7 @@
//ICM42688-P
#define USE_IMU_ICM42605
-#define IMU_ICM42605_ALIGN CW180_DEG
+#define IMU_ICM42605_ALIGN CW270_DEG
#define ICM42605_CS_PIN PA4
#define ICM42605_SPI_BUS BUS_SPI1
From a8e090d4a9551eaa76374e8c037b4a02ff0f0007 Mon Sep 17 00:00:00 2001
From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com>
Date: Thu, 9 Nov 2023 19:21:15 +0100
Subject: [PATCH 35/61] This board has an optional baro
Since the baro is not always populated, it needs more drivers.
---
src/main/target/TMOTORF7V2/target.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/target/TMOTORF7V2/target.h b/src/main/target/TMOTORF7V2/target.h
index 525330e120..2691812f2f 100644
--- a/src/main/target/TMOTORF7V2/target.h
+++ b/src/main/target/TMOTORF7V2/target.h
@@ -95,7 +95,7 @@
// BMP280 BARO --- I2C1
#define USE_I2C
#define USE_BARO
-#define USE_BARO_BMP280
+#define USE_BARO_ALL
#define BARO_I2C_BUS BUS_I2C1
#define USE_I2C_DEVICE_1
From 297bded4d8ebffa80fdf24be6ebf8b704815acb7 Mon Sep 17 00:00:00 2001
From: "Pawel Spychalski (DzikuVx)"
Date: Fri, 10 Nov 2023 10:06:02 +0100
Subject: [PATCH 36/61] Revert "Enable the virtual pitot by default"
This reverts commit 83844e996fbd229a16dc83e76e553fcf297ed5c8.
---
docs/Settings.md | 2 +-
src/main/fc/settings.yaml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/Settings.md b/docs/Settings.md
index 17384f9273..a778335669 100644
--- a/docs/Settings.md
+++ b/docs/Settings.md
@@ -5058,7 +5058,7 @@ Selection of pitot hardware.
| Default | Min | Max |
| --- | --- | --- |
-| VIRTUAL | | |
+| NONE | | |
---
diff --git a/src/main/fc/settings.yaml b/src/main/fc/settings.yaml
index 1011638959..805c94b289 100644
--- a/src/main/fc/settings.yaml
+++ b/src/main/fc/settings.yaml
@@ -588,7 +588,7 @@ groups:
members:
- name: pitot_hardware
description: "Selection of pitot hardware."
- default_value: "VIRTUAL"
+ default_value: "NONE"
table: pitot_hardware
- name: pitot_lpf_milli_hz
min: 0
From 1f3d41b33ea8add3e3e28eb8b93d8ff0baacab19 Mon Sep 17 00:00:00 2001
From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com>
Date: Fri, 10 Nov 2023 10:21:48 +0100
Subject: [PATCH 37/61] It looks like user actually had a v1 board
---
src/main/target/TMOTORF7/target.h | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/main/target/TMOTORF7/target.h b/src/main/target/TMOTORF7/target.h
index 9e935d1dc6..068894323d 100644
--- a/src/main/target/TMOTORF7/target.h
+++ b/src/main/target/TMOTORF7/target.h
@@ -52,9 +52,7 @@
#define USE_BARO
#define BARO_I2C_BUS BUS_I2C2
-#define USE_BARO_BMP280
-#define USE_BARO_MS5611
-#define USE_BARO_DPS310
+#define USE_BARO_ALL
#define USE_MAG
#define MAG_I2C_BUS BUS_I2C2
From 78ebfeb0119e1790aea1da955eeb36ddd653f55e Mon Sep 17 00:00:00 2001
From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com>
Date: Fri, 10 Nov 2023 20:01:21 +0100
Subject: [PATCH 38/61] Change timer allocation default to MOTORS
This board has an unfortunate timer allocation, where the first 4 outputs use 3 timers.
This causes the default allocation to be M1, M2, M3, S1, M4
Fixes #9474
---
src/main/target/SPEEDYBEEF7V3/config.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/main/target/SPEEDYBEEF7V3/config.c b/src/main/target/SPEEDYBEEF7V3/config.c
index b064cd99f9..903ca93f95 100644
--- a/src/main/target/SPEEDYBEEF7V3/config.c
+++ b/src/main/target/SPEEDYBEEF7V3/config.c
@@ -31,4 +31,7 @@ void targetConfiguration(void)
{
serialConfigMutable()->portConfigs[findSerialPortIndexByIdentifier(SERIAL_PORT_USART4)].functionMask = FUNCTION_ESCSERIAL;
pinioBoxConfigMutable()->permanentId[0] = BOX_PERMANENT_ID_USER1;
+ timerOverridesMutable(timer2id(TIM2))->outputMode = OUTPUT_MODE_MOTORS;
+ timerOverridesMutable(timer2id(TIM3))->outputMode = OUTPUT_MODE_MOTORS;
+ timerOverridesMutable(timer2id(TIM4))->outputMode = OUTPUT_MODE_MOTORS;
}
From c1b8b5b80b0e702da4c0540653d690d581aab28d Mon Sep 17 00:00:00 2001
From: "Pawel Spychalski (DzikuVx)"
Date: Fri, 10 Nov 2023 20:06:54 +0100
Subject: [PATCH 39/61] DAKEFPVF722 target
---
src/main/target/DAKEFPVF722/CMakeLists.txt | 1 +
src/main/target/DAKEFPVF722/config.c | 28 ++++
src/main/target/DAKEFPVF722/target.c | 36 +++++
src/main/target/DAKEFPVF722/target.h | 150 +++++++++++++++++++++
4 files changed, 215 insertions(+)
create mode 100644 src/main/target/DAKEFPVF722/CMakeLists.txt
create mode 100644 src/main/target/DAKEFPVF722/config.c
create mode 100644 src/main/target/DAKEFPVF722/target.c
create mode 100644 src/main/target/DAKEFPVF722/target.h
diff --git a/src/main/target/DAKEFPVF722/CMakeLists.txt b/src/main/target/DAKEFPVF722/CMakeLists.txt
new file mode 100644
index 0000000000..e2385c70c5
--- /dev/null
+++ b/src/main/target/DAKEFPVF722/CMakeLists.txt
@@ -0,0 +1 @@
+target_stm32f722xe(DAKEFPVF722)
diff --git a/src/main/target/DAKEFPVF722/config.c b/src/main/target/DAKEFPVF722/config.c
new file mode 100644
index 0000000000..bfb7ffbef3
--- /dev/null
+++ b/src/main/target/DAKEFPVF722/config.c
@@ -0,0 +1,28 @@
+/*
+ * This file is part of INAV.
+ *
+ * INAV 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.
+ *
+ * INAV 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 INAV. If not, see .
+ */
+
+#include
+#include
+
+#include
+
+#include "io/serial.h"
+#include "rx/rx.h"
+
+void targetConfiguration(void)
+{
+}
diff --git a/src/main/target/DAKEFPVF722/target.c b/src/main/target/DAKEFPVF722/target.c
new file mode 100644
index 0000000000..8f31bd7350
--- /dev/null
+++ b/src/main/target/DAKEFPVF722/target.c
@@ -0,0 +1,36 @@
+/*
+ * This file is part of INAV.
+ *
+ * INAV 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.
+ *
+ * INAV 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 INAV. If not, see .
+ */
+
+#include
+#include
+#include "drivers/io.h"
+#include "drivers/pwm_mapping.h"
+#include "drivers/timer.h"
+
+timerHardware_t timerHardware[] = {
+
+ DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0), // S1
+ DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // S2
+ DEF_TIM(TIM4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0, 0), // S3
+ DEF_TIM(TIM4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0, 0), // S4
+ DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S5
+ DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // S6
+
+ DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0),
+};
+
+const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/DAKEFPVF722/target.h b/src/main/target/DAKEFPVF722/target.h
new file mode 100644
index 0000000000..92cc65783b
--- /dev/null
+++ b/src/main/target/DAKEFPVF722/target.h
@@ -0,0 +1,150 @@
+/*
+ * This file is part of INAV.
+ *
+ * INAV 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.
+ *
+ * INAV 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 INAV. If not, see .
+ */
+
+#pragma once
+
+#define TARGET_BOARD_IDENTIFIER "DAK7"
+#define USBD_PRODUCT_STRING "DAKEFPV F722"
+
+#define LED0 PC14
+#define LED1 PC15
+
+#define BEEPER PC3
+#define BEEPER_INVERTED
+
+// Buses
+#define USE_SPI
+#define USE_SPI_DEVICE_1
+
+#define SPI1_SCK_PIN PA5
+#define SPI1_MISO_PIN PA6
+#define SPI1_MOSI_PIN PA7
+
+#define USE_SPI_DEVICE_2
+#define SPI2_SCK_PIN PB13
+#define SPI2_MISO_PIN PB14
+#define SPI2_MOSI_PIN PB15
+
+#define USE_SPI_DEVICE_3
+#define SPI3_SCK_PIN PC10
+#define SPI3_MISO_PIN PC11
+#define SPI3_MOSI_PIN PB5
+
+#define USE_I2C
+#define USE_I2C_DEVICE_1
+#define I2C1_SCL PB8
+#define I2C1_SDA PB9
+
+#define DEFAULT_I2C_BUS BUS_I2C1
+
+// Gyro
+#define USE_IMU_MPU6500
+#define IMU_MPU6500_ALIGN CW90_DEG
+#define MPU6500_CS_PIN PA4
+#define MPU6500_SPI_BUS BUS_SPI1
+
+//Baro
+#define USE_BARO
+#define USE_BARO_BMP280
+#define BMP280_SPI_BUS BUS_SPI2
+#define BMP280_CS_PIN PA13
+
+// M25P256 flash
+#define USE_FLASHFS
+#define USE_FLASH_M25P16
+
+#define M25P16_SPI_BUS BUS_SPI3
+#define M25P16_CS_PIN PA15
+
+#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
+
+// OSD
+#define USE_MAX7456
+#define MAX7456_SPI_BUS BUS_SPI2
+#define MAX7456_CS_PIN PB12
+
+// Serial ports
+#define USE_VCP
+
+#define USE_UART1
+#define UART1_RX_PIN PA10
+#define UART1_TX_PIN PA9
+
+#define USE_UART2
+#define UART2_RX_PIN PA3
+#define UART2_TX_PIN PA2
+
+#define USE_UART3
+#define UART3_RX_PIN PB11
+#define UART3_TX_PIN PB10
+
+#define USE_UART4
+#define UART4_RX_PIN PA1
+#define UART4_TX_PIN PA0
+
+#define USE_UART5
+#define UART5_RX_PIN PD2
+#define UART5_TX_PIN PC12
+
+#define USE_UART6
+#define UART6_RX_PIN PC7
+#define UART6_TX_PIN PC6
+
+#define SERIAL_PORT_COUNT 7
+
+#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
+#define SERIALRX_PROVIDER SERIALRX_SBUS
+#define SERIALRX_UART SERIAL_PORT_USART1
+
+// Mag
+#define USE_MAG
+#define MAG_I2C_BUS DEFAULT_I2C_BUS
+#define USE_MAG_ALL
+
+#define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
+
+#define USE_RANGEFINDER
+#define USE_RANGEFINDER_MSP
+#define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
+
+#define PITOT_I2C_BUS DEFAULT_I2C_BUS
+
+// ADC
+#define USE_ADC
+#define ADC_CHANNEL_1_PIN PC1
+#define ADC_CHANNEL_2_PIN PC2
+#define ADC_CHANNEL_3_PIN PC0
+#define VBAT_ADC_CHANNEL ADC_CHN_1
+#define RSSI_ADC_CHANNEL ADC_CHN_2
+#define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
+
+#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY )
+
+#define USE_LED_STRIP
+#define WS2811_PIN PB3
+
+#define USE_SERIAL_4WAY_BLHELI_INTERFACE
+
+#define TARGET_IO_PORTA 0xffff
+#define TARGET_IO_PORTB 0xffff
+#define TARGET_IO_PORTC 0xffff
+#define TARGET_IO_PORTD 0xffff
+
+#define USE_DSHOT
+#define USE_ESC_SENSOR
+
+#define MAX_PWM_OUTPUT_PORTS 6
From 17150f73701e14711d4410706859f9fcfcc3cb24 Mon Sep 17 00:00:00 2001
From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com>
Date: Fri, 10 Nov 2023 20:10:03 +0100
Subject: [PATCH 40/61] Add missing #include
---
src/main/target/SPEEDYBEEF7V3/config.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/main/target/SPEEDYBEEF7V3/config.c b/src/main/target/SPEEDYBEEF7V3/config.c
index 903ca93f95..9bc0a52a89 100644
--- a/src/main/target/SPEEDYBEEF7V3/config.c
+++ b/src/main/target/SPEEDYBEEF7V3/config.c
@@ -26,6 +26,7 @@
#include "fc/fc_msp_box.h"
#include "io/serial.h"
+#include "drivers/pwm_mapping.h"
void targetConfiguration(void)
{
From c8e383a4d9680ebd0a360bc5f7cf66b02beea318 Mon Sep 17 00:00:00 2001
From: "Pawel Spychalski (DzikuVx)"
Date: Fri, 10 Nov 2023 20:46:08 +0100
Subject: [PATCH 41/61] DAKEFPVF405 target
---
src/main/target/DAKEFPVF405/CMakeLists.txt | 1 +
src/main/target/DAKEFPVF405/config.c | 31 ++++
src/main/target/DAKEFPVF405/target.c | 36 +++++
src/main/target/DAKEFPVF405/target.h | 168 +++++++++++++++++++++
4 files changed, 236 insertions(+)
create mode 100644 src/main/target/DAKEFPVF405/CMakeLists.txt
create mode 100644 src/main/target/DAKEFPVF405/config.c
create mode 100644 src/main/target/DAKEFPVF405/target.c
create mode 100644 src/main/target/DAKEFPVF405/target.h
diff --git a/src/main/target/DAKEFPVF405/CMakeLists.txt b/src/main/target/DAKEFPVF405/CMakeLists.txt
new file mode 100644
index 0000000000..9a147fdb70
--- /dev/null
+++ b/src/main/target/DAKEFPVF405/CMakeLists.txt
@@ -0,0 +1 @@
+target_stm32f405xg(DAKEFPVF405)
diff --git a/src/main/target/DAKEFPVF405/config.c b/src/main/target/DAKEFPVF405/config.c
new file mode 100644
index 0000000000..73f636cf8c
--- /dev/null
+++ b/src/main/target/DAKEFPVF405/config.c
@@ -0,0 +1,31 @@
+/*
+ * This file is part of INAV.
+ *
+ * INAV 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.
+ *
+ * INAV 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 INAV. If not, see .
+ */
+
+#include
+#include
+
+#include
+
+#include "io/serial.h"
+#include "rx/rx.h"
+#include "fc/fc_msp_box.h"
+#include "io/piniobox.h"
+
+void targetConfiguration(void)
+{
+ pinioBoxConfigMutable()->permanentId[0] = BOX_PERMANENT_ID_USER1;
+}
diff --git a/src/main/target/DAKEFPVF405/target.c b/src/main/target/DAKEFPVF405/target.c
new file mode 100644
index 0000000000..8f31bd7350
--- /dev/null
+++ b/src/main/target/DAKEFPVF405/target.c
@@ -0,0 +1,36 @@
+/*
+ * This file is part of INAV.
+ *
+ * INAV 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.
+ *
+ * INAV 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 INAV. If not, see .
+ */
+
+#include
+#include
+#include "drivers/io.h"
+#include "drivers/pwm_mapping.h"
+#include "drivers/timer.h"
+
+timerHardware_t timerHardware[] = {
+
+ DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0), // S1
+ DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // S2
+ DEF_TIM(TIM4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0, 0), // S3
+ DEF_TIM(TIM4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0, 0), // S4
+ DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S5
+ DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // S6
+
+ DEF_TIM(TIM2, CH2, PB3, TIM_USE_LED, 0, 0),
+};
+
+const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/DAKEFPVF405/target.h b/src/main/target/DAKEFPVF405/target.h
new file mode 100644
index 0000000000..41c128668e
--- /dev/null
+++ b/src/main/target/DAKEFPVF405/target.h
@@ -0,0 +1,168 @@
+/*
+ * This file is part of INAV.
+ *
+ * INAV 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.
+ *
+ * INAV 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 INAV. If not, see .
+ */
+
+#pragma once
+
+#define TARGET_BOARD_IDENTIFIER "DAK4"
+#define USBD_PRODUCT_STRING "DAKEFPV F405"
+
+#define LED0 PC14
+#define LED1 PC15
+
+#define BEEPER PC3
+#define BEEPER_INVERTED
+
+// Buses
+#define USE_SPI
+#define USE_SPI_DEVICE_1
+
+#define SPI1_SCK_PIN PA5
+#define SPI1_MISO_PIN PA6
+#define SPI1_MOSI_PIN PA7
+
+#define USE_SPI_DEVICE_2
+#define SPI2_SCK_PIN PB13
+#define SPI2_MISO_PIN PB14
+#define SPI2_MOSI_PIN PB15
+
+#define USE_SPI_DEVICE_3
+#define SPI3_SCK_PIN PC10
+#define SPI3_MISO_PIN PC11
+#define SPI3_MOSI_PIN PB5
+
+#define USE_I2C
+#define USE_I2C_DEVICE_1
+#define I2C1_SCL PB8
+#define I2C1_SDA PB9
+
+#define DEFAULT_I2C_BUS BUS_I2C1
+
+// Gyro
+#define USE_IMU_MPU6500
+#define IMU_MPU6500_ALIGN CW90_DEG
+#define MPU6500_CS_PIN PA4
+#define MPU6500_SPI_BUS BUS_SPI1
+
+#define USE_IMU_MPU6000
+#define IMU_MPU6000_ALIGN CW90_DEG
+#define MPU6000_CS_PIN PA4
+#define MPU6000_SPI_BUS BUS_SPI1
+
+#define USE_IMU_ICM42605
+#define IMU_ICM42605_ALIGN CW90_DEG
+#define ICM42605_SPI_BUS BUS_SPI1
+#define ICM42605_CS_PIN PA4
+
+//Baro
+#define USE_BARO
+#define USE_BARO_BMP280
+#define BMP280_SPI_BUS BUS_SPI2
+#define BMP280_CS_PIN PC13
+#define USE_BARO_DPS310
+#define DPS310_SPI_BUS BUS_SPI2
+#define DPS310_CS_PIN PC13
+
+// M25P256 flash
+#define USE_FLASHFS
+#define USE_FLASH_M25P16
+
+#define M25P16_SPI_BUS BUS_SPI3
+#define M25P16_CS_PIN PA15
+
+#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
+
+// OSD
+#define USE_MAX7456
+#define MAX7456_SPI_BUS BUS_SPI2
+#define MAX7456_CS_PIN PB12
+
+// Serial ports
+#define USE_VCP
+
+#define USE_UART1
+#define UART1_RX_PIN PA10
+#define UART1_TX_PIN PA9
+
+#define USE_UART2
+#define UART2_RX_PIN PA3
+#define UART2_TX_PIN PA2
+
+#define USE_UART3
+#define UART3_RX_PIN PB11
+#define UART3_TX_PIN PB10
+
+#define USE_UART4
+#define UART4_RX_PIN PA1
+#define UART4_TX_PIN PA0
+
+#define USE_UART5
+#define UART5_RX_PIN PD2
+#define UART5_TX_PIN PC12
+
+#define USE_UART6
+#define UART6_RX_PIN PC7
+#define UART6_TX_PIN PC6
+
+#define SERIAL_PORT_COUNT 7
+
+#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
+#define SERIALRX_PROVIDER SERIALRX_SBUS
+#define SERIALRX_UART SERIAL_PORT_USART1
+
+// Mag
+#define USE_MAG
+#define MAG_I2C_BUS DEFAULT_I2C_BUS
+#define USE_MAG_ALL
+
+#define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
+
+#define USE_RANGEFINDER
+#define USE_RANGEFINDER_MSP
+#define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
+
+#define PITOT_I2C_BUS DEFAULT_I2C_BUS
+
+// ADC
+#define USE_ADC
+#define ADC_CHANNEL_1_PIN PC1
+#define ADC_CHANNEL_2_PIN PC2
+#define ADC_CHANNEL_3_PIN PC0
+#define VBAT_ADC_CHANNEL ADC_CHN_1
+#define RSSI_ADC_CHANNEL ADC_CHN_2
+#define CURRENT_METER_ADC_CHANNEL ADC_CHN_3
+
+#define DEFAULT_FEATURES (FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY )
+
+#define USE_LED_STRIP
+#define WS2811_PIN PB3
+
+#define USE_SERIAL_4WAY_BLHELI_INTERFACE
+
+#define TARGET_IO_PORTA 0xffff
+#define TARGET_IO_PORTB 0xffff
+#define TARGET_IO_PORTC 0xffff
+#define TARGET_IO_PORTD 0xffff
+
+#define USE_DSHOT
+#define USE_ESC_SENSOR
+
+#define MAX_PWM_OUTPUT_PORTS 6
+
+#define USE_PINIO
+#define USE_PINIOBOX
+#define PINIO1_PIN PC5
+#define PINIO1_FLAGS PINIO_FLAGS_INVERTED
\ No newline at end of file
From 36fdb7e2a01d05dcbd59f8c6f2a189032a1596d6 Mon Sep 17 00:00:00 2001
From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com>
Date: Sat, 11 Nov 2023 12:06:09 +0100
Subject: [PATCH 42/61] Correct output order to match BF output order
https://github.com/betaflight/unified-targets/blob/master/configs/default/FLWO-FLYWOOF745.config
Reported by @sarcasticfpv on discord
---
src/main/target/FLYWOOF745/target.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/target/FLYWOOF745/target.c b/src/main/target/FLYWOOF745/target.c
index 7c79d1f6a5..5ad1d7dd03 100644
--- a/src/main/target/FLYWOOF745/target.c
+++ b/src/main/target/FLYWOOF745/target.c
@@ -32,11 +32,11 @@
timerHardware_t timerHardware[] = {
// DEF_TIM(TIM1, CH3, PE13, TIM_USE_PPM, 0, 1), // PPM, DMA2_ST6
- DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // M1 , DMA1_ST7
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // M2 , DMA1_ST2
- DEF_TIM(TIM1, CH1, PE9, TIM_USE_OUTPUT_AUTO, 0, 2), // M3 , DMA2_ST2
- DEF_TIM(TIM1, CH2, PE11, TIM_USE_OUTPUT_AUTO, 0, 1), // M4 , DMA2_ST4
DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // M5 , DMA2_ST7
+ DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // M1 , DMA1_ST7
+ DEF_TIM(TIM1, CH2, PE11, TIM_USE_OUTPUT_AUTO, 0, 1), // M4 , DMA2_ST4
+ DEF_TIM(TIM1, CH1, PE9, TIM_USE_OUTPUT_AUTO, 0, 2), // M3 , DMA2_ST2
DEF_TIM(TIM5, CH4, PA3, TIM_USE_OUTPUT_AUTO, 0, 0), // M6 , DMA1_ST1
DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0), // M7 , DMA1_ST4
DEF_TIM(TIM3, CH2, PB5, TIM_USE_OUTPUT_AUTO, 0, 0), // M8 , DMA1_ST5
From 434ab87c43aa88a6ca31bb0e6bc9d97d4a4bc4d6 Mon Sep 17 00:00:00 2001
From: Sensei
Date: Sat, 11 Nov 2023 05:15:40 -0600
Subject: [PATCH 43/61] Flywoof745 of der commented motor numbers
Updates the // M1, // m2 etc to match the new order.
---
src/main/target/FLYWOOF745/target.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/main/target/FLYWOOF745/target.c b/src/main/target/FLYWOOF745/target.c
index 5ad1d7dd03..dcdfc8654f 100644
--- a/src/main/target/FLYWOOF745/target.c
+++ b/src/main/target/FLYWOOF745/target.c
@@ -32,11 +32,11 @@
timerHardware_t timerHardware[] = {
// DEF_TIM(TIM1, CH3, PE13, TIM_USE_PPM, 0, 1), // PPM, DMA2_ST6
- DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // M2 , DMA1_ST2
- DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // M5 , DMA2_ST7
- DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // M1 , DMA1_ST7
+ DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // M1 , DMA1_ST2
+ DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // M2 , DMA2_ST7
+ DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // M3 , DMA1_ST7
DEF_TIM(TIM1, CH2, PE11, TIM_USE_OUTPUT_AUTO, 0, 1), // M4 , DMA2_ST4
- DEF_TIM(TIM1, CH1, PE9, TIM_USE_OUTPUT_AUTO, 0, 2), // M3 , DMA2_ST2
+ DEF_TIM(TIM1, CH1, PE9, TIM_USE_OUTPUT_AUTO, 0, 2), // M5 , DMA2_ST2
DEF_TIM(TIM5, CH4, PA3, TIM_USE_OUTPUT_AUTO, 0, 0), // M6 , DMA1_ST1
DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0), // M7 , DMA1_ST4
DEF_TIM(TIM3, CH2, PB5, TIM_USE_OUTPUT_AUTO, 0, 0), // M8 , DMA1_ST5
From a7e29116881e37fc2ee3338bacb2dbddb9df5b4c Mon Sep 17 00:00:00 2001
From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com>
Date: Sat, 11 Nov 2023 12:17:23 +0100
Subject: [PATCH 44/61] Fix motor labels on target.c and make sure M1-M4 land
on S1-S4 by default
---
src/main/target/FLYWOOF745/config.c | 9 +++++++++
src/main/target/FLYWOOF745/target.c | 10 +++++-----
2 files changed, 14 insertions(+), 5 deletions(-)
diff --git a/src/main/target/FLYWOOF745/config.c b/src/main/target/FLYWOOF745/config.c
index 07f6de4697..7dfe40728d 100644
--- a/src/main/target/FLYWOOF745/config.c
+++ b/src/main/target/FLYWOOF745/config.c
@@ -22,7 +22,16 @@
#include "io/piniobox.h"
+#include "drivers/pwm_output.h"
+#include "drivers/pwm_mapping.h"
+
void targetConfiguration(void)
{
pinioBoxConfigMutable()->permanentId[0] = BOX_PERMANENT_ID_USER1;
+
+ // Make sure S1-S4 default to Motors
+
+ timerOverridesMutable(timer2id(TIM3))->outputMode = OUTPUT_MODE_MOTORS;
+ timerOverridesMutable(timer2id(TIM8))->outputMode = OUTPUT_MODE_MOTORS;
+ timerOverridesMutable(timer2id(TIM1))->outputMode = OUTPUT_MODE_MOTORS;
}
diff --git a/src/main/target/FLYWOOF745/target.c b/src/main/target/FLYWOOF745/target.c
index 5ad1d7dd03..a82a708f51 100644
--- a/src/main/target/FLYWOOF745/target.c
+++ b/src/main/target/FLYWOOF745/target.c
@@ -32,15 +32,15 @@
timerHardware_t timerHardware[] = {
// DEF_TIM(TIM1, CH3, PE13, TIM_USE_PPM, 0, 1), // PPM, DMA2_ST6
- DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // M2 , DMA1_ST2
- DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // M5 , DMA2_ST7
- DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // M1 , DMA1_ST7
+ DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // M1 , DMA1_ST2
+ DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // M2 , DMA2_ST7
+ DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // M3 , DMA1_ST7
DEF_TIM(TIM1, CH2, PE11, TIM_USE_OUTPUT_AUTO, 0, 1), // M4 , DMA2_ST4
- DEF_TIM(TIM1, CH1, PE9, TIM_USE_OUTPUT_AUTO, 0, 2), // M3 , DMA2_ST2
+ DEF_TIM(TIM1, CH1, PE9, TIM_USE_OUTPUT_AUTO, 0, 2), // M5 , DMA2_ST2
DEF_TIM(TIM5, CH4, PA3, TIM_USE_OUTPUT_AUTO, 0, 0), // M6 , DMA1_ST1
DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0), // M7 , DMA1_ST4
DEF_TIM(TIM3, CH2, PB5, TIM_USE_OUTPUT_AUTO, 0, 0), // M8 , DMA1_ST5
- DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 0), // LED_STRIP, DMA1_ST0
+ DEF_TIM(TIM4, CH1, PD12, TIM_USE_LED, 0, 0), // LED_STRIP, DMA1_ST0
};
const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
From 10226d298fa7f172dc76ae39f51f2577923b225b Mon Sep 17 00:00:00 2001
From: "Pawel Spychalski (DzikuVx)"
Date: Sun, 12 Nov 2023 12:11:50 +0100
Subject: [PATCH 45/61] Update output assignment
---
src/main/target/ATOMRCF405NAVI_DELUX/target.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/target/ATOMRCF405NAVI_DELUX/target.c b/src/main/target/ATOMRCF405NAVI_DELUX/target.c
index e3ff9d8f77..54d715d8cb 100644
--- a/src/main/target/ATOMRCF405NAVI_DELUX/target.c
+++ b/src/main/target/ATOMRCF405NAVI_DELUX/target.c
@@ -46,9 +46,9 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0), // S8
DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // S9
- DEF_TIM(TIM8, CH2N, PB14, TIM_USE_SERVO, 0, 0), // S10
+ DEF_TIM(TIM8, CH2N, PB14, TIM_USE_OUTPUT_AUTO, 0, 0), // S10
- DEF_TIM(TIM1, CH3N, PB15, TIM_USE_SERVO, 0, 0), // S11
+ DEF_TIM(TIM1, CH3N, PB15, TIM_USE_OUTPUT_AUTO, 0, 0), // S11
DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // LED_STRIP
};
From 92327688937535591479c45c52d48c5ce429598e Mon Sep 17 00:00:00 2001
From: "Pawel Spychalski (DzikuVx)"
Date: Wed, 15 Nov 2023 09:26:57 +0100
Subject: [PATCH 46/61] Update current scale
---
src/main/target/ATOMRCF405NAVI_DELUX/target.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/target/ATOMRCF405NAVI_DELUX/target.h b/src/main/target/ATOMRCF405NAVI_DELUX/target.h
index f97d5d92e6..f04a5d5da6 100644
--- a/src/main/target/ATOMRCF405NAVI_DELUX/target.h
+++ b/src/main/target/ATOMRCF405NAVI_DELUX/target.h
@@ -131,7 +131,7 @@
#define RSSI_ADC_CHANNEL ADC_CHN_3
#define AIRSPEED_ADC_CHANNEL ADC_CHN_4
-#define CURRENT_METER_SCALE 320
+#define CURRENT_METER_SCALE 128
/*
* OSD
From a2a05629a0f0bd250b7601d98ff48e8b43b1913a Mon Sep 17 00:00:00 2001
From: error414
Date: Mon, 13 Nov 2023 19:30:50 +0100
Subject: [PATCH 47/61] fix hdzero channel settings over displayport
---
src/main/fc/fc_msp.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/src/main/fc/fc_msp.c b/src/main/fc/fc_msp.c
index fddcde00eb..79e7418ced 100644
--- a/src/main/fc/fc_msp.c
+++ b/src/main/fc/fc_msp.c
@@ -2581,6 +2581,29 @@ static mspResult_e mspFcProcessInCommand(uint16_t cmdMSP, sbuf_t *src)
if (sbufBytesRemaining(src) > 0) {
vtxSettingsConfigMutable()->lowPowerDisarm = sbufReadU8(src);
}
+
+ // //////////////////////////////////////////////////////////
+ // this code is taken from BF, it's hack for HDZERO VTX MSP frame
+ // API version 1.42 - this parameter kept separate since clients may already be supplying
+ if (sbufBytesRemaining(src) >= 2) {
+ sbufReadU16(src); //skip pitModeFreq
+ }
+
+ // API version 1.42 - extensions for non-encoded versions of the band, channel or frequency
+ if (sbufBytesRemaining(src) >= 4) {
+ uint8_t newBand = sbufReadU8(src);
+ const uint8_t newChannel = sbufReadU8(src);
+ vtxSettingsConfigMutable()->band = newBand;
+ vtxSettingsConfigMutable()->channel = newChannel;
+ }
+
+ /* if (sbufBytesRemaining(src) >= 4) {
+ sbufRead8(src); // freq_l
+ sbufRead8(src); // freq_h
+ sbufRead8(src); // band count
+ sbufRead8(src); // channel count
+ }*/
+ // //////////////////////////////////////////////////////////
}
}
}
From dce738842536ec2680e4a43da467c002e6213544 Mon Sep 17 00:00:00 2001
From: Ray Morris
Date: Wed, 15 Nov 2023 15:21:51 -0600
Subject: [PATCH 48/61] FLYWOOF405S_AIO: rename CMakeLists
---
src/main/target/FLYWOOF405S_AIO/{CMakeLists => CMakeLists.txt} | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename src/main/target/FLYWOOF405S_AIO/{CMakeLists => CMakeLists.txt} (100%)
diff --git a/src/main/target/FLYWOOF405S_AIO/CMakeLists b/src/main/target/FLYWOOF405S_AIO/CMakeLists.txt
similarity index 100%
rename from src/main/target/FLYWOOF405S_AIO/CMakeLists
rename to src/main/target/FLYWOOF405S_AIO/CMakeLists.txt
From 5b832e9c10f18fc4cc6cdbfe5bbea0610ab80548 Mon Sep 17 00:00:00 2001
From: "Pawel Spychalski (DzikuVx)"
Date: Sun, 5 Nov 2023 14:09:45 +0100
Subject: [PATCH 49/61] IFLIGHT_BLITZ_ATF435 initial commit
---
.../IFLIGHT_BLITZ_ATF435/CMakeLists.txt | 1 +
src/main/target/IFLIGHT_BLITZ_ATF435/target.c | 45 +++++
src/main/target/IFLIGHT_BLITZ_ATF435/target.h | 157 ++++++++++++++++++
3 files changed, 203 insertions(+)
create mode 100644 src/main/target/IFLIGHT_BLITZ_ATF435/CMakeLists.txt
create mode 100644 src/main/target/IFLIGHT_BLITZ_ATF435/target.c
create mode 100644 src/main/target/IFLIGHT_BLITZ_ATF435/target.h
diff --git a/src/main/target/IFLIGHT_BLITZ_ATF435/CMakeLists.txt b/src/main/target/IFLIGHT_BLITZ_ATF435/CMakeLists.txt
new file mode 100644
index 0000000000..c0136c9630
--- /dev/null
+++ b/src/main/target/IFLIGHT_BLITZ_ATF435/CMakeLists.txt
@@ -0,0 +1 @@
+target_at32f43x_xGT7(IFLIGHT_BLITZ_ATF435)
\ No newline at end of file
diff --git a/src/main/target/IFLIGHT_BLITZ_ATF435/target.c b/src/main/target/IFLIGHT_BLITZ_ATF435/target.c
new file mode 100644
index 0000000000..2639b71874
--- /dev/null
+++ b/src/main/target/IFLIGHT_BLITZ_ATF435/target.c
@@ -0,0 +1,45 @@
+/*
+ * This file is part of INAV Project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * Alternatively, the contents of this file may be used under the terms
+ * of the GNU General Public License Version 3, as described below:
+ *
+ * This file is free software: you may copy, redistribute 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.
+ *
+ * This file 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 this program. If not, see http://www.gnu.org/licenses/.
+ */
+
+#include
+
+#include "platform.h"
+
+#include "drivers/bus.h"
+#include "drivers/io.h"
+#include "drivers/pwm_mapping.h"
+#include "drivers/timer.h"
+
+timerHardware_t timerHardware[] = {
+
+ DEF_TIM(TMR3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0,8), // S1
+ DEF_TIM(TMR3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0,9), // S2
+ DEF_TIM(TMR8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0,2), // S3
+ DEF_TIM(TMR8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0,0), // S4
+
+ DEF_TIM(TMR1, CH1, PA8, TIM_USE_LED, 0, 0), // LED STRIP
+};
+
+const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
+
diff --git a/src/main/target/IFLIGHT_BLITZ_ATF435/target.h b/src/main/target/IFLIGHT_BLITZ_ATF435/target.h
new file mode 100644
index 0000000000..7518bbe13e
--- /dev/null
+++ b/src/main/target/IFLIGHT_BLITZ_ATF435/target.h
@@ -0,0 +1,157 @@
+/*
+ * This file is part of INAV Project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * Alternatively, the contents of this file may be used under the terms
+ * of the GNU General Public License Version 3, as described below:
+ *
+ * This file is free software: you may copy, redistribute 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.
+ *
+ * This file 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 this program. If not, see http://www.gnu.org/licenses/.
+ */
+
+#pragma once
+
+#define TARGET_BOARD_IDENTIFIER "IAT4"
+
+#define USBD_PRODUCT_STRING "iFlight BLITZ ATF435"
+
+#define LED0 PC15
+
+#define BEEPER PB2
+#define BEEPER_INVERTED
+
+
+// Buses
+
+#define USE_SPI
+
+#define USE_SPI_DEVICE_1
+#define SPI1_SCK_PIN PA5
+#define SPI1_MISO_PIN PA6
+#define SPI1_MOSI_PIN PA7
+
+#define USE_SPI_DEVICE_2
+#define SPI2_SCK_PIN PB13
+#define SPI2_MISO_PIN PB14
+#define SPI2_MOSI_PIN PB15
+
+#define USE_SPI_DEVICE_3
+#define SPI3_SCK_PIN PB3
+#define SPI3_MISO_PIN PB4
+#define SPI3_MOSI_PIN PB5
+
+#define USE_I2C
+#define USE_I2C_DEVICE_1
+#define I2C1_SCL PB8
+#define I2C1_SDA PB9
+// #define USE_I2C_PULLUP
+
+#define DEFAULT_I2C_BUS BUS_I2C1
+
+// Gyro
+
+// BMI270
+#define USE_IMU_BMI270
+#define IMU_BMI270_ALIGN CW0_DEG
+#define BMI270_SPI_BUS BUS_SPI1
+#define BMI270_CS_PIN PA4
+
+// Other sensors
+
+#define USE_BARO
+#define BARO_I2C_BUS DEFAULT_I2C_BUS
+#define USE_BARO_ALL
+
+#define USE_MAG
+#define MAG_I2C_BUS DEFAULT_I2C_BUS
+#define USE_MAG_ALL
+
+// OSD
+#define USE_MAX7456
+#define MAX7456_SPI_BUS BUS_SPI2
+#define MAX7456_CS_PIN PB12
+
+// Flash
+
+#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
+#define USE_FLASHFS
+#define USE_FLASH_M25P16
+#define M25P16_SPI_BUS BUS_SPI3
+#define M25P16_CS_PIN PA15
+
+#define USE_FLASH_W25N01G
+#define W25N01G_SPI_BUS BUS_SPI3
+#define W25N01G_CS_PIN PA15
+
+// UARTs
+#define USE_VCP
+// #define USB_DETECT_PIN PC5
+// #define USE_USB_DETECT
+
+#define USE_UART1
+#define UART1_RX_PIN PA10
+#define UART1_TX_PIN PA9
+
+#define USE_UART2
+#define UART2_RX_PIN PA3
+#define UART2_TX_PIN PA2
+
+#define USE_UART3
+#define UART3_RX_PIN PC11
+#define UART3_TX_PIN PC10
+
+#define USE_UART4
+#define UART4_RX_PIN PA1
+#define UART4_TX_PIN PA0
+
+#define USE_UART5
+#define UART5_RX_PIN PD2
+#define UART5_TX_PIN PC12
+
+#define USE_UART6
+#define UART6_RX_PIN PC7
+#define UART6_TX_PIN PC6
+
+#define SERIAL_PORT_COUNT 7
+
+// *************** ADC *****************************
+#define USE_ADC
+#define ADC_INSTANCE ADC1
+
+#define ADC1_DMA_STREAM DMA2_CHANNEL5
+
+#define ADC_CHANNEL_1_PIN PC2
+#define ADC_CHANNEL_2_PIN PC1
+
+#define VBAT_ADC_CHANNEL ADC_CHN_1
+#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
+
+#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY| FEATURE_VBAT | FEATURE_OSD )
+
+#define USE_LED_STRIP
+#define WS2811_PIN PA8
+
+#define USE_SERIAL_4WAY_BLHELI_INTERFACE
+
+#define TARGET_IO_PORTA 0xffff
+#define TARGET_IO_PORTB 0xffff
+#define TARGET_IO_PORTC 0xffff
+#define TARGET_IO_PORTD 0xffff
+#define TARGET_IO_PORTE BIT(2)
+
+#define MAX_PWM_OUTPUT_PORTS 4
+#define USE_DSHOT
+#define USE_ESC_SENSOR
From db7350e13f1fbb442eb9c58c5dc0fd60546b8e5d Mon Sep 17 00:00:00 2001
From: "Pawel Spychalski (DzikuVx)"
Date: Tue, 14 Nov 2023 18:45:52 +0100
Subject: [PATCH 50/61] Outputs update
---
src/main/target/IFLIGHT_BLITZ_ATF435/target.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/main/target/IFLIGHT_BLITZ_ATF435/target.c b/src/main/target/IFLIGHT_BLITZ_ATF435/target.c
index 2639b71874..2de0fd5057 100644
--- a/src/main/target/IFLIGHT_BLITZ_ATF435/target.c
+++ b/src/main/target/IFLIGHT_BLITZ_ATF435/target.c
@@ -38,6 +38,11 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TMR8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0,2), // S3
DEF_TIM(TMR8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0,0), // S4
+ DEF_TIM(TMR4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0,11), // S5
+ DEF_TIM(TMR4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0,10), // S6
+ DEF_TIM(TMR2, CH3, PB10, TIM_USE_OUTPUT_AUTO, 0,5), //S7
+ DEF_TIM(TMR2, CH4, PB11, TIM_USE_OUTPUT_AUTO, 0,6), //S8
+
DEF_TIM(TMR1, CH1, PA8, TIM_USE_LED, 0, 0), // LED STRIP
};
From 84d0e46c5583d71e9edd302bdc0abfc1645d21f5 Mon Sep 17 00:00:00 2001
From: YI-BOYANG <46438966+YI-BOYANG@users.noreply.github.com>
Date: Thu, 23 Nov 2023 17:40:29 +0800
Subject: [PATCH 51/61] Add IIC2 and change the barometer to IIC2
---
src/main/target/GEPRCF405/target.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/main/target/GEPRCF405/target.h b/src/main/target/GEPRCF405/target.h
index 7f641643e8..0b96d5b8b1 100644
--- a/src/main/target/GEPRCF405/target.h
+++ b/src/main/target/GEPRCF405/target.h
@@ -61,9 +61,12 @@
#define USE_I2C_DEVICE_1
#define I2C1_SCL PB8
#define I2C1_SDA PB9
+#define USE_I2C_DEVICE_2
+#define I2C2_SCL PB10
+#define I2C2_SDA PB11
#define USE_BARO
-#define BARO_I2C_BUS BUS_I2C1
+#define BARO_I2C_BUS BUS_I2C2
#define USE_BARO_BMP280
#define USE_BARO_DPS310
#define USE_BARO_MS5611
From 5c12057e6c79f6501599b101e120cf6986f7d410 Mon Sep 17 00:00:00 2001
From: Darren Lines
Date: Wed, 29 Nov 2023 12:30:41 +0000
Subject: [PATCH 52/61] Additional Description for Control Derivative
---
docs/Settings.md | 8 ++++----
src/main/fc/settings.yaml | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/docs/Settings.md b/docs/Settings.md
index 3c431bd4a5..39e4eaac2b 100644
--- a/docs/Settings.md
+++ b/docs/Settings.md
@@ -2444,7 +2444,7 @@ This is the maximum value (in us) sent to esc when armed. Default of 1850 are OK
### mc_cd_lpf_hz
-Cutoff frequency for Control Derivative. Lower value smoother reaction on fast stick movements. With higher values, response will be more aggressive, jerky
+Cutoff frequency for Control Derivative. This controls the cutoff for the LPF that is applied to the CD (Feed Forward) signal to the PID controller. Lower value will produce a smoother CD gain to the controller, but it will be more delayed. Higher values will produce CD gain that may have more noise in the signal depending on your RC link but wil be less delayed.
| Default | Min | Max |
| --- | --- | --- |
@@ -2454,7 +2454,7 @@ Cutoff frequency for Control Derivative. Lower value smoother reaction on fast s
### mc_cd_pitch
-Multicopter Control Derivative gain for PITCH
+Multicopter Control Derivative gain for PITCH. The CD intoduces a term to the PID controller that is the magnitude of the Setpoint change. Fast inputs produce a high CD gain to help push the MC into a move; in advance of the P-gain if set high enough.
| Default | Min | Max |
| --- | --- | --- |
@@ -2464,7 +2464,7 @@ Multicopter Control Derivative gain for PITCH
### mc_cd_roll
-Multicopter Control Derivative gain for ROLL
+Multicopter Control Derivative gain for ROLL. The CD intoduces a term to the PID controller that is the magnitude of the Setpoint change. Fast inputs produce a high CD gain to help push the MC into a move; in advance of the P-gain if set high enough.
| Default | Min | Max |
| --- | --- | --- |
@@ -2474,7 +2474,7 @@ Multicopter Control Derivative gain for ROLL
### mc_cd_yaw
-Multicopter Control Derivative gain for YAW
+Multicopter Control Derivative gain for YAW. The CD intoduces a term to the PID controller that is the magnitude of the Setpoint change. Fast inputs produce a high CD gain to help push the MC into a move; in advance of the P-gain if set high enough.
| Default | Min | Max |
| --- | --- | --- |
diff --git a/src/main/fc/settings.yaml b/src/main/fc/settings.yaml
index 0c517ab8c5..44f1f6c24b 100644
--- a/src/main/fc/settings.yaml
+++ b/src/main/fc/settings.yaml
@@ -1730,7 +1730,7 @@ groups:
min: RPYL_PID_MIN
max: RPYL_PID_MAX
- name: mc_cd_pitch
- description: "Multicopter Control Derivative gain for PITCH"
+ description: "Multicopter Control Derivative gain for PITCH. The CD intoduces a term to the PID controller that is the magnitude of the Setpoint change. Fast inputs produce a high CD gain to help push the MC into a move; in advance of the P-gain if set high enough."
default_value: 60
field: bank_mc.pid[PID_PITCH].FF
min: RPYL_PID_MIN
@@ -1754,7 +1754,7 @@ groups:
min: RPYL_PID_MIN
max: RPYL_PID_MAX
- name: mc_cd_roll
- description: "Multicopter Control Derivative gain for ROLL"
+ description: "Multicopter Control Derivative gain for ROLL. The CD intoduces a term to the PID controller that is the magnitude of the Setpoint change. Fast inputs produce a high CD gain to help push the MC into a move; in advance of the P-gain if set high enough."
default_value: 60
field: bank_mc.pid[PID_ROLL].FF
min: RPYL_PID_MIN
@@ -1778,7 +1778,7 @@ groups:
min: RPYL_PID_MIN
max: RPYL_PID_MAX
- name: mc_cd_yaw
- description: "Multicopter Control Derivative gain for YAW"
+ description: "Multicopter Control Derivative gain for YAW. The CD intoduces a term to the PID controller that is the magnitude of the Setpoint change. Fast inputs produce a high CD gain to help push the MC into a move; in advance of the P-gain if set high enough."
default_value: 60
field: bank_mc.pid[PID_YAW].FF
min: RPYL_PID_MIN
@@ -2195,7 +2195,7 @@ groups:
table: pidTypeTable
default_value: AUTO
- name: mc_cd_lpf_hz
- description: "Cutoff frequency for Control Derivative. Lower value smoother reaction on fast stick movements. With higher values, response will be more aggressive, jerky"
+ description: "Cutoff frequency for Control Derivative. This controls the cutoff for the LPF that is applied to the CD (Feed Forward) signal to the PID controller. Lower value will produce a smoother CD gain to the controller, but it will be more delayed. Higher values will produce CD gain that may have more noise in the signal depending on your RC link but wil be less delayed."
default_value: 30
field: controlDerivativeLpfHz
min: 0
From 3d2078e1343fe284ec3a44390b75cc659bb49963 Mon Sep 17 00:00:00 2001
From: Darren Lines
Date: Thu, 30 Nov 2023 08:29:28 +0000
Subject: [PATCH 53/61] added hint for BetaFlight users
---
docs/Settings.md | 6 +++---
src/main/fc/settings.yaml | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/docs/Settings.md b/docs/Settings.md
index 39e4eaac2b..02b66c2cd9 100644
--- a/docs/Settings.md
+++ b/docs/Settings.md
@@ -2454,7 +2454,7 @@ Cutoff frequency for Control Derivative. This controls the cutoff for the LPF th
### mc_cd_pitch
-Multicopter Control Derivative gain for PITCH. The CD intoduces a term to the PID controller that is the magnitude of the Setpoint change. Fast inputs produce a high CD gain to help push the MC into a move; in advance of the P-gain if set high enough.
+Multicopter Control Derivative gain for PITCH (known as 'Feed Forward' in Betaflight). The CD intoduces a term to the PID controller that is the magnitude of the Setpoint change. Fast inputs produce a high CD gain to help push the MC into a move; in advance of the P-gain if set high enough.
| Default | Min | Max |
| --- | --- | --- |
@@ -2464,7 +2464,7 @@ Multicopter Control Derivative gain for PITCH. The CD intoduces a term to the PI
### mc_cd_roll
-Multicopter Control Derivative gain for ROLL. The CD intoduces a term to the PID controller that is the magnitude of the Setpoint change. Fast inputs produce a high CD gain to help push the MC into a move; in advance of the P-gain if set high enough.
+Multicopter Control Derivative gain for ROLL (known as 'Feed Forward' in Betaflight). The CD intoduces a term to the PID controller that is the magnitude of the Setpoint change. Fast inputs produce a high CD gain to help push the MC into a move; in advance of the P-gain if set high enough.
| Default | Min | Max |
| --- | --- | --- |
@@ -2474,7 +2474,7 @@ Multicopter Control Derivative gain for ROLL. The CD intoduces a term to the PID
### mc_cd_yaw
-Multicopter Control Derivative gain for YAW. The CD intoduces a term to the PID controller that is the magnitude of the Setpoint change. Fast inputs produce a high CD gain to help push the MC into a move; in advance of the P-gain if set high enough.
+Multicopter Control Derivative gain for YAW (known as 'Feed Forward' in Betaflight). The CD intoduces a term to the PID controller that is the magnitude of the Setpoint change. Fast inputs produce a high CD gain to help push the MC into a move; in advance of the P-gain if set high enough.
| Default | Min | Max |
| --- | --- | --- |
diff --git a/src/main/fc/settings.yaml b/src/main/fc/settings.yaml
index 44f1f6c24b..cc46ab0df8 100644
--- a/src/main/fc/settings.yaml
+++ b/src/main/fc/settings.yaml
@@ -1730,7 +1730,7 @@ groups:
min: RPYL_PID_MIN
max: RPYL_PID_MAX
- name: mc_cd_pitch
- description: "Multicopter Control Derivative gain for PITCH. The CD intoduces a term to the PID controller that is the magnitude of the Setpoint change. Fast inputs produce a high CD gain to help push the MC into a move; in advance of the P-gain if set high enough."
+ description: "Multicopter Control Derivative gain for PITCH (known as 'Feed Forward' in Betaflight). The CD intoduces a term to the PID controller that is the magnitude of the Setpoint change. Fast inputs produce a high CD gain to help push the MC into a move; in advance of the P-gain if set high enough."
default_value: 60
field: bank_mc.pid[PID_PITCH].FF
min: RPYL_PID_MIN
@@ -1754,7 +1754,7 @@ groups:
min: RPYL_PID_MIN
max: RPYL_PID_MAX
- name: mc_cd_roll
- description: "Multicopter Control Derivative gain for ROLL. The CD intoduces a term to the PID controller that is the magnitude of the Setpoint change. Fast inputs produce a high CD gain to help push the MC into a move; in advance of the P-gain if set high enough."
+ description: "Multicopter Control Derivative gain for ROLL (known as 'Feed Forward' in Betaflight). The CD intoduces a term to the PID controller that is the magnitude of the Setpoint change. Fast inputs produce a high CD gain to help push the MC into a move; in advance of the P-gain if set high enough."
default_value: 60
field: bank_mc.pid[PID_ROLL].FF
min: RPYL_PID_MIN
@@ -1778,7 +1778,7 @@ groups:
min: RPYL_PID_MIN
max: RPYL_PID_MAX
- name: mc_cd_yaw
- description: "Multicopter Control Derivative gain for YAW. The CD intoduces a term to the PID controller that is the magnitude of the Setpoint change. Fast inputs produce a high CD gain to help push the MC into a move; in advance of the P-gain if set high enough."
+ description: "Multicopter Control Derivative gain for YAW (known as 'Feed Forward' in Betaflight). The CD intoduces a term to the PID controller that is the magnitude of the Setpoint change. Fast inputs produce a high CD gain to help push the MC into a move; in advance of the P-gain if set high enough."
default_value: 60
field: bank_mc.pid[PID_YAW].FF
min: RPYL_PID_MIN
From dce928823e8422309cc5d21b24370d51fd117c8a Mon Sep 17 00:00:00 2001
From: jhemcu <1553061986@qq.com>
Date: Mon, 4 Dec 2023 20:41:59 +0800
Subject: [PATCH 54/61] target: Add JHEMCU F722 targer board support
---
src/main/target/JHEMCUF722/CMakeLists.txt | 1 +
src/main/target/JHEMCUF722/config.c | 28 ++++
src/main/target/JHEMCUF722/target.c | 45 ++++++
src/main/target/JHEMCUF722/target.h | 182 ++++++++++++++++++++++
4 files changed, 256 insertions(+)
create mode 100644 src/main/target/JHEMCUF722/CMakeLists.txt
create mode 100644 src/main/target/JHEMCUF722/config.c
create mode 100644 src/main/target/JHEMCUF722/target.c
create mode 100644 src/main/target/JHEMCUF722/target.h
diff --git a/src/main/target/JHEMCUF722/CMakeLists.txt b/src/main/target/JHEMCUF722/CMakeLists.txt
new file mode 100644
index 0000000000..abbb496eaf
--- /dev/null
+++ b/src/main/target/JHEMCUF722/CMakeLists.txt
@@ -0,0 +1 @@
+target_stm32f722xe(JHEMCUF722)
diff --git a/src/main/target/JHEMCUF722/config.c b/src/main/target/JHEMCUF722/config.c
new file mode 100644
index 0000000000..caaec66ef2
--- /dev/null
+++ b/src/main/target/JHEMCUF722/config.c
@@ -0,0 +1,28 @@
+/*
+ * This file is part of INAV.
+ *
+ * INAV 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.
+ *
+ * INAV 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 INAV. If not, see .
+ */
+
+#include
+#include "platform.h"
+
+#include "fc/fc_msp_box.h"
+#include "io/piniobox.h"
+
+void targetConfiguration(void)
+{
+ pinioBoxConfigMutable()->permanentId[0] = BOX_PERMANENT_ID_USER1; // VTX power switch
+ pinioBoxConfigMutable()->permanentId[1] = BOX_PERMANENT_ID_USER2;
+}
diff --git a/src/main/target/JHEMCUF722/target.c b/src/main/target/JHEMCUF722/target.c
new file mode 100644
index 0000000000..68450216a0
--- /dev/null
+++ b/src/main/target/JHEMCUF722/target.c
@@ -0,0 +1,45 @@
+/*
+ * This file is part of INAV.
+ *
+ * INAV 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.
+ *
+ * INAV 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 INAV. If not, see .
+ */
+
+#include
+#include "platform.h"
+
+#include "drivers/bus.h"
+#include "drivers/io.h"
+#include "drivers/pwm_mapping.h"
+#include "drivers/timer.h"
+#include "drivers/pinio.h"
+#include "drivers/sensor.h"
+
+BUSDEV_REGISTER_SPI_TAG(busdev_bmi270, DEVHW_BMI270, BMI270_SPI_BUS, BMI270_CS_PIN, NONE, 0, DEVFLAGS_NONE, IMU_BMI270_ALIGN);
+BUSDEV_REGISTER_SPI_TAG(busdev_icm42688, DEVHW_ICM42605, ICM42605_SPI_BUS, ICM42605_CS_PIN, NONE, 0, DEVFLAGS_NONE, IMU_ICM42605_ALIGN);
+BUSDEV_REGISTER_SPI_TAG(busdev_mpu6000, DEVHW_MPU6000, MPU6000_SPI_BUS, MPU6000_CS_PIN, NONE, 0, DEVFLAGS_NONE, IMU_MPU6000_ALIGN);
+
+timerHardware_t timerHardware[] = {
+ DEF_TIM(TIM9, CH2, PA3, TIM_USE_PPM, 0, 0 ), //PPM&SBUS
+
+ DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S2 DMA1_S7_CH5
+ DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // S1 - D(1,2)
+ DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0), // S2 - D(1,4)
+ DEF_TIM(TIM2, CH2, PB3, TIM_USE_OUTPUT_AUTO, 0, 0), // S3 - D(1,6)
+ DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // S6 - D(2,1)
+ DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0), // S5 - D(2,4)
+
+ DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 0), // LED STRIP(1,5)
+};
+
+const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/JHEMCUF722/target.h b/src/main/target/JHEMCUF722/target.h
new file mode 100644
index 0000000000..9d34e5c820
--- /dev/null
+++ b/src/main/target/JHEMCUF722/target.h
@@ -0,0 +1,182 @@
+/*
+ * This file is part of INAV.
+ *
+ * INAV 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.
+ *
+ * INAV 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 INAV. If not, see .
+ */
+
+#pragma once
+
+#define TARGET_BOARD_IDENTIFIER "JHF7"
+#define USBD_PRODUCT_STRING "JHEMCUF722"
+
+#define LED0 PA15
+
+#define USE_BEEPER
+#define BEEPER PC15
+#define BEEPER_INVERTED
+
+// PINIO
+#define USE_PINIO
+#define USE_PINIOBOX
+#define PINIO1_PIN PC14
+#define PINIO2_PIN PB9
+
+// UART
+#define USB_IO
+#define USE_VCP
+
+#define USE_UART1
+#define UART1_RX_PIN PA10
+#define UART1_TX_PIN PA9
+
+#define USE_UART2
+#define UART2_RX_PIN PA3
+#define UART2_TX_PIN PA2
+
+#define USE_UART3
+#define UART3_RX_PIN PB11
+#define UART3_TX_PIN PB10
+
+#define USE_UART4
+#define UART4_RX_PIN PA1
+#define UART4_TX_PIN PA0
+
+#define USE_UART5
+#define UART5_RX_PIN PD2
+#define UART5_TX_PIN PC12
+
+#define USE_UART6
+#define UART6_RX_PIN PC7
+#define UART6_TX_PIN PC6
+
+#define SERIAL_PORT_COUNT 7
+
+// Gyro & Acc
+#define USE_TARGET_IMU_HARDWARE_DESCRIPTORS
+
+#define USE_SPI
+#define USE_SPI_DEVICE_1
+#define SPI1_SCK_PIN PA5
+#define SPI1_MISO_PIN PA6
+#define SPI1_MOSI_PIN PA7
+
+#define USE_IMU_ICM42605
+#define IMU_ICM42605_ALIGN CW90_DEG
+#define ICM42605_SPI_BUS BUS_SPI1
+#define ICM42605_CS_PIN PA4
+#define ICM42605_EXTI_PIN PC3
+
+#define USE_IMU_BMI270
+#define IMU_BMI270_ALIGN CW90_DEG
+#define BMI270_SPI_BUS BUS_SPI1
+#define BMI270_CS_PIN PA4
+#define BMI270_EXTI_PIN PC3
+
+#define USE_IMU_MPU6000
+#define IMU_MPU6000_ALIGN CW90_DEG
+#define MPU6000_SPI_BUS BUS_SPI1
+#define MPU6000_CS_PIN PA4
+#define MPU6000_EXTI_PIN PC3
+
+// I2C (Baro & Mag)
+#define USE_I2C
+
+#define USE_I2C_DEVICE_1
+#define I2C1_SCL PB6
+#define I2C1_SDA PB7
+
+// Baro
+#define USE_BARO
+#define USE_BARO_BMP280
+#define USE_BARO_MS5611
+#define USE_BARO_DPS310
+#define USE_BARO_SPL06
+#define BARO_I2C_BUS BUS_I2C1
+
+// Mag
+#define USE_MAG
+#define MAG_I2C_BUS BUS_I2C1
+#define USE_MAG_HMC5883
+#define USE_MAG_QMC5883
+#define USE_MAG_IST8310
+#define USE_MAG_IST8308
+#define USE_MAG_MAG3110
+#define USE_MAG_LIS3MDL
+
+// Onboard Flash
+#define USE_SPI_DEVICE_3
+#define SPI3_SCK_PIN PC10
+#define SPI3_MISO_PIN PC11
+#define SPI3_MOSI_PIN PB5
+
+#define M25P16_SPI_BUS BUS_SPI3
+#define M25P16_CS_PIN PC13
+
+#define W25N01G_SPI_BUS BUS_SPI3
+#define W25N01G_CS_PIN PC13
+
+#define USE_FLASHFS
+#define USE_FLASH_M25P16
+#define USE_FLASH_W25N01G
+#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
+
+// OSD
+#define USE_OSD
+#define USE_SPI_DEVICE_2
+#define SPI2_SCK_PIN PB13
+#define SPI2_MISO_PIN PB14
+#define SPI2_MOSI_PIN PB15
+
+#define USE_MAX7456
+#define MAX7456_SPI_BUS BUS_SPI2
+#define MAX7456_CS_PIN PB12
+
+// ADC
+#define USE_ADC
+#define ADC_CHANNEL_1_PIN PC1
+#define ADC_CHANNEL_2_PIN PC2
+#define ADC_CHANNEL_3_PIN PC0
+
+#define CURRENT_METER_ADC_CHANNEL ADC_CHN_1
+#define VBAT_ADC_CHANNEL ADC_CHN_2
+#define RSSI_ADC_CHANNEL ADC_CHN_3
+
+// LED
+#define USE_LED_STRIP
+#define WS2811_PIN PA8
+
+// Optical Flow & Lidar
+#define USE_RANGEFINDER
+#define USE_RANGEFINDER_MSP
+#define USE_OPFLOW
+#define USE_OPFLOW_MSP
+
+// Misc
+#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
+#define USE_DSHOT
+#define USE_ESC_SENSOR
+#define USE_SERIAL_4WAY_BLHELI_INTERFACE
+
+#define SERIALRX_UART SERIAL_PORT_USART2
+#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
+#define SERIALRX_PROVIDER SERIALRX_SBUS
+
+#define MAX_PWM_OUTPUT_PORTS 6
+
+#define CURRENT_METER_SCALE 250
+
+#define TARGET_IO_PORTA 0xffff
+#define TARGET_IO_PORTB 0xffff
+#define TARGET_IO_PORTC 0xffff
+#define TARGET_IO_PORTD (BIT(2))
From 93b82f8c960ce825b2e7add14648c6a5126c31bd Mon Sep 17 00:00:00 2001
From: jhemcu <1553061986@qq.com>
Date: Mon, 4 Dec 2023 20:44:35 +0800
Subject: [PATCH 55/61] target: Add JHEMCU F405 targer board support
---
src/main/target/JHEMCUF405/CMakeLists.txt | 1 +
src/main/target/JHEMCUF405/target.c | 39 +++++
src/main/target/JHEMCUF405/target.h | 164 ++++++++++++++++++++++
3 files changed, 204 insertions(+)
create mode 100644 src/main/target/JHEMCUF405/CMakeLists.txt
create mode 100644 src/main/target/JHEMCUF405/target.c
create mode 100644 src/main/target/JHEMCUF405/target.h
diff --git a/src/main/target/JHEMCUF405/CMakeLists.txt b/src/main/target/JHEMCUF405/CMakeLists.txt
new file mode 100644
index 0000000000..1c8253eb46
--- /dev/null
+++ b/src/main/target/JHEMCUF405/CMakeLists.txt
@@ -0,0 +1 @@
+target_stm32f405xg(JHEMCUF405)
diff --git a/src/main/target/JHEMCUF405/target.c b/src/main/target/JHEMCUF405/target.c
new file mode 100644
index 0000000000..463a5cbc0e
--- /dev/null
+++ b/src/main/target/JHEMCUF405/target.c
@@ -0,0 +1,39 @@
+/*
+ * This file is part of INAV.
+ *
+ * INAV 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.
+ *
+ * INAV 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 INAV. If not, see .
+ */
+
+#include
+#include
+
+#include "drivers/io.h"
+#include "drivers/pwm_mapping.h"
+#include "drivers/timer.h"
+
+timerHardware_t timerHardware[] = {
+ DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S1 D(1,3,2)
+ DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // S2 D(1,0,2)
+ DEF_TIM(TIM2, CH4, PA3, TIM_USE_OUTPUT_AUTO, 0, 1), // S3 D(1,7,5)
+ DEF_TIM(TIM2, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0), // S4 D(1,2,5)
+ DEF_TIM(TIM3, CH2, PB5, TIM_USE_OUTPUT_AUTO, 0, 0), // S5 D(2,4,7)
+ DEF_TIM(TIM4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0, 0), // S6 D(2,7,7)
+ DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // S7
+ DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 0), // S8
+
+ DEF_TIM(TIM1, CH2, PA9, TIM_USE_LED, 0, 0), // 2812LED D(1,5,3)
+ DEF_TIM(TIM10, CH1, PB8, TIM_USE_PPM, 0, 0), // PPM
+};
+
+const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
diff --git a/src/main/target/JHEMCUF405/target.h b/src/main/target/JHEMCUF405/target.h
new file mode 100644
index 0000000000..6a5b2f52ab
--- /dev/null
+++ b/src/main/target/JHEMCUF405/target.h
@@ -0,0 +1,164 @@
+/*
+ * This file is part of INAV.
+ *
+ * INAV 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.
+ *
+ * INAV 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 INAV. If not, see .
+ */
+
+#pragma once
+
+#define TARGET_BOARD_IDENTIFIER "JH45"
+#define USBD_PRODUCT_STRING "JHEMCUF405"
+
+#define LED0 PC14 //Green
+#define BEEPER PC13
+#define BEEPER_INVERTED
+
+// *************** SPI1 Gyro & ACC *******************
+#define USE_SPI
+#define USE_SPI_DEVICE_1
+
+#define SPI1_SCK_PIN PA5
+#define SPI1_MISO_PIN PA6
+#define SPI1_MOSI_PIN PA7
+
+#define USE_IMU_MPU6000
+#define IMU_MPU6000_ALIGN CW90_DEG
+#define MPU6000_CS_PIN PB12
+#define MPU6000_SPI_BUS BUS_SPI1
+
+#define USE_IMU_BMI270
+#define IMU_BMI270_ALIGN CW90_DEG
+#define BMI270_SPI_BUS BUS_SPI1
+#define BMI270_CS_PIN PB12
+#define BMI270_EXTI_PIN GYRO_INT_EXTI
+
+#define USE_IMU_ICM42605
+#define IMU_ICM42605_ALIGN CW90_DEG
+#define ICM42605_CS_PIN PB12
+#define ICM42605_SPI_BUS BUS_SPI1
+
+#define USE_EXTI
+#define GYRO_INT_EXTI PB13
+#define USE_MPU_DATA_READY_SIGNAL
+
+// *************** I2C /Baro/Mag *********************
+#define USE_I2C
+#define USE_I2C_DEVICE_1
+#define I2C1_SCL PB8
+#define I2C1_SDA PB9
+
+#define USE_BARO
+#define BARO_I2C_BUS BUS_I2C1
+#define USE_BARO_BMP280
+#define USE_BARO_MS5611
+#define USE_BARO_BMP085
+#define USE_BARO_DPS310
+#define USE_BARO_SPL06
+
+#define USE_MAG
+#define MAG_I2C_BUS BUS_I2C1
+#define USE_MAG_AK8963
+#define USE_MAG_AK8975
+#define USE_MAG_HMC5883
+#define USE_MAG_QMC5883
+#define USE_MAG_IST8310
+#define USE_MAG_MAG3110
+#define USE_MAG_LIS3MDL
+
+#define USE_RANGEFINDER
+#define USE_RANGEFINDER_HCSR04_I2C
+#define RANGEFINDER_I2C_BUS BUS_I2C1
+#define PITOT_I2C_BUS BUS_I2C1
+#define TEMPERATURE_I2C_BUS BUS_I2C1
+
+// *************** SPI2 OSD ***************************
+#define USE_SPI_DEVICE_3
+#define SPI3_SCK_PIN PC10
+#define SPI3_MISO_PIN PC11
+#define SPI3_MOSI_PIN PC12
+
+#define USE_OSD
+#define USE_MAX7456
+#define MAX7456_SPI_BUS BUS_SPI3
+#define MAX7456_CS_PIN PB14
+
+// *************** Onboard flash ********************
+#define USE_FLASHFS
+#define USE_FLASH_M25P16
+#define M25P16_CS_PIN PB3
+#define M25P16_SPI_BUS BUS_SPI3
+#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
+
+// *************** UART *****************************
+#define USB_IO
+#define USE_VCP
+#define VBUS_SENSING_PIN PA8
+#define VBUS_SENSING_ENABLED
+
+#define USE_UART1
+#define UART1_TX_PIN PB6
+#define UART1_RX_PIN PA10
+
+#define USE_UART2
+#define UART2_TX_PIN PD5
+#define UART2_RX_PIN PD6
+
+#define USE_UART3
+#define UART3_TX_PIN PB10
+#define UART3_RX_PIN PB11
+
+#define USE_UART4
+#define UART4_TX_PIN PA0
+#define UART4_RX_PIN PA1
+
+#define USE_UART6
+#define UART6_TX_PIN PC6
+#define UART6_RX_PIN PC7
+
+#define SERIAL_PORT_COUNT 6
+
+#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
+#define SERIALRX_PROVIDER SERIALRX_SBUS
+#define SERIALRX_UART SERIAL_PORT_USART2
+
+// *************** ADC ***************************
+#define USE_ADC
+#define ADC_INSTANCE ADC1
+#define ADC1_DMA_STREAM DMA2_Stream0
+#define ADC_CHANNEL_1_PIN PC3
+#define ADC_CHANNEL_2_PIN PC2
+#define ADC_CHANNEL_3_PIN PC0
+#define VBAT_ADC_CHANNEL ADC_CHN_1
+#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
+#define RSSI_ADC_CHANNEL ADC_CHN_3
+
+// *************** LED2812 ************************
+#define USE_LED_STRIP
+#define WS2811_PIN PA9
+
+// *************** OTHERS *************************
+#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_OSD | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY | FEATURE_SOFTSERIAL)
+#define CURRENT_METER_SCALE 250
+
+#define USE_DSHOT
+#define USE_ESC_SENSOR
+
+#define USE_SERIAL_4WAY_BLHELI_INTERFACE
+
+#define TARGET_IO_PORTA 0xffff
+#define TARGET_IO_PORTB 0xffff
+#define TARGET_IO_PORTC 0xffff
+#define TARGET_IO_PORTD 0xffff
+
+#define MAX_PWM_OUTPUT_PORTS 8
From 4788513a05cb7511503bb9ba86e4df9d35136027 Mon Sep 17 00:00:00 2001
From: "Pawel Spychalski (DzikuVx)"
Date: Mon, 4 Dec 2023 20:12:46 +0100
Subject: [PATCH 56/61] flashhobby targets
---
src/main/target/FLASHHOBBYF405/CMakeLists.txt | 1 +
src/main/target/FLASHHOBBYF405/target.c | 43 +++++
src/main/target/FLASHHOBBYF405/target.h | 164 ++++++++++++++++++
src/main/target/FLASHHOBBYF722/CMakeLists.txt | 1 +
src/main/target/FLASHHOBBYF722/target.c | 45 +++++
src/main/target/FLASHHOBBYF722/target.h | 162 +++++++++++++++++
6 files changed, 416 insertions(+)
create mode 100644 src/main/target/FLASHHOBBYF405/CMakeLists.txt
create mode 100644 src/main/target/FLASHHOBBYF405/target.c
create mode 100644 src/main/target/FLASHHOBBYF405/target.h
create mode 100644 src/main/target/FLASHHOBBYF722/CMakeLists.txt
create mode 100644 src/main/target/FLASHHOBBYF722/target.c
create mode 100644 src/main/target/FLASHHOBBYF722/target.h
diff --git a/src/main/target/FLASHHOBBYF405/CMakeLists.txt b/src/main/target/FLASHHOBBYF405/CMakeLists.txt
new file mode 100644
index 0000000000..7fa38644d1
--- /dev/null
+++ b/src/main/target/FLASHHOBBYF405/CMakeLists.txt
@@ -0,0 +1 @@
+target_stm32f405xg(FLASHHOBBYF405)
diff --git a/src/main/target/FLASHHOBBYF405/target.c b/src/main/target/FLASHHOBBYF405/target.c
new file mode 100644
index 0000000000..b088049a07
--- /dev/null
+++ b/src/main/target/FLASHHOBBYF405/target.c
@@ -0,0 +1,43 @@
+/*
+* This file is part of INAV Project.
+*
+* 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 "platform.h"
+#include "drivers/io.h"
+
+#include "drivers/dma.h"
+#include "drivers/timer.h"
+#include "drivers/timer_def.h"
+
+timerHardware_t timerHardware[] = {
+ // DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 1),
+
+ DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S1
+ DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // S2
+ DEF_TIM(TIM3, CH2, PB5, TIM_USE_OUTPUT_AUTO, 0, 0), // S3
+ DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0), // S4
+ DEF_TIM(TIM4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0, 0), // S5
+ DEF_TIM(TIM4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0, 0), // S6
+ DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 1), // S7
+ DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // S8
+
+ DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 1),//WS2812B
+ // DEF_TIM(TIM2, CH2, PB3, TIM_USE_PWM | TIM_USE_FW_SERVO, 0, 0), // "C.C"
+};
+
+const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
\ No newline at end of file
diff --git a/src/main/target/FLASHHOBBYF405/target.h b/src/main/target/FLASHHOBBYF405/target.h
new file mode 100644
index 0000000000..937917c95c
--- /dev/null
+++ b/src/main/target/FLASHHOBBYF405/target.h
@@ -0,0 +1,164 @@
+/*
+ * This file is part of INAV Project.
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#define TARGET_BOARD_IDENTIFIER "FHRCF405"
+
+#define USBD_PRODUCT_STRING "FLASHHOBBYF405"
+
+#define LED0 PC14
+
+#define BEEPER PB2
+#define BEEPER_INVERTED
+
+// *************** Gyro & ACC **********************
+#define USE_SPI
+#define USE_SPI_DEVICE_1
+
+#define SPI1_NSS_PIN PA4
+#define SPI1_SCK_PIN PA5
+#define SPI1_MISO_PIN PA6
+#define SPI1_MOSI_PIN PA7
+
+
+#define USE_IMU_MPU6000
+#define IMU_MPU6000_ALIGN CW0_DEG
+#define MPU6000_CS_PIN SPI1_NSS_PIN
+#define MPU6000_SPI_BUS BUS_SPI1
+
+#define USE_IMU_BMI270
+#define IMU_BMI270_ALIGN CW0_DEG
+#define BMI270_CS_PIN SPI1_NSS_PIN
+#define BMI270_SPI_BUS BUS_SPI1
+
+#define USE_IMU_ICM42605
+#define IMU_ICM42605_ALIGN CW0_DEG
+#define ICM42605_CS_PIN SPI1_NSS_PIN
+#define ICM42605_SPI_BUS BUS_SPI1
+
+// *************** I2C/Baro/Mag *********************
+#define USE_I2C
+#define USE_I2C_DEVICE_1
+#define I2C1_SCL PB8
+#define I2C1_SDA PB9
+
+#define DEFAULT_I2C_BUS BUS_I2C1
+
+#define USE_BARO
+#define BARO_I2C_BUS DEFAULT_I2C_BUS
+#define USE_BARO_ALL
+
+#define USE_MAG
+#define MAG_I2C_BUS DEFAULT_I2C_BUS
+#define USE_MAG_ALL
+
+#define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
+#define PITOT_I2C_BUS DEFAULT_I2C_BUS
+
+#define USE_RANGEFINDER
+#define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
+
+// *************** OSD *****************************
+#define USE_SPI_DEVICE_2
+#define SPI2_NSS_PIN PB12
+#define SPI2_SCK_PIN PB13
+#define SPI2_MISO_PIN PB14
+#define SPI2_MOSI_PIN PB15
+
+#define USE_MAX7456
+#define MAX7456_SPI_BUS BUS_SPI2
+#define MAX7456_CS_PIN SPI2_NSS_PIN
+
+// *************** FLASH **************************
+#define USE_SPI_DEVICE_3
+#define SPI3_NSS_PIN PA15
+#define SPI3_SCK_PIN PC10
+#define SPI3_MISO_PIN PC11
+#define SPI3_MOSI_PIN PC12
+
+#define M25P16_CS_PIN SPI3_NSS_PIN
+#define M25P16_SPI_BUS BUS_SPI3
+#define USE_FLASHFS
+#define USE_FLASH_M25P16
+#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
+
+// *************** UART *****************************
+#define USE_VCP
+
+#define USE_UART1
+#define UART1_RX_PIN PA10
+#define UART1_TX_PIN PA9
+
+#define USE_UART2
+#define UART2_RX_PIN PA3
+#define UART2_TX_PIN PA2
+
+#define USE_UART3
+#define UART3_RX_PIN PB11
+#define UART3_TX_PIN PB10
+
+#define USE_UART4
+#define UART4_RX_PIN PA1
+#define UART4_TX_PIN PA0
+
+#define USE_UART5
+#define UART5_RX_PIN PD2
+#define UART5_TX_PIN NONE
+
+#define USE_UART6
+#define UART6_RX_PIN PC7
+#define UART6_TX_PIN PC6
+
+#define SERIAL_PORT_COUNT 7
+
+#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
+#define SERIALRX_PROVIDER SERIALRX_SBUS
+#define SERIALRX_UART SERIAL_PORT_USART2
+
+// *************** ADC *****************************
+#define USE_ADC
+#define ADC_INSTANCE ADC1
+#define ADC1_DMA_STREAM DMA2_Stream0
+#define ADC_CHANNEL_1_PIN PC2
+#define ADC_CHANNEL_2_PIN PC1
+
+#define VBAT_ADC_CHANNEL ADC_CHN_1
+#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
+
+
+#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
+// *************** PINIO ************************
+#define USE_PINIO
+#define USE_PINIOBOX
+#define PINIO1_PIN PC13
+
+// *************** LEDSTRIP ************************
+#define USE_LED_STRIP
+#define WS2811_PIN PA8
+
+#define USE_SERIAL_4WAY_BLHELI_INTERFACE
+
+#define TARGET_IO_PORTA 0xffff
+#define TARGET_IO_PORTB 0xffff
+#define TARGET_IO_PORTC 0xffff
+#define TARGET_IO_PORTD (BIT(2))
+
+#define MAX_PWM_OUTPUT_PORTS 8
+
+#define USE_DSHOT
+#define USE_ESC_SENSOR
diff --git a/src/main/target/FLASHHOBBYF722/CMakeLists.txt b/src/main/target/FLASHHOBBYF722/CMakeLists.txt
new file mode 100644
index 0000000000..90566a14d6
--- /dev/null
+++ b/src/main/target/FLASHHOBBYF722/CMakeLists.txt
@@ -0,0 +1 @@
+target_stm32f722xe(FLASHHOBBYF722)
diff --git a/src/main/target/FLASHHOBBYF722/target.c b/src/main/target/FLASHHOBBYF722/target.c
new file mode 100644
index 0000000000..31a8f73544
--- /dev/null
+++ b/src/main/target/FLASHHOBBYF722/target.c
@@ -0,0 +1,45 @@
+/*
+* This file is part of INAV Project.
+*
+* 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 "platform.h"
+#include "drivers/io.h"
+
+#include "drivers/dma.h"
+#include "drivers/timer.h"
+#include "drivers/timer_def.h"
+
+timerHardware_t timerHardware[] = {
+ // DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 1),
+
+ DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S1
+ DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // S2
+ DEF_TIM(TIM3, CH2, PB5, TIM_USE_OUTPUT_AUTO, 0, 0), // S3
+ DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0), // S4
+ DEF_TIM(TIM4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0, 0), // S5
+ DEF_TIM(TIM4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0, 0), // S6
+ DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 1), // S7
+ DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // S8
+
+ DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 1),//WS2812B
+ // DEF_TIM(TIM2, CH2, PB3, TIM_USE_PWM | TIM_USE_FW_SERVO, 0, 0), // "C.C"
+};
+
+const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
+
+
diff --git a/src/main/target/FLASHHOBBYF722/target.h b/src/main/target/FLASHHOBBYF722/target.h
new file mode 100644
index 0000000000..f0cc788135
--- /dev/null
+++ b/src/main/target/FLASHHOBBYF722/target.h
@@ -0,0 +1,162 @@
+/*
+ * This file is part of INAV Project.
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#define TARGET_BOARD_IDENTIFIER "FHRCF722"
+#define USBD_PRODUCT_STRING "FLASHHOBBYF722"
+
+#define LED0 PC14
+
+#define BEEPER PC15
+#define BEEPER_INVERTED
+
+// *************** Gyro & ACC **********************
+#define USE_SPI
+#define USE_SPI_DEVICE_1
+
+#define SPI1_NSS_PIN PA4
+#define SPI1_SCK_PIN PA5
+#define SPI1_MISO_PIN PA6
+#define SPI1_MOSI_PIN PA7
+
+#define USE_IMU_MPU6000
+#define IMU_MPU6000_ALIGN CW0_DEG
+#define MPU6000_CS_PIN SPI1_NSS_PIN
+#define MPU6000_SPI_BUS BUS_SPI1
+
+#define USE_IMU_BMI270
+#define IMU_BMI270_ALIGN CW0_DEG
+#define BMI270_CS_PIN SPI1_NSS_PIN
+#define BMI270_SPI_BUS BUS_SPI1
+
+#define USE_IMU_ICM42605
+#define IMU_ICM42605_ALIGN CW0_DEG
+#define ICM42605_CS_PIN SPI1_NSS_PIN
+#define ICM42605_SPI_BUS BUS_SPI1
+
+// *************** I2C/Baro/Mag *********************
+#define USE_I2C
+#define USE_I2C_DEVICE_1
+#define I2C1_SCL PB8
+#define I2C1_SDA PB9
+
+#define DEFAULT_I2C_BUS BUS_I2C1
+
+#define USE_BARO
+#define BARO_I2C_BUS DEFAULT_I2C_BUS
+#define USE_BARO_ALL
+
+#define USE_MAG
+#define MAG_I2C_BUS DEFAULT_I2C_BUS
+#define USE_MAG_ALL
+
+#define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
+#define PITOT_I2C_BUS DEFAULT_I2C_BUS
+
+#define USE_RANGEFINDER
+#define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
+
+// *************** FLASH **************************
+#define USE_SPI_DEVICE_3
+#define SPI3_NSS_PIN PA15
+#define SPI3_SCK_PIN PC10
+#define SPI3_MISO_PIN PC11
+#define SPI3_MOSI_PIN PC12
+
+#define M25P16_CS_PIN SPI3_NSS_PIN
+#define M25P16_SPI_BUS BUS_SPI3
+#define USE_FLASHFS
+#define USE_FLASH_M25P16
+#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
+
+// *************** OSD *****************************
+#define USE_SPI_DEVICE_2
+#define SPI2_NSS_PIN PB12
+#define SPI2_SCK_PIN PB13
+#define SPI2_MISO_PIN PB14
+#define SPI2_MOSI_PIN PB15
+
+#define USE_MAX7456
+#define MAX7456_SPI_BUS BUS_SPI2
+#define MAX7456_CS_PIN SPI2_NSS_PIN
+
+// *************** UART *****************************
+#define USE_VCP
+
+#define USE_UART1
+#define UART1_RX_PIN PA10
+#define UART1_TX_PIN PA9
+
+#define USE_UART2
+#define UART2_RX_PIN PA3
+#define UART2_TX_PIN PA2
+
+#define USE_UART3
+#define UART3_RX_PIN PB11
+#define UART3_TX_PIN PB10
+
+#define USE_UART4
+#define UART4_RX_PIN PA1
+#define UART4_TX_PIN PA0
+
+#define USE_UART5
+#define UART5_RX_PIN PD2
+#define UART5_TX_PIN NONE
+
+#define USE_UART6
+#define UART6_RX_PIN PC7
+#define UART6_TX_PIN PC6
+
+#define SERIAL_PORT_COUNT 7
+
+#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
+#define SERIALRX_PROVIDER SERIALRX_SBUS
+#define SERIALRX_UART SERIAL_PORT_USART2
+
+// *************** ADC *****************************
+#define USE_ADC
+#define ADC_INSTANCE ADC1
+#define ADC1_DMA_STREAM DMA2_Stream0
+#define ADC_CHANNEL_1_PIN PC2
+#define ADC_CHANNEL_2_PIN PC1
+
+#define VBAT_ADC_CHANNEL ADC_CHN_1
+#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
+
+
+#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
+// *************** PINIO ************************
+#define USE_PINIO
+#define USE_PINIOBOX
+#define PINIO1_PIN PC13
+
+// *************** LEDSTRIP ************************
+#define USE_LED_STRIP
+#define WS2811_PIN PA8
+
+#define USE_SERIAL_4WAY_BLHELI_INTERFACE
+
+#define TARGET_IO_PORTA 0xffff
+#define TARGET_IO_PORTB 0xffff
+#define TARGET_IO_PORTC 0xffff
+#define TARGET_IO_PORTD (BIT(2))
+
+#define MAX_PWM_OUTPUT_PORTS 8
+
+#define USE_DSHOT
+#define USE_ESC_SENSOR
From 038b5a90eec2a0841de54778eb1a03300fc6dec2 Mon Sep 17 00:00:00 2001
From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com>
Date: Mon, 4 Dec 2023 23:40:12 +0100
Subject: [PATCH 57/61] Enable dshot
---
src/main/target/BETAFPVF435/target.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/main/target/BETAFPVF435/target.h b/src/main/target/BETAFPVF435/target.h
index 2376afbcfe..fa025b9d7f 100644
--- a/src/main/target/BETAFPVF435/target.h
+++ b/src/main/target/BETAFPVF435/target.h
@@ -31,7 +31,7 @@
//#define ENABLE_DSHOT_DMAR DSHOT_DMAR_AUTO
//#define DSHOT_BITBANG_DEFAULT DSHOT_BITBANG_AUTO
-//#define ENABLE_DSHOT
+#define ENABLE_DSHOT
// *************** Gyro & ACC **********************
#define USE_SPI
@@ -177,7 +177,7 @@
#define USE_LED_STRIP
#define WS2811_PIN PB6
-#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_LED_STRIP )
+#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_VBAT | FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_LED_STRIP )
#define DEFAULT_VOLTAGE_METER_SOURCE VOLTAGE_METER_ADC
#define DEFAULT_CURRENT_METER_SOURCE CURRENT_METER_ADC
@@ -189,11 +189,13 @@
#define TARGET_IO_PORTC 0xffff
#define TARGET_IO_PORTD 0xffff
#define TARGET_IO_PORTE BIT(2)
+#define TARGET_IO_PORTH (BIT(1)|BIT(2)|BIT(3))
#define MAX_PWM_OUTPUT_PORTS 8
#define USE_SERIAL_4WAY_BLHELI_INTERFACE
-//#define USE_DSHOT
-//#define USE_ESC_SENSOR
+#define USE_DSHOT
+#define USE_ESC_SENSOR
#define USE_ESCSERIAL
+#define USE_RPM_FILTER
From 39966a2261daf4514b73bc0e83096ca51c208fe9 Mon Sep 17 00:00:00 2001
From: "Pawel Spychalski (DzikuVx)"
Date: Tue, 5 Dec 2023 18:44:36 +0100
Subject: [PATCH 58/61] SPEDIXF722 and SPEDIXF405 targets
---
src/main/target/SPEDIXF405/CMakeLists.txt | 1 +
src/main/target/SPEDIXF405/target.c | 45 ++++++
src/main/target/SPEDIXF405/target.h | 164 +++++++++++++++++++++
src/main/target/SPEDIXF722/CMakeLists.txt | 1 +
src/main/target/SPEDIXF722/target.c | 45 ++++++
src/main/target/SPEDIXF722/target.h | 166 ++++++++++++++++++++++
6 files changed, 422 insertions(+)
create mode 100644 src/main/target/SPEDIXF405/CMakeLists.txt
create mode 100644 src/main/target/SPEDIXF405/target.c
create mode 100644 src/main/target/SPEDIXF405/target.h
create mode 100644 src/main/target/SPEDIXF722/CMakeLists.txt
create mode 100644 src/main/target/SPEDIXF722/target.c
create mode 100644 src/main/target/SPEDIXF722/target.h
diff --git a/src/main/target/SPEDIXF405/CMakeLists.txt b/src/main/target/SPEDIXF405/CMakeLists.txt
new file mode 100644
index 0000000000..62ce61f7c7
--- /dev/null
+++ b/src/main/target/SPEDIXF405/CMakeLists.txt
@@ -0,0 +1 @@
+target_stm32f405xg(SPEDIXF405)
diff --git a/src/main/target/SPEDIXF405/target.c b/src/main/target/SPEDIXF405/target.c
new file mode 100644
index 0000000000..31a8f73544
--- /dev/null
+++ b/src/main/target/SPEDIXF405/target.c
@@ -0,0 +1,45 @@
+/*
+* This file is part of INAV Project.
+*
+* 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 "platform.h"
+#include "drivers/io.h"
+
+#include "drivers/dma.h"
+#include "drivers/timer.h"
+#include "drivers/timer_def.h"
+
+timerHardware_t timerHardware[] = {
+ // DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 1),
+
+ DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S1
+ DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // S2
+ DEF_TIM(TIM3, CH2, PB5, TIM_USE_OUTPUT_AUTO, 0, 0), // S3
+ DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0), // S4
+ DEF_TIM(TIM4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0, 0), // S5
+ DEF_TIM(TIM4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0, 0), // S6
+ DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 1), // S7
+ DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // S8
+
+ DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 1),//WS2812B
+ // DEF_TIM(TIM2, CH2, PB3, TIM_USE_PWM | TIM_USE_FW_SERVO, 0, 0), // "C.C"
+};
+
+const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
+
+
diff --git a/src/main/target/SPEDIXF405/target.h b/src/main/target/SPEDIXF405/target.h
new file mode 100644
index 0000000000..3f46890b48
--- /dev/null
+++ b/src/main/target/SPEDIXF405/target.h
@@ -0,0 +1,164 @@
+/*
+ * This file is part of INAV Project.
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#define TARGET_BOARD_IDENTIFIER "SPDXF405"
+
+#define USBD_PRODUCT_STRING "SPEDIXF405"
+
+#define LED0 PC14
+
+#define BEEPER PB2
+#define BEEPER_INVERTED
+
+// *************** Gyro & ACC **********************
+#define USE_SPI
+#define USE_SPI_DEVICE_1
+
+#define SPI1_NSS_PIN PA4
+#define SPI1_SCK_PIN PA5
+#define SPI1_MISO_PIN PA6
+#define SPI1_MOSI_PIN PA7
+
+#define USE_IMU_MPU6000
+#define IMU_MPU6000_ALIGN CW0_DEG
+#define MPU6000_CS_PIN SPI1_NSS_PIN
+#define MPU6000_SPI_BUS BUS_SPI1
+
+#define USE_IMU_BMI270
+#define IMU_BMI270_ALIGN CW0_DEG
+#define BMI270_CS_PIN SPI1_NSS_PIN
+#define BMI270_SPI_BUS BUS_SPI1
+
+#define USE_IMU_ICM42605
+#define IMU_ICM42605_ALIGN CW0_DEG
+#define ICM42605_CS_PIN SPI1_NSS_PIN
+#define ICM42605_SPI_BUS BUS_SPI1
+
+// *************** I2C/Baro/Mag *********************
+#define USE_I2C
+#define USE_I2C_DEVICE_1
+#define I2C1_SCL PB8
+#define I2C1_SDA PB9
+
+#define DEFAULT_I2C_BUS BUS_I2C1
+
+#define USE_BARO
+#define BARO_I2C_BUS DEFAULT_I2C_BUS
+#define USE_BARO_ALL
+
+#define USE_MAG
+#define MAG_I2C_BUS DEFAULT_I2C_BUS
+#define USE_MAG_ALL
+
+#define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
+
+#define PITOT_I2C_BUS DEFAULT_I2C_BUS
+
+#define USE_RANGEFINDER
+#define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
+
+// *************** OSD *****************************
+#define USE_SPI_DEVICE_2
+#define SPI2_NSS_PIN PB12
+#define SPI2_SCK_PIN PB13
+#define SPI2_MISO_PIN PB14
+#define SPI2_MOSI_PIN PB15
+
+#define USE_MAX7456
+#define MAX7456_SPI_BUS BUS_SPI2
+#define MAX7456_CS_PIN SPI2_NSS_PIN
+// *************** FLASH **************************
+#define USE_SPI_DEVICE_3
+#define SPI3_NSS_PIN PA15
+#define SPI3_SCK_PIN PC10
+#define SPI3_MISO_PIN PC11
+#define SPI3_MOSI_PIN PC12
+
+#define M25P16_CS_PIN SPI3_NSS_PIN
+#define M25P16_SPI_BUS BUS_SPI3
+#define USE_FLASHFS
+#define USE_FLASH_M25P16
+#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
+
+// *************** UART *****************************
+#define USE_VCP
+
+#define USE_UART1
+#define UART1_RX_PIN PA10
+#define UART1_TX_PIN PA9
+
+#define USE_UART2
+#define UART2_RX_PIN PA3
+#define UART2_TX_PIN PA2
+
+#define USE_UART3
+#define UART3_RX_PIN PB11
+#define UART3_TX_PIN PB10
+
+#define USE_UART4
+#define UART4_RX_PIN PA1
+#define UART4_TX_PIN PA0
+
+#define USE_UART5
+#define UART5_RX_PIN PD2
+#define UART5_TX_PIN NONE
+
+#define USE_UART6
+#define UART6_RX_PIN PC7
+#define UART6_TX_PIN PC6
+
+#define SERIAL_PORT_COUNT 7
+
+#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
+#define SERIALRX_PROVIDER SERIALRX_SBUS
+#define SERIALRX_UART SERIAL_PORT_USART2
+
+// *************** ADC *****************************
+#define USE_ADC
+#define ADC_INSTANCE ADC1
+#define ADC1_DMA_STREAM DMA2_Stream0
+#define ADC_CHANNEL_1_PIN PC2
+#define ADC_CHANNEL_2_PIN PC1
+
+#define VBAT_ADC_CHANNEL ADC_CHN_1
+#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
+
+
+#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
+// *************** PINIO ************************
+#define USE_PINIO
+#define USE_PINIOBOX
+#define PINIO1_PIN PC13
+
+// *************** LEDSTRIP ************************
+#define USE_LED_STRIP
+#define WS2811_PIN PA8
+
+#define USE_SERIAL_4WAY_BLHELI_INTERFACE
+
+#define TARGET_IO_PORTA 0xffff
+#define TARGET_IO_PORTB 0xffff
+#define TARGET_IO_PORTC 0xffff
+#define TARGET_IO_PORTD (BIT(2))
+
+
+#define MAX_PWM_OUTPUT_PORTS 8
+
+#define USE_DSHOT
+#define USE_ESC_SENSOR
diff --git a/src/main/target/SPEDIXF722/CMakeLists.txt b/src/main/target/SPEDIXF722/CMakeLists.txt
new file mode 100644
index 0000000000..e937ebba9e
--- /dev/null
+++ b/src/main/target/SPEDIXF722/CMakeLists.txt
@@ -0,0 +1 @@
+target_stm32f722xe(SPEDIXF722)
diff --git a/src/main/target/SPEDIXF722/target.c b/src/main/target/SPEDIXF722/target.c
new file mode 100644
index 0000000000..31a8f73544
--- /dev/null
+++ b/src/main/target/SPEDIXF722/target.c
@@ -0,0 +1,45 @@
+/*
+* This file is part of INAV Project.
+*
+* 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 "platform.h"
+#include "drivers/io.h"
+
+#include "drivers/dma.h"
+#include "drivers/timer.h"
+#include "drivers/timer_def.h"
+
+timerHardware_t timerHardware[] = {
+ // DEF_TIM(TIM5, CH4, PA3, TIM_USE_PPM, 0, 1),
+
+ DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S1
+ DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // S2
+ DEF_TIM(TIM3, CH2, PB5, TIM_USE_OUTPUT_AUTO, 0, 0), // S3
+ DEF_TIM(TIM3, CH1, PB4, TIM_USE_OUTPUT_AUTO, 0, 0), // S4
+ DEF_TIM(TIM4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0, 0), // S5
+ DEF_TIM(TIM4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0, 0), // S6
+ DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 1), // S7
+ DEF_TIM(TIM8, CH4, PC9, TIM_USE_OUTPUT_AUTO, 0, 0), // S8
+
+ DEF_TIM(TIM1, CH1, PA8, TIM_USE_LED, 0, 1),//WS2812B
+ // DEF_TIM(TIM2, CH2, PB3, TIM_USE_PWM | TIM_USE_FW_SERVO, 0, 0), // "C.C"
+};
+
+const int timerHardwareCount = sizeof(timerHardware) / sizeof(timerHardware[0]);
+
+
diff --git a/src/main/target/SPEDIXF722/target.h b/src/main/target/SPEDIXF722/target.h
new file mode 100644
index 0000000000..511381587a
--- /dev/null
+++ b/src/main/target/SPEDIXF722/target.h
@@ -0,0 +1,166 @@
+/*
+ * This file is part of INAV Project.
+ *
+ * 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 .
+ */
+
+#pragma once
+
+#define TARGET_BOARD_IDENTIFIER "SPDX722"
+
+#define USBD_PRODUCT_STRING "SPEDIXF722"
+
+#define LED0 PC14
+
+#define BEEPER PC15
+#define BEEPER_INVERTED
+
+// *************** Gyro & ACC **********************
+#define USE_SPI
+#define USE_SPI_DEVICE_1
+
+#define SPI1_NSS_PIN PA4
+#define SPI1_SCK_PIN PA5
+#define SPI1_MISO_PIN PA6
+#define SPI1_MOSI_PIN PA7
+
+
+#define USE_IMU_MPU6000
+#define IMU_MPU6000_ALIGN CW0_DEG
+#define MPU6000_CS_PIN SPI1_NSS_PIN
+#define MPU6000_SPI_BUS BUS_SPI1
+
+#define USE_IMU_BMI270
+#define IMU_BMI270_ALIGN CW0_DEG
+#define BMI270_CS_PIN SPI1_NSS_PIN
+#define BMI270_SPI_BUS BUS_SPI1
+
+#define USE_IMU_ICM42605
+#define IMU_ICM42605_ALIGN CW0_DEG
+#define ICM42605_CS_PIN SPI1_NSS_PIN
+#define ICM42605_SPI_BUS BUS_SPI1
+
+// *************** I2C/Baro/Mag *********************
+#define USE_I2C
+#define USE_I2C_DEVICE_1
+#define I2C1_SCL PB8
+#define I2C1_SDA PB9
+
+#define DEFAULT_I2C_BUS BUS_I2C1
+
+#define USE_BARO
+#define BARO_I2C_BUS DEFAULT_I2C_BUS
+#define USE_BARO_DPS310
+
+#define USE_MAG
+#define MAG_I2C_BUS DEFAULT_I2C_BUS
+#define USE_MAG_ALL
+
+#define TEMPERATURE_I2C_BUS DEFAULT_I2C_BUS
+
+#define PITOT_I2C_BUS DEFAULT_I2C_BUS
+
+#define USE_RANGEFINDER
+#define RANGEFINDER_I2C_BUS DEFAULT_I2C_BUS
+
+// *************** FLASH **************************
+#define USE_SPI_DEVICE_3
+#define SPI3_NSS_PIN PA15
+#define SPI3_SCK_PIN PC10
+#define SPI3_MISO_PIN PC11
+#define SPI3_MOSI_PIN PC12
+
+#define M25P16_CS_PIN SPI3_NSS_PIN
+#define M25P16_SPI_BUS BUS_SPI3
+#define USE_FLASHFS
+#define USE_FLASH_M25P16
+#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
+
+
+// *************** OSD *****************************
+#define USE_SPI_DEVICE_2
+#define SPI2_NSS_PIN PB12
+#define SPI2_SCK_PIN PB13
+#define SPI2_MISO_PIN PB14
+#define SPI2_MOSI_PIN PB15
+
+#define USE_MAX7456
+#define MAX7456_SPI_BUS BUS_SPI2
+#define MAX7456_CS_PIN SPI2_NSS_PIN
+
+// *************** UART *****************************
+#define USE_VCP
+
+#define USE_UART1
+#define UART1_RX_PIN PA10
+#define UART1_TX_PIN PA9
+
+#define USE_UART2
+#define UART2_RX_PIN PA3
+#define UART2_TX_PIN PA2
+
+#define USE_UART3
+#define UART3_RX_PIN PB11
+#define UART3_TX_PIN PB10
+
+#define USE_UART4
+#define UART4_RX_PIN PA1
+#define UART4_TX_PIN PA0
+
+#define USE_UART5
+#define UART5_RX_PIN PD2
+#define UART5_TX_PIN NONE
+
+#define USE_UART6
+#define UART6_RX_PIN PC7
+#define UART6_TX_PIN PC6
+
+#define SERIAL_PORT_COUNT 7
+
+#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
+#define SERIALRX_PROVIDER SERIALRX_SBUS
+#define SERIALRX_UART SERIAL_PORT_USART2
+
+// *************** ADC *****************************
+#define USE_ADC
+#define ADC_INSTANCE ADC1
+#define ADC1_DMA_STREAM DMA2_Stream0
+#define ADC_CHANNEL_1_PIN PC2
+#define ADC_CHANNEL_2_PIN PC1
+
+#define VBAT_ADC_CHANNEL ADC_CHN_1
+#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
+
+
+#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_CURRENT_METER | FEATURE_TELEMETRY | FEATURE_VBAT | FEATURE_OSD | FEATURE_BLACKBOX)
+// *************** PINIO ************************
+#define USE_PINIO
+#define USE_PINIOBOX
+#define PINIO1_PIN PC13
+
+// *************** LEDSTRIP ************************
+#define USE_LED_STRIP
+#define WS2811_PIN PA8
+
+#define USE_SERIAL_4WAY_BLHELI_INTERFACE
+
+#define TARGET_IO_PORTA 0xffff
+#define TARGET_IO_PORTB 0xffff
+#define TARGET_IO_PORTC 0xffff
+#define TARGET_IO_PORTD (BIT(2))
+
+#define MAX_PWM_OUTPUT_PORTS 8
+
+#define USE_DSHOT
+#define USE_ESC_SENSOR
From 0af8705b15b9d776778121da07e500dd4afc421d Mon Sep 17 00:00:00 2001
From: Vincent Poon
Date: Mon, 4 Dec 2023 11:31:58 +0800
Subject: [PATCH 59/61] Add ICM42688 to Kakutef7miniv3 target.h
Holybro will use ICM42688 to replace MPU6000 on this board.
---
src/main/target/KAKUTEF7MINIV3/target.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/main/target/KAKUTEF7MINIV3/target.h b/src/main/target/KAKUTEF7MINIV3/target.h
index 997cad1a97..bf485ebc82 100644
--- a/src/main/target/KAKUTEF7MINIV3/target.h
+++ b/src/main/target/KAKUTEF7MINIV3/target.h
@@ -88,6 +88,13 @@
#define MPU6000_SPI_BUS BUS_SPI1
#define MPU6000_CS_PIN PB2
+// ICM42688
+#define USE_IMU_ICM42605
+#define IMU_ICM42605_ALIGN CW270_DEG
+#define ICM42605_SPI_BUS BUS_SPI1
+#define ICM42605_CS_PIN PB2
+#define ICM42605_EXTI_PIN PA4
+
/*
* Blackbox Onboard Flash
*/
From 2eac713aa4384c32d9574a9bb20fc80a783f04d3 Mon Sep 17 00:00:00 2001
From: Marcelo Bezerra <23555060+mmosca@users.noreply.github.com>
Date: Wed, 6 Dec 2023 00:06:45 +0100
Subject: [PATCH 60/61] Add VTX power info
---
docs/boards/MAMBAH743_2022B.md | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 docs/boards/MAMBAH743_2022B.md
diff --git a/docs/boards/MAMBAH743_2022B.md b/docs/boards/MAMBAH743_2022B.md
new file mode 100644
index 0000000000..688c630cb8
--- /dev/null
+++ b/docs/boards/MAMBAH743_2022B.md
@@ -0,0 +1,5 @@
+# VTX Power SWITCH
+
+Contrary to what the documentation suggests, VTX power is actually on USER2.
+
+
From d1ac51fa1a0fd598f10a6dd9b23f943685bc78c9 Mon Sep 17 00:00:00 2001
From: "Pawel Spychalski (DzikuVx)"
Date: Wed, 6 Dec 2023 13:57:28 +0100
Subject: [PATCH 61/61] Kakute F4 V2.4
---
src/main/target/KAKUTEF4/CMakeLists.txt | 3 ++-
src/main/target/KAKUTEF4/target.c | 12 ++++++------
src/main/target/KAKUTEF4/target.h | 18 +++++++++++-------
3 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/src/main/target/KAKUTEF4/CMakeLists.txt b/src/main/target/KAKUTEF4/CMakeLists.txt
index ae1ba2a46a..caf084129b 100644
--- a/src/main/target/KAKUTEF4/CMakeLists.txt
+++ b/src/main/target/KAKUTEF4/CMakeLists.txt
@@ -1,3 +1,4 @@
target_stm32f405xg(KAKUTEF4)
target_stm32f405xg(KAKUTEF4V2)
-target_stm32f405xg(KAKUTEF4V23)
\ No newline at end of file
+target_stm32f405xg(KAKUTEF4V23)
+target_stm32f405xg(KAKUTEF4V24)
\ No newline at end of file
diff --git a/src/main/target/KAKUTEF4/target.c b/src/main/target/KAKUTEF4/target.c
index ba47d09ffe..758dfa8b1b 100755
--- a/src/main/target/KAKUTEF4/target.c
+++ b/src/main/target/KAKUTEF4/target.c
@@ -34,21 +34,21 @@ timerHardware_t timerHardware[] = {
DEF_TIM(TIM3, CH3, PB0, TIM_USE_OUTPUT_AUTO, 0, 0), // S1_OUT - DMA1_ST7
DEF_TIM(TIM3, CH4, PB1, TIM_USE_OUTPUT_AUTO, 0, 0), // S2_OUT - DMA1_ST2
DEF_TIM(TIM2, CH4, PA3, TIM_USE_OUTPUT_AUTO, 0, 1), // S3_OUT - DMA1_ST6
-#if !defined(KAKUTEF4V23)
- DEF_TIM(TIM5, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0), // S4_OUT - DMA1_ST1
-#else
- DEF_TIM(TIM5, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0), // S4_OUT - DMA1_ST1
+#if defined(KAKUTEF4V23) || defined(KAKUTEF4V24)
+ DEF_TIM(TIM5, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0), // S4_OUT - DMA1_ST1
DEF_TIM(TIM4, CH1, PB6, TIM_USE_OUTPUT_AUTO, 0, 0), // S5_OUT - DMA1_ST0
DEF_TIM(TIM4, CH2, PB7, TIM_USE_OUTPUT_AUTO, 0, 0), // S6_OUT - DMA1_ST3
+#else
+ DEF_TIM(TIM5, CH3, PA2, TIM_USE_OUTPUT_AUTO, 0, 0), // S4_OUT - DMA1_ST1
#endif
-#if defined(KAKUTEF4V2) || defined(KAKUTEF4V23)
+#if defined(KAKUTEF4V2) || defined(KAKUTEF4V23) || defined(KAKUTEF4V24)
DEF_TIM(TIM8, CH3, PC8, TIM_USE_LED, 0, 0), // LED_STRIP - DMA2_ST2
#else
DEF_TIM(TIM5, CH1, PA0, TIM_USE_OUTPUT_AUTO, 0, 0), // S5_OUT - DMA1_ST2
DEF_TIM(TIM8, CH3, PC8, TIM_USE_OUTPUT_AUTO, 0, 1), // S6_OUT - DMA2_ST4
- DEF_TIM(TIM5, CH2, PA1, TIM_USE_LED, 0, 0), // LED_STRIP - DMA1_ST4
+ DEF_TIM(TIM5, CH2, PA1, TIM_USE_LED, 0, 0), // LED_STRIP - DMA1_ST4
#endif
};
diff --git a/src/main/target/KAKUTEF4/target.h b/src/main/target/KAKUTEF4/target.h
index 1895b4b7e7..bc921c9f3f 100644
--- a/src/main/target/KAKUTEF4/target.h
+++ b/src/main/target/KAKUTEF4/target.h
@@ -29,6 +29,9 @@
#elif defined(KAKUTEF4V23)
# define TARGET_BOARD_IDENTIFIER "KT23"
# define USBD_PRODUCT_STRING "KakuteF4-V2.3"
+#elif defined(KAKUTEF4V24)
+# define TARGET_BOARD_IDENTIFIER "KT24"
+# define USBD_PRODUCT_STRING "KakuteF4-V2.4"
#else
# define TARGET_BOARD_IDENTIFIER "KTV1"
# define USBD_PRODUCT_STRING "KakuteF4-V1"
@@ -37,7 +40,7 @@
#define LED0 PB5
#define LED1 PB4
-#if !defined(KAKUTEF4V23)
+#if defined(KAKUTEF4) || defined(KAKUTEF4V2)
# define LED2 PB6
#endif
@@ -54,7 +57,7 @@
#define MPU6000_CS_PIN PC4
#define MPU6000_SPI_BUS BUS_SPI1
-#if defined(KAKUTEF4V2) || defined(KAKUTEF4V23)
+#if defined(KAKUTEF4V2) || defined(KAKUTEF4V23) || defined(KAKUTEF4V24)
# define USE_I2C
# define USE_I2C_DEVICE_1
# define I2C1_SCL PB8 // SCL pad
@@ -79,11 +82,12 @@
#define MAX7456_SPI_BUS BUS_SPI3
#define MAX7456_CS_PIN PB14
+#define USE_FLASHFS
+
+#define USE_FLASH_M25P16
#define M25P16_CS_PIN PB3
#define M25P16_SPI_BUS BUS_SPI3
-
-#define USE_FLASHFS
-#define USE_FLASH_M25P16
+#define ENABLE_BLACKBOX_LOGGING_ON_SPIFLASH_BY_DEFAULT
#define USB_IO
#define USE_VCP
@@ -105,7 +109,7 @@
#define UART6_RX_PIN PC7
#define UART6_TX_PIN PC6
-#if defined(KAKUTEF4V2) || defined(KAKUTEF4V23)
+#if defined(KAKUTEF4V2) || defined(KAKUTEF4V23) || defined(KAKUTEF4V24)
# define USE_UART4
# define UART4_RX_PIN PA1
# define UART4_TX_PIN PA0
@@ -153,7 +157,7 @@
#define CURRENT_METER_ADC_CHANNEL ADC_CHN_2
#define RSSI_ADC_CHANNEL ADC_CHN_3
-#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_TELEMETRY | FEATURE_OSD)
+#define DEFAULT_FEATURES (FEATURE_TX_PROF_SEL | FEATURE_TELEMETRY | FEATURE_OSD | FEATURE_BLACKBOX)
#define DEFAULT_RX_TYPE RX_TYPE_SERIAL
#define SERIALRX_PROVIDER SERIALRX_SBUS
#define SERIALRX_UART SERIAL_PORT_USART3