summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/displayapp/screens/Motion.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/displayapp/screens/Motion.cpp b/src/displayapp/screens/Motion.cpp
index 73ff524..b9d5ab9 100644
--- a/src/displayapp/screens/Motion.cpp
+++ b/src/displayapp/screens/Motion.cpp
@@ -151,8 +151,8 @@ void Motion::Refresh() {
uint16_t G_uint16 = G < 0xffff ? G : 0xffff;
#ifdef JUMPSCORE_ICON
lv_obj_set_style_local_bg_color(icon, LV_LABEL_PART_MAIN, LV_STATE_DEFAULT, color);
- if (jumping) {
- lv_obj_set_size(icon, 20, 20 - G_uint16 / 200);
+ if (G_uint16 < 1000) {
+ lv_obj_set_size(icon, 20, 21 - G_uint16 / 50);
lv_obj_align(icon, bar, LV_ALIGN_OUT_RIGHT_BOTTOM, 0,
best_jump_length > 0 ?
current_jump_length > best_jump_length ?
@@ -160,7 +160,7 @@ void Motion::Refresh() {
: 0
);
} else {
- lv_obj_set_size(icon, 20, G_uint16 / 200 - 20);
+ lv_obj_set_size(icon, 20, G_uint16 / 50 - 19);
lv_obj_align(icon, bar, LV_ALIGN_OUT_RIGHT_TOP, 0, 200);
}
#endif
@@ -176,7 +176,9 @@ void Motion::Refresh() {
if (new_record) {
uint32_t a = (best_jump_length*100000.0);
lv_label_set_text_fmt(recordLabel, "%d.%03d", a/1000, a%1000);
- motorController.RunForDuration(35);
+ if (best_jump_length > 0.03) {
+ motorController.RunForDuration(35);
+ }
}
if (last_jump_length > 0) {
uint32_t a = (last_jump_length*100000.0);