tools/atrf-path/atrf-path.c |
106 | 106 | } |
107 | 107 | |
108 | 108 | |
109 | | void do_sweep(const struct sweep *sweep, struct sample *res) |
| 109 | static void do_half_sweep(const struct sweep *sweep, int cont_tx, |
| 110 | struct sample *res) |
110 | 111 | { |
111 | | struct sample *r; |
112 | 112 | int chan; |
113 | 113 | |
114 | | r = res; |
115 | 114 | for (chan = 11; chan <= 26; chan++) { |
116 | 115 | set_channel(sweep->rx, chan); |
117 | 116 | set_channel(sweep->tx, chan); |
118 | 117 | usleep(155); /* table 7-2, tTR19 */ |
119 | 118 | |
120 | | sample(sweep, CONT_TX_M500K, r, chan == 11); |
121 | | r += 2; |
| 119 | sample(sweep, cont_tx, res, chan == 11); |
| 120 | res += 2; |
122 | 121 | } |
123 | | r = res+1; |
124 | | for (chan = 11; chan <= 26; chan++) { |
125 | | set_channel(sweep->rx, chan); |
126 | | set_channel(sweep->tx, chan); |
127 | | usleep(155); /* table 7-2, tTR19 */ |
| 122 | } |
128 | 123 | |
129 | | sample(sweep, CONT_TX_P500K, r, chan == 11); |
130 | | r += 2; |
131 | | } |
| 124 | |
| 125 | void do_sweep(const struct sweep *sweep, struct sample *res) |
| 126 | { |
| 127 | do_half_sweep(sweep, CONT_TX_M500K, res); |
| 128 | do_half_sweep(sweep, CONT_TX_P500K, res+1); |
132 | 129 | } |
133 | 130 | |
134 | 131 | |