Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apps/examples/pwfb : fix compiling error #1902

Merged
merged 1 commit into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions examples/pwfb/pwfb_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ static void pwfb_tb_position(NXTKWINDOW hwnd,
FAR void *arg)
{
#ifdef CONFIG_EXAMPLES_PWFB_VERBOSE
FAR struct nxeg_state_s *st = (FAR struct nxeg_state_s *)arg;

/* Report the position */

printf("pwfb_tb_position: hwnd=%p size=(%d,%d) pos=(%d,%d) "
Expand Down
12 changes: 8 additions & 4 deletions examples/pwfb/pwfb_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@

#ifndef CONFIG_EXAMPLES_PWFB_COLOR3
# if CONFIG_EXAMPLES_PWFB_BPP == 24 || CONFIG_EXAMPLES_PWFB_BPP == 32
# define CONFIG_EXAMPLES_PWFB_COLOR2 0x00ffecb3
# define CONFIG_EXAMPLES_PWFB_COLOR3 0x00ffecb3
# elif CONFIG_EXAMPLES_PWFB_BPP == 16
# define CONFIG_EXAMPLES_PWFB_COLOR2 0xff76
# define CONFIG_EXAMPLES_PWFB_COLOR3 0xff76
# else
# define CONFIG_EXAMPLES_PWFB_COLOR2 '3'
# endif
# define CONFIG_EXAMPLES_PWFB_COLOR3 '3'
# endif
#endif

#ifndef CONFIG_EXAMPLES_PWFB_TBCOLOR
Expand All @@ -142,6 +142,10 @@
# endif
#endif

#ifdef CONFIG_EXAMPLES_PWFB_DEFAULT_FONT
# define CONFIG_EXAMPLES_PWFB_FONTID FONTID_DEFAULT
#endif

/* Cursor timing */

#if CONFIG_EXAMPLES_PWFB_RATECONTROL > 0
Expand Down
9 changes: 5 additions & 4 deletions examples/pwfb/pwfb_motion.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static inline bool pwfb_move_cursor(FAR struct pwfb_state_s *st)
#ifdef CONFIG_EXAMPLES_PWFB_VERBOSE
printf("pwfb_move_cursor: State: %u countdown: %u blinktime: %u\n",
(unsigned int)st->cursor.state, (unsigned int)st->cursor.countdown,
(unsigned int)st->cursor.blinktime;
(unsigned int)st->cursor.blinktime);
printf("pwfb_move_cursor: Velocity: (%lx.%04lx,%lx.%04lx)\n",
(unsigned long)st->cursor.deltax >> 16,
(unsigned long)st->cursor.deltax & 0xffff,
Expand All @@ -186,12 +186,13 @@ static inline bool pwfb_move_cursor(FAR struct pwfb_state_s *st)
#endif

/* Handle the update based on cursor state */

/* If the state is not PFWB_CURSOR_STATIONARY, then update the cursor
* position.
*/

if (st->cursor.state != PFWB_CURSOR_STATIONARY)
{
if (st->cursor.state != PFWB_CURSOR_STATIONARY)
{
/* Update X position */

newx = st->cursor.xpos + st->cursor.deltax;
Expand Down Expand Up @@ -258,7 +259,7 @@ static inline bool pwfb_move_cursor(FAR struct pwfb_state_s *st)

return false;
}
}
}

/* Check for state changes */

Expand Down
Loading