From 217949ca1511a23ba4d7e2cb98cc29979ddb2a65 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Thu, 26 Sep 2013 17:09:32 -0500 Subject: [PATCH] Print the calibration data for the nunchuk joystick in the example. --- example/example.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/example/example.c b/example/example.c index 8c4c228..2ae3703 100644 --- a/example/example.c +++ b/example/example.c @@ -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;