summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/displayapp/screens/Motion.cpp6
-rw-r--r--src/displayapp/screens/Motion.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/displayapp/screens/Motion.cpp b/src/displayapp/screens/Motion.cpp
index 2acfbae..601fbbf 100644
--- a/src/displayapp/screens/Motion.cpp
+++ b/src/displayapp/screens/Motion.cpp
@@ -72,9 +72,9 @@ void Motion::Refresh() {
double G = motionController.GXYZ(X,Y,Z);
// lv_chart_set_next(chart, ser2, motionController.Y());
// lv_chart_set_next(chart, ser3, motionController.Z());
- uint16_t current_time = xTaskGetTickCount();
+ TickType_t current_time = xTaskGetTickCount();
if (started) {
- uint16_t current_frame_ms = current_time - last_frame_time;
+ TickType_t current_frame_ms = current_time - last_frame_time;
double G_scaled = G * G_SCALE;
if (G_scaled < 1) {
if (!jumping) {
@@ -105,7 +105,7 @@ void Motion::Refresh() {
}
last_frame_time = current_time;
if (started) {
- if (current_time - last_redraw_frame_time < REDRAW_FRAME_TICKS) { return; }
+ if (((TickType_t)(current_time - last_redraw_frame_time)) < REDRAW_FRAME_TICKS) { return; }
} else {
started = true;
}
diff --git a/src/displayapp/screens/Motion.h b/src/displayapp/screens/Motion.h
index 249d296..2554ffd 100644
--- a/src/displayapp/screens/Motion.h
+++ b/src/displayapp/screens/Motion.h
@@ -25,8 +25,8 @@ namespace Pinetime {
// bool calibrating = true;
bool started = false;
bool jumping = false;
- uint16_t last_frame_time = 0;
- uint16_t last_redraw_frame_time = 0;
+ TickType_t last_frame_time = 0;
+ TickType_t last_redraw_frame_time = 0;
// uint8_t dropped_frames = 0;
double current_jump_length;
double current_jump_speed;