From b1298262e1be09dc8b945b4340b02a39bc5b07bb Mon Sep 17 00:00:00 2001 From: Jay Blackman Date: Tue, 7 Jan 2025 11:27:38 +1100 Subject: [PATCH 1/3] FIX: Flash page size check is STM (or clone) specific (#14130) --- src/main/config/config_streamer.c | 4 ---- src/platform/common/stm32/config_flash.c | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/config/config_streamer.c b/src/main/config/config_streamer.c index d519d61b42..74961fb3c3 100644 --- a/src/main/config/config_streamer.c +++ b/src/main/config/config_streamer.c @@ -37,10 +37,6 @@ uint8_t eepromData[EEPROM_SIZE]; #endif #endif -#if !defined(FLASH_PAGE_SIZE) -#error "Flash page size not defined for target." -#endif - void config_streamer_init(config_streamer_t *c) { memset(c, 0, sizeof(*c)); diff --git a/src/platform/common/stm32/config_flash.c b/src/platform/common/stm32/config_flash.c index e1f6b484ed..c94fb082b1 100644 --- a/src/platform/common/stm32/config_flash.c +++ b/src/platform/common/stm32/config_flash.c @@ -27,6 +27,10 @@ #if defined(CONFIG_IN_FLASH) +#if !defined(FLASH_PAGE_SIZE) +#error "Flash page size not defined for STM (or clone) target." +#endif + #if defined(STM32F745xx) || defined(STM32F746xx) || defined(STM32F765xx) /* Sector 0 0x08000000 - 0x08007FFF 32 Kbytes From 4357ca36564455314604e50f747e223ee964f105 Mon Sep 17 00:00:00 2001 From: Jay Blackman Date: Wed, 8 Jan 2025 10:20:49 +1100 Subject: [PATCH 2/3] FIX: explicit specification of float (build for RPI) (#14132) --- src/main/flight/alt_hold_multirotor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/flight/alt_hold_multirotor.c b/src/main/flight/alt_hold_multirotor.c index 7c089cb165..e1547638f7 100644 --- a/src/main/flight/alt_hold_multirotor.c +++ b/src/main/flight/alt_hold_multirotor.c @@ -128,7 +128,7 @@ void altHoldUpdateTargetAltitude(void) // using maxVelocity means the stick can bring altitude target to current within 1s // this constrains the P and I response to user target changes, but not D of F responses // Range is compared to distance that might be traveled in one second - if (fabsf(getAltitudeCm() - altHold.targetAltitudeCm) < altHold.maxVelocity * 1.0 /* s */) { + if (fabsf(getAltitudeCm() - altHold.targetAltitudeCm) < altHold.maxVelocity * 1.0f /* s */) { altHold.targetAltitudeCm += altHold.targetVelocity * taskIntervalSeconds; } } From 67bb6f88b7d606846ec98efb43e1bbe9b70398f2 Mon Sep 17 00:00:00 2001 From: Jay Blackman Date: Wed, 8 Jan 2025 10:25:34 +1100 Subject: [PATCH 3/3] FIX: Adding init for SPIDEV_0 (#14134) --- src/main/fc/init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/fc/init.c b/src/main/fc/init.c index 67c21d7f20..e6e90800fe 100644 --- a/src/main/fc/init.c +++ b/src/main/fc/init.c @@ -211,6 +211,9 @@ static void configureSPIBusses(void) #ifdef USE_SPI spiPreinit(); +#ifdef USE_SPI_DEVICE_0 + spiInit(SPIDEV_0); +#endif #ifdef USE_SPI_DEVICE_1 spiInit(SPIDEV_1); #endif