IEEE 802.15.4 subsystem
Sign in or create your account | Project List | Help
IEEE 802.15.4 subsystem Commit Details
Date: | 2011-04-13 19:17:01 (12 years 11 months ago) |
---|---|
Author: | Werner Almesberger |
Commit: | a7d9dfd258fc9da71d23e96df0ab9470b19acce9 |
Message: | atrf-path.c: do cw test setup only once if sweeping a single offset atrf-path -T +0.5 -g ... 10 10 time: before: 0.32-0.33 s after: 0.27-0.29 s (88%) - atrf-path.c (sample): force cw test setup if never done before - atrf-path.c (do_half_sweep): only request cw test setup if sweeping both offsets |
Files: |
tools/atrf-path/atrf-path.c (3 diffs) |
Change Details
tools/atrf-path/atrf-path.c | ||
---|---|---|
68 | 68 | static void sample(const struct sweep *sweep, int cont_tx, |
69 | 69 | struct sample *res, int first) |
70 | 70 | { |
71 | static int need_init = 1; | |
71 | 72 | int i, rssi; |
72 | 73 | int sum = 0, min = -1, max = -1; |
73 | 74 | double offset = tx_power_step2dBm(sweep->tx, sweep->power); |
... | ... | |
80 | 81 | * set_channel(sweep->tx, chan); |
81 | 82 | * usleep(155); / * table 7-2, tTR19 * / |
82 | 83 | */ |
83 | if (first) | |
84 | if (first || need_init) { | |
84 | 85 | cw_test_begin(sweep->tx, cont_tx); |
85 | else | |
86 | need_init = 0; | |
87 | } else { | |
86 | 88 | cw_test_resume(sweep->tx); |
89 | } | |
87 | 90 | /* table 7-1, tTR10, doubling since it's a "typical" value */ |
88 | 91 | usleep(2*16); |
89 | 92 | |
... | ... | |
119 | 122 | set_channel(sweep->tx, chan); |
120 | 123 | usleep(155); /* table 7-2, tTR19 */ |
121 | 124 | |
122 | sample(sweep, cont_tx, res, chan == 11); | |
125 | sample(sweep, cont_tx, res, chan == 11 && !sweep->cont_tx); | |
123 | 126 | res += 2; |
124 | 127 | } |
125 | 128 | } |