diff --git a/libraries/AP_HAL/AP_HAL_Boards.h b/libraries/AP_HAL/AP_HAL_Boards.h index 26a47e2c8c..b5dddb89cb 100644 --- a/libraries/AP_HAL/AP_HAL_Boards.h +++ b/libraries/AP_HAL/AP_HAL_Boards.h @@ -385,4 +385,8 @@ #define HAL_WITH_POSTYPE_DOUBLE BOARD_FLASH_SIZE > 1024 #endif +#ifndef HAL_INS_RATE_LOOP +#define HAL_INS_RATE_LOOP 0 +#endif + #define HAL_GPIO_LED_OFF (!HAL_GPIO_LED_ON) diff --git a/libraries/AP_HAL/board/chibios.h b/libraries/AP_HAL/board/chibios.h index 9e5cd5911f..9c51ac58ea 100644 --- a/libraries/AP_HAL/board/chibios.h +++ b/libraries/AP_HAL/board/chibios.h @@ -140,3 +140,9 @@ #endif #define HAL_USE_QUADSPI (HAL_USE_QUADSPI1 || HAL_USE_QUADSPI2) #define HAL_USE_OCTOSPI (HAL_USE_OCTOSPI1 || HAL_USE_OCTOSPI2) + +#if defined(STM32H7) || defined(STM32F7) +#define HAL_INS_RATE_LOOP 1 +#else +#define HAL_INS_RATE_LOOP 0 +#endif diff --git a/libraries/AP_HAL/board/linux.h b/libraries/AP_HAL/board/linux.h index a7e6c3fc17..c55fec67e2 100644 --- a/libraries/AP_HAL/board/linux.h +++ b/libraries/AP_HAL/board/linux.h @@ -422,3 +422,7 @@ #else #define HAL_LINUX_USE_VIRTUAL_CAN 0 #endif + +#ifndef HAL_INS_RATE_LOOP +#define HAL_INS_RATE_LOOP 1 +#endif diff --git a/libraries/AP_HAL/board/sitl.h b/libraries/AP_HAL/board/sitl.h index 7738814898..e4d1afff91 100644 --- a/libraries/AP_HAL/board/sitl.h +++ b/libraries/AP_HAL/board/sitl.h @@ -96,3 +96,7 @@ #endif #define HAL_SOLO_GIMBAL_ENABLED 1 + +#ifndef HAL_INS_RATE_LOOP +#define HAL_INS_RATE_LOOP 1 +#endif