AP_Notify: add static asserts for array size

We index into these arrays so ensuring their size is worthwhile
This commit is contained in:
Peter Barker 2019-07-05 15:39:18 +10:00 committed by Andrew Tridgell
parent ee3fcf49c6
commit 5010de9560

View File

@ -316,6 +316,12 @@ static const uint8_t _font[] = {
#endif
};
#ifdef AP_NOTIFY_DISPLAY_USE_EMOJI
static_assert(ARRAY_SIZE(_font) == 1280, "_font is correct size");
#else
static_assert(ARRAY_SIZE(_font) == 475, "_font is correct size");
#endif
bool Display::init(void)
{
// exit immediately if already initialised