[Positioner] Clean requests in Input
Delete the old requests in the Input class rather than in Positioning, so autocalibration does not use old requests.
This commit is contained in:
parent
f3c00334bf
commit
85c955bb03
|
@ -124,11 +124,19 @@ const Request& Input::get_next_request() const
|
|||
const Request& request = medium->get_next_request() ;
|
||||
log_current_request() ;
|
||||
|
||||
/* Update the current time */
|
||||
if (Configuration::is_configured("replay"))
|
||||
Timestamp::update_current_time(request.get_time_sent()) ;
|
||||
|
||||
// If the request is a calibration request, add it to the Stock
|
||||
// (if allowed, and if it is not empty)
|
||||
/* Clean the old requests */
|
||||
unsigned int cr_timeout =
|
||||
Configuration::uint_value(
|
||||
"positioning.calibration-requests-timeout") ;
|
||||
if (cr_timeout > 0)
|
||||
Stock::delete_calibration_requests_older_than(cr_timeout) ;
|
||||
|
||||
/* If the request is a calibration request, add it to the Stock
|
||||
* (if allowed, and if it is not empty) */
|
||||
if (Configuration::bool_value(
|
||||
"positioning.accept-new-calibration-requests")
|
||||
&& request)
|
||||
|
|
|
@ -136,12 +136,6 @@ void Positioning::loop()
|
|||
if (! request)
|
||||
continue ;
|
||||
|
||||
unsigned int cr_timeout =
|
||||
Configuration::uint_value(
|
||||
"positioning.calibration-requests-timeout") ;
|
||||
if (cr_timeout > 0)
|
||||
Stock::delete_calibration_requests_older_than(cr_timeout) ;
|
||||
|
||||
Point3D real_position ;
|
||||
bool compute_error = false ;
|
||||
ResultList results(&request) ;
|
||||
|
|
Loading…
Reference in New Issue