Skip to content
This repository has been archived by the owner on Nov 11, 2023. It is now read-only.

Commit

Permalink
wibble: Calculation adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
derf committed Dec 26, 2011
1 parent b9dc08b commit 3b28785
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wibble.c
Expand Up @@ -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)
);
Expand Down

0 comments on commit 3b28785

Please sign in to comment.