Inav: Static assert fails during build if USE_RX_MSP and USE_MSP_RC_OVERRIDE is defined

Created on 10 Oct 2020  路  3Comments  路  Source: iNavFlight/inav

Current Behavior

_Static_assert fails if building with USE_RX_MSP and USE_MSP_RC_OVERRIDE defined

https://github.com/iNavFlight/inav/blob/master/src/main/cms/cms_menu_osd.c
Line 315

Steps to Reproduce

  1. Try to build any board with USE_RX_MSP and USE_MSP_RC_OVERRIDE defined

Expected behavior


This static assert should not fail

Suggested solution(s)


Update the assert to match the expected correct number of menu entries

  • FC Board name and vendor: KAKUTEF7
  • INAV version string: 2.6
BUG

Most helpful comment

Issue-Label Bot is automatically applying the label BUG to this issue, with a confidence of 0.90. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

All 3 comments

Issue-Label Bot is automatically applying the label BUG to this issue, with a confidence of 0.90. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

same issue, cant seem to figure out how to build now.... any pointers on a temp fix so i can build ;-;

Board: OBF4V3S

My suggestion for now would to update the assert.

https://github.com/iNavFlight/inav/blob/master/src/main/cms/cms_menu_osd.c
Line 315

_Static_assert(ARRAYLEN(menuOsdElemsEntries) - 2 + 1 == OSD_ITEM_COUNT, "missing OSD elements in CMS");

to something like this.

_Static_assert(ARRAYLEN(menuOsdElemsEntries) + 6 == OSD_ITEM_COUNT, "missing OSD elements in CMS");

Was this page helpful?
0 / 5 - 0 ratings