Skip to content

Commit

Permalink
Dim displayed speed with 1 second of ESC inactivity
Browse files Browse the repository at this point in the history
  • Loading branch information
r3n33 committed Oct 8, 2021
1 parent b6d9d1e commit 7b41bac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ TickType_t drawScreenPrimary(TFT_t * dev, FontxFile *fx, int width, int height,
// Wrap Speed if triple digits
if (speed_now > 99) speed_now -= 100;
// Check if ESC is responding
bool is_esc_responding = (xTaskGetTickCount() - esc_last_responded)*portTICK_RATE_MS < 10 * 1000;
bool is_esc_responding = (xTaskGetTickCount() - esc_last_responded)*portTICK_RATE_MS < 1000;
// Update only when changing or esc starts/stops responding
if (speed_now != speed_now_previous || is_esc_responding != was_esc_responding)
{
Expand Down

0 comments on commit 7b41bac

Please sign in to comment.