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/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 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; } } 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