Date:2012-06-22 00:18:07 (11 years 9 months ago)
Author:Werner Almesberger
Commit:ea994c8ed036df3a8c22eebe8e55561c6e1ef458
Message:tools/antorcha.c (samples): show the timestamp when printing sample values

Files: tools/antorcha.c (2 diffs)

Change Details

tools/antorcha.c
285285    uint8_t buf[MAX_PSDU] = { 0, };
286286    int got;
287287    uint8_t *s;
288    uint16_t t_high, t_low, last;
288289    int x, y;
289290
290291    buf[0] = 1;
...... 
305306        }
306307        if (debug)
307308            fprintf(stderr, "%d:", got);
308        s = buf+3+2;
309        s = buf+3;
310        t_high = *s++;
311        t_high |= *s++ << 8;
312        last = 0;
309313        while (s < buf+got-2) {
310            s += 2;
314            t_low = *s++;
315            t_low |= *s++ << 8;
316            if (t_low < last)
317                t_high++;
318            last = t_low;
311319            x = *s++;
312320            x |= *s++ << 8;
313            s += 2;
321
322            if (debug)
323                fprintf(stderr, "\t%11.6f %d",
324                    (t_high << 16 | t_low)/1000000.0, x);
325
326            t_low = *s++;
327            t_low |= *s++ << 8;
328            if (t_low < last)
329                t_high++;
330            last = t_low;
314331            y = *s++;
315332            y |= *s++ << 8;
333
316334            if (debug)
317                fprintf(stderr, "\t%d %d\n", x, y);
335                fprintf(stderr, "\t%11.6f %d\n",
336                    (t_high << 16 | t_low)/1000000.0, y);
337
318338            if (!plot(x, y))
319339                goto quit;
320340        }

Archive Download the corresponding diff file

Branches:
master
tornado-v1



interactive