color: fix print format warnings
This commit is contained in:
@@ -311,7 +311,7 @@ ColorEditor::ColorEditor(FormGroup *window, const rect_t rect, uint32_t color,
|
|||||||
lv_label_set_text_static(barLabels[i], _colorType->getLabelChars()[i]);
|
lv_label_set_text_static(barLabels[i], _colorType->getLabelChars()[i]);
|
||||||
|
|
||||||
barValLabels[i] = create_bar_value_label(lvobj, x + 10, y + 3);
|
barValLabels[i] = create_bar_value_label(lvobj, x + 10, y + 3);
|
||||||
lv_label_set_text_fmt(barValLabels[i], "%d", bar->value);
|
lv_label_set_text_fmt(barValLabels[i], "%" PRIu32, bar->value);
|
||||||
}
|
}
|
||||||
|
|
||||||
lv_obj_add_event_cb(lvobj, ColorEditor::value_changed, LV_EVENT_VALUE_CHANGED, nullptr);
|
lv_obj_add_event_cb(lvobj, ColorEditor::value_changed, LV_EVENT_VALUE_CHANGED, nullptr);
|
||||||
@@ -336,7 +336,7 @@ void ColorEditor::setRGB()
|
|||||||
// update bars & labels
|
// update bars & labels
|
||||||
for (int i = 0; i < MAX_BARS; i++) {
|
for (int i = 0; i < MAX_BARS; i++) {
|
||||||
auto bar = _colorType->bars[i];
|
auto bar = _colorType->bars[i];
|
||||||
lv_label_set_text_fmt(barValLabels[i], "%d", bar->value);
|
lv_label_set_text_fmt(barValLabels[i], "%" PRIu32, bar->value);
|
||||||
bar->invalidate();
|
bar->invalidate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ struct MPMProtoOption : public FormGroup::Line
|
|||||||
Choice* choice;
|
Choice* choice;
|
||||||
NumberEdit* edit;
|
NumberEdit* edit;
|
||||||
CheckBox* cb;
|
CheckBox* cb;
|
||||||
DynamicNumber<int>* rssi;
|
DynamicNumber<uint16_t>* rssi;
|
||||||
|
|
||||||
MPMProtoOption(FormGroup* form, FlexGridLayout *layout);
|
MPMProtoOption(FormGroup* form, FlexGridLayout *layout);
|
||||||
void update(const MultiRfProtocols::RfProto* rfProto, ModuleData* md);
|
void update(const MultiRfProtocols::RfProto* rfProto, ModuleData* md);
|
||||||
@@ -51,8 +51,8 @@ MPMProtoOption::MPMProtoOption(FormGroup* form, FlexGridLayout *layout) :
|
|||||||
choice = new Choice(box, rect_t{}, 0, 0, nullptr);
|
choice = new Choice(box, rect_t{}, 0, 0, nullptr);
|
||||||
edit = new NumberEdit(box, rect_t{}, 0, 0, nullptr);
|
edit = new NumberEdit(box, rect_t{}, 0, 0, nullptr);
|
||||||
cb = new CheckBox(box, rect_t{}, nullptr, nullptr);
|
cb = new CheckBox(box, rect_t{}, nullptr, nullptr);
|
||||||
rssi = new DynamicNumber<int>(
|
rssi = new DynamicNumber<uint16_t>(
|
||||||
box, rect_t{}, [] { return (int)TELEMETRY_RSSI(); }, 0, "RSSI: ", " db");
|
box, rect_t{}, [] { return (uint16_t)TELEMETRY_RSSI(); }, 0, "RSSI: ", " db");
|
||||||
}
|
}
|
||||||
|
|
||||||
void MPMProtoOption::update(const MultiRfProtocols::RfProto* rfProto, ModuleData* md)
|
void MPMProtoOption::update(const MultiRfProtocols::RfProto* rfProto, ModuleData* md)
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ void DebugViewPage::build(FormWindow *window)
|
|||||||
// Free mem
|
// Free mem
|
||||||
new StaticText(window, grid.getLabelSlot(), STR_FREE_MEM_LABEL, 0,
|
new StaticText(window, grid.getLabelSlot(), STR_FREE_MEM_LABEL, 0,
|
||||||
COLOR_THEME_PRIMARY1);
|
COLOR_THEME_PRIMARY1);
|
||||||
new DynamicNumber<int>(
|
new DynamicNumber<int32_t>(
|
||||||
window, grid.getFieldSlot(), [] { return availableMemory(); },
|
window, grid.getFieldSlot(), [] { return availableMemory(); },
|
||||||
COLOR_THEME_PRIMARY1, nullptr, "b");
|
COLOR_THEME_PRIMARY1, nullptr, "b");
|
||||||
grid.nextLine();
|
grid.nextLine();
|
||||||
|
|||||||
Vendored
+1
-1
Submodule radio/src/thirdparty/libopenui updated: 321f769540...68573b9d9f
Reference in New Issue
Block a user