1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

Use ARRAYLEN macro where applicable

This commit is contained in:
Mathias Rasmussen 2021-12-28 21:54:26 +01:00 committed by KarateBrot
parent 8462dd1bea
commit 90e792e243
9 changed files with 19 additions and 13 deletions

View file

@ -108,7 +108,7 @@ typedef struct pageEntry_s {
} pageEntry_t;
static const char tickerCharacters[] = "|/-\\"; // use 2/4/8 characters so that the divide is optimal.
#define TICKER_CHARACTER_COUNT (sizeof(tickerCharacters) / sizeof(char))
#define TICKER_CHARACTER_COUNT ARRAYLEN(tickerCharacters)
typedef enum {
PAGE_STATE_FLAG_NONE = 0,
@ -364,7 +364,7 @@ static void showRateProfilePage(void)
i2c_OLED_send_string(dev, lineBuffer);
}
#define SATELLITE_COUNT (sizeof(GPS_svinfo_cno) / sizeof(GPS_svinfo_cno[0]))
#define SATELLITE_COUNT ARRAYLEN(GPS_svinfo_cno)
#define SATELLITE_GRAPH_LEFT_OFFSET ((SCREEN_CHARACTER_COLUMN_COUNT - SATELLITE_COUNT) / 2)
#ifdef USE_GPS