1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-10-06 01:22:33 +03:00
ben-wpan/tools/atrf-path/sweep.h
Werner Almesberger e2a9c9d068 atrf-path: new option -T to sweep only one offset
atrf-path -T +0.5 -g ... 10 10 time:

before (both offsets)	0.65 s
after (one offset)	0.32-0.33 s	(50%)

- atrf-path.c (usage, main): new option -T to specify which offset to
  sweep (default: sweep both)
- atrf-path.c (do_half_sweep): only sample points with the desired offset
- atrf-path.c (print_sweep): only prints points we've sweeped
- gui.c (segment, draw): inverted flag logic from "have_last" to "first"
- gui.c (draw): only plot points we've sweeped
- gui.c (gui): pass the offset selection to "draw"
2011-04-13 14:01:12 -03:00

41 lines
740 B
C

/*
* atrf-path/sweep.h - Measure path characteristics
*
* Written 2011 by Werner Almesberger
* Copyright 2011 Werner Almesberger
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#ifndef SWEEP_H
#define SWEEP_H
#include <stdint.h>
#include "atrf.h"
struct sweep {
struct atrf_dsc *tx;
struct atrf_dsc *rx;
int trim_tx;
int trim_rx;
int power;
uint8_t cont_tx;
int samples;
};
struct sample {
double avg;
double min, max;
};
void do_sweep(const struct sweep *sweep, struct sample *res);
#endif /* !SWEEP_H */