Date:2011-04-13 17:32:10 (9 years 7 months ago)
Author:Werner Almesberger
Commit:e3463ef8a0153a5a551d7187190bdf1abe4ee71e
Message:atrf-path.c: moved tx init out of sample loop (breaks 230 support)

atrf-path -g ... 10 10 time is now stable at 1.92 s

- atrf-path.c (sample): commented-out init sequence needed for AT86RF230
- atrf-path.c (sample, do_sweep): set TX channel only once per +/-0.5 MHz
pair
- atrf-path.c (sample, do_sweep): "sample" no longer needs the channel
argument
- atrf-path.c (sample, main): do TX init only once
Files: tools/atrf-path/atrf-path.c (3 diffs)

Change Details

tools/atrf-path/atrf-path.c
6464}
6565
6666
67static void sample(const struct sweep *sweep, int chan, int cont_tx,
67static void sample(const struct sweep *sweep, int cont_tx,
6868    struct sample *res)
6969{
7070    int i, rssi;
7171    int sum = 0, min = -1, max = -1;
7272    double offset = tx_power_step2dBm(sweep->tx, sweep->power);
7373
74    init_tx(sweep->tx, sweep->trim_tx, sweep->power);
75    set_channel(sweep->tx, chan);
76    usleep(155); /* table 7-2, tTR19 */
77
74/*
75 * For the 230, we don't have reset-less exit from test mode (yet ?) and
76 * need to set up things from scratch:
77 *
78 * init_tx(sweep->tx, sweep->trim_tx, sweep->power);
79 * set_channel(sweep->tx, chan);
80 * usleep(155); / * table 7-2, tTR19 * /
81 */
7882    cw_test_begin(sweep->tx, cont_tx);
7983    /* table 7-1, tTR10, doubling since it's a "typical" value */
8084    usleep(2*16);
...... 
105109
106110    for (chan = 11; chan <= 26; chan++) {
107111        set_channel(sweep->rx, chan);
108        sample(sweep, chan, CONT_TX_M500K, res++);
109        sample(sweep, chan, CONT_TX_P500K, res++);
112        set_channel(sweep->tx, chan);
113        usleep(155); /* table 7-2, tTR19 */
114
115        sample(sweep, CONT_TX_M500K, res++);
116        sample(sweep, CONT_TX_P500K, res++);
110117    }
111118}
112119
...... 
243250
244251    sweep.power = 15-power;
245252    init_rx(sweep.rx, sweep.trim_rx);
253    init_tx(sweep.tx, sweep.trim_tx, sweep.power);
246254    if (graphical)
247255        gui(&sweep, sweeps);
248256    else

Archive Download the corresponding diff file



interactive