summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-12-17 03:37:10 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-12-17 03:37:10 +0100
commit4da45b03e11bd4324e66acfd0dd1af22d9d86eab (patch)
tree3ccbf09261c71ed98520572566e9ab1e78d4fe5b
parent588897c581be795a17399034dfb9ccbc439c4a66 (diff)
parentd280ff4a7ad6edd939b44c674aca1b0ac118cce6 (diff)
Merge branch 'master' of https://github.com/penma/wii-sensors
-rw-r--r--wibble.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/wibble.c b/wibble.c
index f1cdc10..f552951 100644
--- a/wibble.c
+++ b/wibble.c
@@ -11,12 +11,7 @@
*
* Controls:
* D-Pad Up toggle auto / manual mode
- * D-Pad Left previous animation
- * D-Pad Right next animation
- * D-Pad Down toggle rumble
*
- * - decrease animation speed
- * + increase animation speed
*
* Home quit
*/
@@ -70,6 +65,10 @@ void set_led_fun(int new_mode)
else if (cur_mode > max_current)
cur_mode = 0;
+ if (!auto_mode) {
+ printf("new mode %d\n", cur_mode);
+ }
+
switch (cur_mode) {
case 0:
x_max = X_MAXP;
@@ -145,6 +144,7 @@ int main()
uint8_t next_mode = 0;
+ puts("Press 1+2 to connect wiimote.");
if ((wiimote = cwiid_open(BDADDR_ANY, 0)) == NULL) {
fputs("Unable to connect\n", stderr);
return EXIT_FAILURE;
@@ -232,8 +232,18 @@ void cwiid_callback(cwiid_wiimote_t *wiimote, int mesg_count,
cnt_max += 1;
if (mesg[i].btn_mesg.buttons & CWIID_BTN_UP) {
auto_mode = !auto_mode;
- if (auto_mode)
+ if (auto_mode) {
x_max = X_MAXP;
+ puts("Auto mode enabled");
+ puts("- Fap to vibrate");
+ puts("- Down arrow to toggle vibration");
+ puts("- Tilt to change animation speed");
+ } else {
+ puts("Auto mode disabled");
+ puts("- Down arrow to vibrate");
+ puts("- Left/Right to change animation");
+ puts("- +/- to change animation speed");
+ }
}
if (mesg[i].btn_mesg.buttons & CWIID_BTN_DOWN) {