fix: Do not display 0 Err when when info is unavailable (#3890)

* fix: unsuported %zu in arm compiler

* fix: do not display 0 Err when when info is unavailable
This commit is contained in:
3djc
2023-08-03 14:41:13 +10:00
committed by GitHub
parent c6503a77c7
commit 490fb951f8
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ InputMixGroup::InputMixGroup(Window* parent, mixsrc_t idx) :
if (idx >= MIXSRC_FIRST_CH && idx <= MIXSRC_LAST_CH
&& g_model.limitData[idx - MIXSRC_FIRST_CH].name[0] != '\0') {
chText = lv_label_create(lvobj);
lv_label_set_text_fmt(chText, TR_CH "%zu", (size_t)(idx - MIXSRC_FIRST_CH + 1));
lv_label_set_text_fmt(chText, TR_CH "%" PRIu32, UINT32_C(idx - MIXSRC_FIRST_CH + 1));
lv_obj_set_style_text_font(chText, getFont(FONT(XS)), 0);
#if LCD_H > LCD_W
lv_obj_set_style_pad_bottom(chText, -2, 0);
@@ -162,8 +162,8 @@ void menuRadioModulesVersion(event_t event)
#if defined(CROSSFIRE)
if (isModuleCrossfire(module)) {
char statusText[64] = "";
sprintf(statusText, "%d Hz %zu Err",
1000000 / getMixerSchedulerPeriod(), (size_t)0/*telemetryErrors*/);
sprintf(statusText, "%d Hz"/* %" PRIu32" Err"*/,
1000000 / getMixerSchedulerPeriod()/*, UINT32_C(telemetryErrors)*/);
lcdDrawText(COLUMN2_X, y, statusText);
y += FH;
continue;