summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wibble.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/wibble.c b/wibble.c
index 611a9f8..3b11750 100644
--- a/wibble.c
+++ b/wibble.c
@@ -298,12 +298,12 @@ void handle_acc_auto(cwiid_wiimote_t *wiimote, struct cwiid_acc_mesg *am,
}
if ((a_y < -2) && !w_start)
- w_start = now;
- else if (a_y < -2) {
+ w_start = w_last = now;
+ else if ((a_y < -2) && ((now - w_last) > 0.2)) {
w_count++;
w_last = now;
if (w_count > 5) {
- printf("\r\033[2K8====) Wanking for %.f seconds at %4.1fHz",
+ printf("\r\033[2K%.f seconds at %4.1fHz",
w_last - w_start,
w_count / (w_last - w_start)
);