Skip to content

Commit

Permalink
Rename HAVE_DISPLAY_FAST_MODE define
Browse files Browse the repository at this point in the history
HAVE_DISPLAY_FAST_MODE define collided with a define on OS side.
  • Loading branch information
abonnaudet-ledger committed Jun 7, 2024
1 parent d51bc0a commit 08dc991
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile.defines
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ DEFINES += HAVE_SE_EINK_DISPLAY
DEFINES += NBGL_PAGE
DEFINES += NBGL_USE_CASE
DEFINES += SCREEN_SIZE_WALLET
DEFINES += HAVE_DISPLAY_FAST_MODE
DEFINES += HAVE_FAST_HOLD_TO_APPROVE
endif # TARGET_FLEX

# For other devices, by default NBGL is not used
Expand Down
6 changes: 3 additions & 3 deletions lib_nbgl/src/nbgl_layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ static uint8_t nbTouchableControls = 0;
* STATIC PROTOTYPES
**********************/

#ifdef HAVE_DISPLAY_FAST_MODE
#ifdef HAVE_FAST_HOLD_TO_APPROVE
// Unit step in % of touchable progress bar
#define HOLD_TO_APPROVE_STEP_PERCENT (7)
// Duration in ms the user must hold the progress bar
Expand All @@ -124,11 +124,11 @@ static uint8_t nbTouchableControls = 0;
#else
#define HOLD_TO_APPROVE_STEP_PERCENT (25)
#define HOLD_TO_APPROVE_STEP_DURATION_MS (400)
#endif // HAVE_DISPLAY_FAST_MODE
#endif // HAVE_FAST_HOLD_TO_APPROVE

static inline uint8_t get_hold_to_approve_percent(uint32_t touch_duration)
{
#ifdef HAVE_DISPLAY_FAST_MODE
#ifdef HAVE_FAST_HOLD_TO_APPROVE
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;
Expand Down

0 comments on commit 08dc991

Please sign in to comment.