[Positioner] Autocalibration: fix multi-packet loop

Fixes the Autocalibration::compute_multi_packet_ss() loop that searches
for the first good measurement.
This commit is contained in:
Matteo Cypriani 2012-05-29 13:46:42 +02:00
parent d3733c2083
commit 14eb08b37e
1 changed files with 6 additions and 3 deletions

View File

@ -252,9 +252,12 @@ void Autocalibration::compute_multi_packet_ss()
const Measurement *rx_measurement = NULL ;
vector<CalibrationRequest*>::const_iterator cr ;
const string &rx_mac = rx->second.get_mac_addr() ;
for (cr = ref1_cr.begin() ; ! rx_measurement && cr != ref1_cr.end() ;
++cr)
rx_measurement = (*cr)->get_measurement(rx_mac) ;
for (cr = ref1_cr.begin() ; cr != ref1_cr.end() ; ++cr)
{
rx_measurement = (*cr)->get_measurement(rx_mac) ;
if (rx_measurement)
break ;
}
// The selected reference APs are in coverage of RX, therefore
// we should always find a measurement of RX in ref1_rp