AP_Periph: add assert that AP_CHECK_FIRMWARE_ENABLED is set

This commit is contained in:
Peter Barker 2024-03-20 21:30:18 +11:00 committed by Andrew Tridgell
parent 0b7710420b
commit c450de6e96
1 changed files with 7 additions and 0 deletions

View File

@ -35,6 +35,13 @@
#define HAL_PERIPH_HWESC_SERIAL_PORT 3
#endif
// not only will the code not compile without features this enables,
// but it forms part of a series of measures to give a robust recovery
// mechanism on AP_Periph if a bad flash occurs.
#ifndef AP_CHECK_FIRMWARE_ENABLED
#error AP_CHECK_FIRMWARE_ENABLED must be enabled
#endif
extern const AP_HAL::HAL &hal;
AP_Periph_FW periph;