diff options
| author | Astrid Smith | 2011-10-28 21:44:42 -0700 |
|---|---|---|
| committer | Astrid Smith | 2011-10-28 21:44:48 -0700 |
| commit | daf966eaa629d59487b57f907b62f642995d829e (patch) | |
| tree | 34003f39525c01f44b3d556eafcba0a0c7ef91cd /host/client.c | |
| parent | ad9adb3614e5cc0765bf75c43343e0d4a422c520 (diff) | |
Calibrator, version that works (kind of) with milliseconds
Diffstat (limited to 'host/client.c')
| -rw-r--r-- | host/client.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/host/client.c b/host/client.c index 17f3fba..3752800 100644 --- a/host/client.c +++ b/host/client.c @@ -7,8 +7,13 @@ #include <string.h> #include <fcntl.h> +// window for frequency averaging, in cycles #define QUEUE 3600 +// window for reporting, in cycles +#define REPORT_FREQ 60 +// width of the bargraph #define WIDTH 40 +// timer cycles per second #define SCALE 1000000 int main(int *argc, char **argv) @@ -57,7 +62,7 @@ int main(int *argc, char **argv) line[position] = '.'; } - if (counter % 60 == 0) { + if (counter % REPORT_FREQ == 0) { if (pos_avg > WIDTH) { line[WIDTH] = '_'; } else if (pos_avg < 0) { |
