From 95f860ee2d8af0d0aaff353ba34c67443acd7ab6 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 17 Dec 2011 19:11:46 +0100 Subject: wibble: minor message changes --- wibble.c | 14 +++++++------- 1 file 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"); } } -- cgit v1.2.3