mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 12:55:19 +03:00
Fixed some comparion sign warnings in MAX macros
This commit is contained in:
parent
53920103d8
commit
c0961d7f4c
5 changed files with 6 additions and 6 deletions
|
@ -261,7 +261,7 @@ static void cmsPadToSize(char *buf, int size)
|
||||||
|
|
||||||
static int cmsDrawMenuEntry(displayPort_t *pDisplay, OSD_Entry *p, uint8_t row)
|
static int cmsDrawMenuEntry(displayPort_t *pDisplay, OSD_Entry *p, uint8_t row)
|
||||||
{
|
{
|
||||||
#define CMS_DRAW_BUFFER_LEN 10
|
#define CMS_DRAW_BUFFER_LEN 10u
|
||||||
char buff[CMS_DRAW_BUFFER_LEN];
|
char buff[CMS_DRAW_BUFFER_LEN];
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
|
|
||||||
|
|
|
@ -1924,7 +1924,7 @@ static void printName(uint8_t dumpMask, const pilotConfig_t *pilotConfig)
|
||||||
|
|
||||||
static void cliName(char *cmdline)
|
static void cliName(char *cmdline)
|
||||||
{
|
{
|
||||||
const uint32_t len = strlen(cmdline);
|
const int len = strlen(cmdline);
|
||||||
if (len > 0) {
|
if (len > 0) {
|
||||||
memset(pilotConfigMutable()->name, 0, ARRAYLEN(pilotConfig()->name));
|
memset(pilotConfigMutable()->name, 0, ARRAYLEN(pilotConfig()->name));
|
||||||
if (strncmp(cmdline, emptyName, len)) {
|
if (strncmp(cmdline, emptyName, len)) {
|
||||||
|
|
|
@ -928,7 +928,7 @@ static afatfsOperationStatus_e afatfs_cacheSector(uint32_t physicalSectorIndex,
|
||||||
if (eraseCount < AFATFS_MIN_MULTIPLE_BLOCK_WRITE_COUNT) {
|
if (eraseCount < AFATFS_MIN_MULTIPLE_BLOCK_WRITE_COUNT) {
|
||||||
eraseCount = 0;
|
eraseCount = 0;
|
||||||
} else {
|
} else {
|
||||||
eraseCount = MIN(eraseCount, UINT16_MAX); // If caller asked for a longer chain of sectors we silently truncate that here
|
eraseCount = MIN(eraseCount, (uint32_t)UINT16_MAX); // If caller asked for a longer chain of sectors we silently truncate that here
|
||||||
}
|
}
|
||||||
|
|
||||||
afatfs.cacheDescriptor[cacheSectorIndex].consecutiveEraseBlockCount = eraseCount;
|
afatfs.cacheDescriptor[cacheSectorIndex].consecutiveEraseBlockCount = eraseCount;
|
||||||
|
|
|
@ -366,7 +366,7 @@ static void showGpsPage()
|
||||||
i2c_OLED_set_xy(bus, 0, rowIndex);
|
i2c_OLED_set_xy(bus, 0, rowIndex);
|
||||||
i2c_OLED_send_char(bus, tickerCharacters[gpsTicker]);
|
i2c_OLED_send_char(bus, tickerCharacters[gpsTicker]);
|
||||||
|
|
||||||
i2c_OLED_set_xy(bus, MAX(0, SATELLITE_GRAPH_LEFT_OFFSET), rowIndex++);
|
i2c_OLED_set_xy(bus, MAX(0, (uint8_t)SATELLITE_GRAPH_LEFT_OFFSET), rowIndex++);
|
||||||
|
|
||||||
uint32_t index;
|
uint32_t index;
|
||||||
for (index = 0; index < SATELLITE_COUNT && index < SCREEN_CHARACTER_COLUMN_COUNT; index++) {
|
for (index = 0; index < SATELLITE_COUNT && index < SCREEN_CHARACTER_COLUMN_COUNT; index++) {
|
||||||
|
|
|
@ -166,10 +166,10 @@ void rescheduleTask(cfTaskId_e taskId, uint32_t newPeriodMicros)
|
||||||
{
|
{
|
||||||
if (taskId == TASK_SELF) {
|
if (taskId == TASK_SELF) {
|
||||||
cfTask_t *task = currentTask;
|
cfTask_t *task = currentTask;
|
||||||
task->desiredPeriod = MAX(SCHEDULER_DELAY_LIMIT, newPeriodMicros); // Limit delay to 100us (10 kHz) to prevent scheduler clogging
|
task->desiredPeriod = MAX(SCHEDULER_DELAY_LIMIT, (timeDelta_t)newPeriodMicros); // Limit delay to 100us (10 kHz) to prevent scheduler clogging
|
||||||
} else if (taskId < TASK_COUNT) {
|
} else if (taskId < TASK_COUNT) {
|
||||||
cfTask_t *task = &cfTasks[taskId];
|
cfTask_t *task = &cfTasks[taskId];
|
||||||
task->desiredPeriod = MAX(SCHEDULER_DELAY_LIMIT, newPeriodMicros); // Limit delay to 100us (10 kHz) to prevent scheduler clogging
|
task->desiredPeriod = MAX(SCHEDULER_DELAY_LIMIT, (timeDelta_t)newPeriodMicros); // Limit delay to 100us (10 kHz) to prevent scheduler clogging
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue