AP_Generator: 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 5488ca6403
commit 9213eef56c
2 changed files with 2 additions and 1 deletions

View File

@ -30,6 +30,8 @@ extern const AP_HAL::HAL& hal;
// init method; configure communications with the generator
void AP_Generator_RichenPower::init()
{
ASSERT_STORAGE_SIZE(RichenPacket, 70);
const AP_SerialManager &serial_manager = AP::serialmanager();
uart = serial_manager.find_serial(AP_SerialManager::SerialProtocol_Generator, 0);

View File

@ -153,7 +153,6 @@ private:
uint8_t footermagic1;
uint8_t footermagic2;
};
assert_storage_size<RichenPacket, 70> _assert_storage_size_RichenPacket UNUSED_PRIVATE_MEMBER;
union RichenUnion {
uint8_t parse_buffer[70];