summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Stoltenow <penma@penma.de>2011-12-17 01:25:18 +0100
committerLars Stoltenow <penma@penma.de>2011-12-17 01:25:18 +0100
commitd280ff4a7ad6edd939b44c674aca1b0ac118cce6 (patch)
tree5e089ea7841a49719796c7e4ead52cd3d3de3ee0
parent540dcaa8c7223a955475b42d199229082a552a98 (diff)
help messages when changing modes
-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) {