From d48579c7067e123c65bd3e82799831285b088cc4 Mon Sep 17 00:00:00 2001 From: Anders Hoglund Date: Thu, 2 Mar 2017 21:58:05 +0100 Subject: [PATCH 1/7] Fix Spektrum satellites stuck in bind mode. --- src/main/fc/fc_init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/fc/fc_init.c b/src/main/fc/fc_init.c index 797beabf3e..6c826ff5c0 100644 --- a/src/main/fc/fc_init.c +++ b/src/main/fc/fc_init.c @@ -238,6 +238,7 @@ void init(void) } #endif + #ifdef SPEKTRUM_BIND if (feature(FEATURE_RX_SERIAL)) { switch (rxConfig()->serialrx_provider) { @@ -250,6 +251,7 @@ void init(void) break; } } + delay(200); // Make sure the satellite times out and closes the bind window. (Delay(100) below is not enough and needed for non-sat configs) #endif delay(100); From 780257faebd4661371372de7f04abddedd49e0c7 Mon Sep 17 00:00:00 2001 From: mikeller Date: Wed, 1 Mar 2017 00:23:24 +1300 Subject: [PATCH 2/7] Added validation for Dterm notch filter settings. --- src/main/fc/config.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/fc/config.c b/src/main/fc/config.c index 425fd33fcc..8607595e7c 100755 --- a/src/main/fc/config.c +++ b/src/main/fc/config.c @@ -1216,6 +1216,11 @@ void validateAndFixConfig(void) resetSerialConfig(serialConfig); } + // Prevent invalid notch cutoff + if (currentProfile->pidProfile.dterm_notch_cutoff >= currentProfile->pidProfile.dterm_notch_hz) { + currentProfile->pidProfile.dterm_notch_hz = 0; + } + validateAndFixGyroConfig(); #if defined(TARGET_VALIDATECONFIG) From 7179d93f000e4922cddeb25d61259c20eba6c7b8 Mon Sep 17 00:00:00 2001 From: Hydra Date: Sun, 5 Mar 2017 00:58:27 +0000 Subject: [PATCH 3/7] CF/BF - Fix AK8975 mag detection that was broken in 196baa4e8715de8edd0ef0a8f0bd8c4d34ebf828. The bit to enable bypass mode was incorrect. --- src/main/drivers/accgyro_mpu6500.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/drivers/accgyro_mpu6500.h b/src/main/drivers/accgyro_mpu6500.h index 3cedd2027b..ec964956b4 100644 --- a/src/main/drivers/accgyro_mpu6500.h +++ b/src/main/drivers/accgyro_mpu6500.h @@ -23,9 +23,14 @@ #define ICM20602_WHO_AM_I_CONST (0x12) #define MPU6500_BIT_RESET (0x80) -#define MPU6500_BIT_INT_ANYRD_2CLEAR (1 << 4) -#define MPU6500_BIT_BYPASS_EN (1 << 0) -#define MPU6500_BIT_I2C_IF_DIS (1 << 4) + +// Register 0x37/55 - INT_PIN_CFG / Pin Bypass Enable Configuration +#define MPU6500_BIT_RESERVED 1 << 0 +#define MPU6500_BIT_BYPASS_EN 1 << 1 +#define MPU6500_BIT_INT_ANYRD_2CLEAR 1 << 4 + +// Register 0x6a/106 - USER_CTRL / User Control +#define MPU6500_BIT_I2C_IF_DIS 1 << 4 #define MPU6500_BIT_RAW_RDY_EN (0x01) bool mpu6500AccDetect(accDev_t *acc); From 89e31d29e0cca6b34ca7d6fd2e03eeeedcf85fa2 Mon Sep 17 00:00:00 2001 From: Dominic Clifton Date: Sat, 4 Mar 2017 22:42:19 +0000 Subject: [PATCH 4/7] CF/BF - SPRACINGF3EVO - remove the two #undefs to enable softserial, the serial port count was mismatched and causing duplicate serial ports to appear in the configurator. --- src/main/target/SPRACINGF3EVO/target.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/target/SPRACINGF3EVO/target.h b/src/main/target/SPRACINGF3EVO/target.h index 179b91af7b..f48058b61b 100755 --- a/src/main/target/SPRACINGF3EVO/target.h +++ b/src/main/target/SPRACINGF3EVO/target.h @@ -79,9 +79,6 @@ #define USE_ESCSERIAL #define ESCSERIAL_TIMER_TX_HARDWARE 0 // PWM 1 -#undef USE_SOFTSERIAL1 -#undef USE_SOFTSERIAL2 - #define UART1_TX_PIN PA9 #define UART1_RX_PIN PA10 From 81cfcc2ce7b609d5f4738b3ac0109fb5f3ef943d Mon Sep 17 00:00:00 2001 From: Hydra Date: Sun, 5 Mar 2017 11:01:51 +0000 Subject: [PATCH 5/7] CF/BF - Further MPU9250/AK8975 mag cleanup. --- src/main/drivers/accgyro_mpu6500.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/drivers/accgyro_mpu6500.h b/src/main/drivers/accgyro_mpu6500.h index ec964956b4..1617f9f2db 100644 --- a/src/main/drivers/accgyro_mpu6500.h +++ b/src/main/drivers/accgyro_mpu6500.h @@ -25,13 +25,15 @@ #define MPU6500_BIT_RESET (0x80) // Register 0x37/55 - INT_PIN_CFG / Pin Bypass Enable Configuration -#define MPU6500_BIT_RESERVED 1 << 0 -#define MPU6500_BIT_BYPASS_EN 1 << 1 -#define MPU6500_BIT_INT_ANYRD_2CLEAR 1 << 4 +#define MPU6500_BIT_RESERVED (1 << 0) +#define MPU6500_BIT_BYPASS_EN (1 << 1) +#define MPU6500_BIT_INT_ANYRD_2CLEAR (1 << 4) + +// Register 0x38/56 INT_ENABLE +#define MPU6500_BIT_RAW_RDY_EN (1 << 0) // Register 0x6a/106 - USER_CTRL / User Control -#define MPU6500_BIT_I2C_IF_DIS 1 << 4 -#define MPU6500_BIT_RAW_RDY_EN (0x01) +#define MPU6500_BIT_I2C_IF_DIS (1 << 4) bool mpu6500AccDetect(accDev_t *acc); bool mpu6500GyroDetect(gyroDev_t *gyro); From c97c717a1e16f9dc3cce11d8b057f4fa6aedd3de Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Tue, 7 Mar 2017 08:30:30 +1300 Subject: [PATCH 6/7] Removed SOFTSERIAL from SPRACINGF3 to make targets fit flash space. --- src/main/target/SPRACINGF3EVO/target.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/target/SPRACINGF3EVO/target.h b/src/main/target/SPRACINGF3EVO/target.h index f48058b61b..5a03c596e8 100755 --- a/src/main/target/SPRACINGF3EVO/target.h +++ b/src/main/target/SPRACINGF3EVO/target.h @@ -71,8 +71,9 @@ #define USE_UART1 #define USE_UART2 #define USE_UART3 -#define USE_SOFTSERIAL1 -#define USE_SOFTSERIAL2 +// Disabled to make targets fit into flash space in 3.1.7 +//#define USE_SOFTSERIAL1 +//#define USE_SOFTSERIAL2 #define SERIAL_PORT_COUNT 6 From 6a053cf6f9e33850a40b319a6790d63750f85e80 Mon Sep 17 00:00:00 2001 From: Michael Keller Date: Tue, 7 Mar 2017 09:32:58 +1300 Subject: [PATCH 7/7] Fixed SERIAL_PORT_COUNT for SPRACINGF3EVO. --- src/main/target/SPRACINGF3EVO/target.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/target/SPRACINGF3EVO/target.h b/src/main/target/SPRACINGF3EVO/target.h index 5a03c596e8..321a25c1eb 100755 --- a/src/main/target/SPRACINGF3EVO/target.h +++ b/src/main/target/SPRACINGF3EVO/target.h @@ -75,7 +75,8 @@ //#define USE_SOFTSERIAL1 //#define USE_SOFTSERIAL2 -#define SERIAL_PORT_COUNT 6 +//#define SERIAL_PORT_COUNT 6 +#define SERIAL_PORT_COUNT 4 #define USE_ESCSERIAL #define ESCSERIAL_TIMER_TX_HARDWARE 0 // PWM 1