summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2011-12-17 19:11:46 +0100
committerDaniel Friesel <derf@finalrewind.org>2011-12-17 19:11:46 +0100
commit95f860ee2d8af0d0aaff353ba34c67443acd7ab6 (patch)
treec8a67a4901a5caef3ba5e6e56dce6215e583cd84
parentbc2de043182dd20d6e14875f1413c165cc9833fa (diff)
wibble: minor message changes
-rw-r--r--wibble.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/wibble.c b/wibble.c
index f552951..cad1769 100644
--- a/wibble.c
+++ b/wibble.c
@@ -12,7 +12,6 @@
* Controls:
* D-Pad Up toggle auto / manual mode
*
- *
* Home quit
*/
@@ -66,7 +65,8 @@ void set_led_fun(int new_mode)
cur_mode = 0;
if (!auto_mode) {
- printf("new mode %d\n", cur_mode);
+ printf("\r\033[2Kmode %d", cur_mode);
+ fflush(stdout);
}
switch (cur_mode) {
@@ -149,7 +149,6 @@ int main()
fputs("Unable to connect\n", stderr);
return EXIT_FAILURE;
}
- fputs("connected\n", stdout);
sleep(2);
@@ -159,7 +158,7 @@ int main()
fputs("unable to retrieve accelerometer calibration\n", stderr);
if (!cwiid_get_state(wiimote, &state))
- printf("battery at %d%%\n",
+ printf("connected - battery at %d%%\n",
(int)(100.0 * state.battery / CWIID_BATTERY_MAX));
if (cwiid_set_mesg_callback(wiimote, cwiid_callback))
@@ -234,15 +233,16 @@ void cwiid_callback(cwiid_wiimote_t *wiimote, int mesg_count,
auto_mode = !auto_mode;
if (auto_mode) {
x_max = X_MAXP;
- puts("Auto mode enabled");
- puts("- Fap to vibrate");
+ puts("\r\033[2KAuto mode enabled");
+ puts("- Shake to vibrate");
puts("- Down arrow to toggle vibration");
puts("- Tilt to change animation speed");
+ puts("- Let wiimote fall to calculate fall height\n");
} else {
puts("Auto mode disabled");
puts("- Down arrow to vibrate");
puts("- Left/Right to change animation");
- puts("- +/- to change animation speed");
+ puts("- +/- to change animation speed\n");
}
}