Print the calibration data for the nunchuk joystick in the example.

This commit is contained in:
Ryan Pavlik
2013-09-26 17:09:32 -05:00
parent b692edd958
commit 217949ca15

View File

@@ -183,6 +183,15 @@ void handle_event(struct wiimote_t* wm) {
printf("nunchuk joystick angle: %f\n", nc->js.ang);
printf("nunchuk joystick magnitude: %f\n", nc->js.mag);
printf("nunchuk joystick vals: %f, %f\n", nc->js.x, nc->js.y);
printf("nunchuk joystick calibration (min, center, max): x: %i, %i, %i y: %i, %i, %i\n",
nc->js.min.x,
nc->js.center.x,
nc->js.max.x,
nc->js.min.y,
nc->js.center.y,
nc->js.max.y);
} else if (wm->exp.type == EXP_CLASSIC) {
/* classic controller */
struct classic_ctrl_t* cc = (classic_ctrl_t*)&wm->exp.classic;