diff options
Diffstat (limited to 'src/displayapp/screens/Motion.cpp')
| -rw-r--r-- | src/displayapp/screens/Motion.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/displayapp/screens/Motion.cpp b/src/displayapp/screens/Motion.cpp index ba25084..3ac9f73 100644 --- a/src/displayapp/screens/Motion.cpp +++ b/src/displayapp/screens/Motion.cpp @@ -113,15 +113,15 @@ void Motion::Refresh() { last_redraw_frame_time = current_time; uint16_t G_uint16 = G < 0xffff ? G : 0xffff; lv_chart_set_next(chart, ser1, 1000 - ((int16_t)G_uint16)); - labelText[4] = '0'+(G_uint16%10); G /= 10; - labelText[3] = '0'+(G_uint16%10); G /= 10; - labelText[2] = '0'+(G_uint16%10); G /= 10; - labelText[1] = '0'+(G_uint16%10); G /= 10; + labelText[4] = '0'+(G_uint16%10); G_uint16 /= 10; + labelText[3] = '0'+(G_uint16%10); G_uint16 /= 10; + labelText[2] = '0'+(G_uint16%10); G_uint16 /= 10; + labelText[1] = '0'+(G_uint16%10); G_uint16 /= 10; labelText[0] = '0'+G; G /= 10; lv_label_set_text_static(label, labelText); if (jump_started_or_ended) { if (new_record) { - lv_label_set_text_fmt(recordLabel, "%3.3f", current_jump_length); + lv_label_set_text_fmt(recordLabel, "%f", ((float)current_jump_length)); } lv_color_t color; if (jumping) { @@ -129,7 +129,7 @@ void Motion::Refresh() { } else { double best_jump_length = records[0].jump_length; if (current_jump_length * 100 > best_jump_length) { - lv_label_set_text_fmt(lastLabel, "%3.3f", current_jump_length); + lv_label_set_text_fmt(lastLabel, "%f", ((float)current_jump_length)); } color = LV_COLOR_ORANGE; } |
