Skip to content

Commit 390008e

Browse files
rzeldentCopilot
andauthored
Update src/main.cpp
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ffcba62 commit 390008e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -596,10 +596,10 @@ void display_flights()
596596
auto latLonRange = iotWebParamMetric.value()
597597
? "lat: " + String(iotWebParamLatitudeRange.value() * DEGREES_TO_KM) +
598598
" / lon: " + String(iotWebParamLongitudeRange.value() * DEGREES_TO_KM) + " km"
599-
: "lat: " + String(iotWebParamLatitudeRange.value() * DEGREES_TO_MI) +
600-
" / lon: " + String(iotWebParamLongitudeRange.value() * DEGREES_TO_MI) + " mi";
601-
lv_label_set_text(label_latLonRange, latLonRange.c_str());
602-
lv_obj_align(label_latLonRange, LV_ALIGN_CENTER, 0, 16);
599+
auto label_lat_lon_range = lv_label_create(lv_scr_act());
600+
auto latLonRange = iotWebParamMetric.value() ? "lat: " + String(iotWebParamLatitudeRange.value() * DEGREES_TO_KM) + " / lon: " + String(iotWebParamLatitudeRange.value() * DEGREES_TO_KM) + " km" : "lat: " + String(iotWebParamLatitudeRange.value() * DEGREES_TO_MI) + " / lon: " + String(iotWebParamLatitudeRange.value() * DEGREES_TO_MI) + " mi";
601+
lv_label_set_text(label_lat_lon_range, latLonRange.c_str());
602+
lv_obj_align(label_lat_lon_range, LV_ALIGN_CENTER, 0, 16);
603603
auto label_location = lv_label_create(lv_scr_act());
604604
lv_label_set_text(label_location, iotWebParamLocation.value());
605605
lv_obj_align(label_location, LV_ALIGN_BOTTOM_MID, 0, -16);

0 commit comments

Comments
 (0)