GCS_MAVLink: add ASSERT_STORAGE_SIZE macro

saves havin gto name the dummy variable yourself
This commit is contained in:
Peter Barker 2023-12-14 10:20:16 +11:00 committed by Peter Barker
parent b0f7f84f4f
commit cedcd190fc
1 changed files with 6 additions and 6 deletions

View File

@ -25,16 +25,16 @@
extern const AP_HAL::HAL& hal; extern const AP_HAL::HAL& hal;
// if this assert fails then fix it and the comment in GCS.h where
// _statustext_queue is declared
#if CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
assert_storage_size<GCS::statustext_t, 58> _assert_statustext_t_size;
#endif
void GCS::get_sensor_status_flags(uint32_t &present, void GCS::get_sensor_status_flags(uint32_t &present,
uint32_t &enabled, uint32_t &enabled,
uint32_t &health) uint32_t &health)
{ {
// if this assert fails then fix it and the comment in GCS.h where
// _statustext_queue is declared
#if CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
ASSERT_STORAGE_SIZE(GCS::statustext_t, 58);
#endif
update_sensor_status_flags(); update_sensor_status_flags();
present = control_sensors_present; present = control_sensors_present;