This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new b2d5d3f51 apps/examples/pwfb : fix compiling error
b2d5d3f51 is described below

commit b2d5d3f51c9d5401a51623f9551a000451db8ef3
Author: YanXiaowei <[email protected]>
AuthorDate: Mon Apr 10 14:18:42 2023 +0800

    apps/examples/pwfb : fix compiling error
    
    fix compiling warning and error when CONFIG_NX=y, EXAMPLES_PWFB=y and 
EXAMPLES_PWFB_DEFAULT_FONT=y
    fix CI-Precheck for pwfb_motion.c
    
    Signed-off-by: YanXiaowei <[email protected]>
---
 examples/pwfb/pwfb_events.c   |  2 --
 examples/pwfb/pwfb_internal.h | 12 ++++++++----
 examples/pwfb/pwfb_motion.c   |  9 +++++----
 3 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/examples/pwfb/pwfb_events.c b/examples/pwfb/pwfb_events.c
index 0dcdfbafd..6f4441ccf 100644
--- a/examples/pwfb/pwfb_events.c
+++ b/examples/pwfb/pwfb_events.c
@@ -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) "
diff --git a/examples/pwfb/pwfb_internal.h b/examples/pwfb/pwfb_internal.h
index c29e2da8d..8882009e5 100644
--- a/examples/pwfb/pwfb_internal.h
+++ b/examples/pwfb/pwfb_internal.h
@@ -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
@@ -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
diff --git a/examples/pwfb/pwfb_motion.c b/examples/pwfb/pwfb_motion.c
index b2578ab12..a44cae4ff 100644
--- a/examples/pwfb/pwfb_motion.c
+++ b/examples/pwfb/pwfb_motion.c
@@ -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,
@@ -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;
@@ -258,7 +259,7 @@ static inline bool pwfb_move_cursor(FAR struct pwfb_state_s 
*st)
 
           return false;
         }
-   }
+    }
 
   /* Check for state changes */
 

Reply via email to