Skip to content

Commit

Permalink
Flex: Fix HTA double segment issue
Browse files Browse the repository at this point in the history
  • Loading branch information
abonnaudet-ledger committed Apr 26, 2024
1 parent a3b340f commit a34447f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib_nbgl/src/nbgl_layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,11 @@ static uint8_t nbTouchableControls = 0;

static inline uint8_t get_hold_to_approve_percent(uint32_t touch_duration)
{
#ifdef HAVE_DISPLAY_FAST_MODE
uint8_t current_step_nb = (touch_duration / HOLD_TO_APPROVE_STEP_DURATION_MS);
#else
uint8_t current_step_nb = (touch_duration / HOLD_TO_APPROVE_STEP_DURATION_MS) + 1;
#endif
return (current_step_nb * HOLD_TO_APPROVE_STEP_PERCENT);
}

Expand Down

0 comments on commit a34447f

Please sign in to comment.