cederom commented on code in PR #2926:
URL: https://github.com/apache/nuttx-apps/pull/2926#discussion_r1901439623


##########
examples/xbc_test/xbc_test_main.c:
##########
@@ -122,24 +111,33 @@ int main(int argc, FAR char *argv[])
             {
               /* On success, echo the buffer to stdout */
 
-             printf("%d bytes read\n", nbytes);
-             if (nbytes == sizeof(struct xbox_controller_buttonstate_s))
-               {
-                 struct xbox_controller_buttonstate_s *rpt = (struct 
xbox_controller_buttonstate_s*)buffer;
-                 printf("guide: %d  sync: %d  start: %d  back: %d  a: %d  b: 
%d  x: %d  y: %d\n",
-                        rpt->guide, rpt->sync, rpt->start, rpt->back, rpt->a, 
rpt->b, rpt->x, rpt->y);
-                 printf("dpad_u: %d  d: %d  l: %d  r: %d  bump_l: %d  r: %d  
stick_l: %d  r: %d\n",
-                        rpt->dpad_up, rpt->dpad_down, rpt->dpad_left, 
rpt->dpad_right,
-                        rpt->bumper_left, rpt->bumper_right, 
rpt->stick_click_left, rpt->stick_click_right);
-                 printf("stick_left_x: %d  y: %d  right_x: %d  y: %d  
trigger_l: %d  r: %d\n",
-                        rpt->stick_left_x, rpt->stick_left_y, 
rpt->stick_right_x, rpt->stick_right_y,
-                        rpt->trigger_left, rpt->trigger_right);
-               }
-           }
+              printf("%d bytes read\n", nbytes);

Review Comment:
   Thanks @xiaoxiang781216 some people have reeaaally crazy explanations for 
this :D



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to