[Positioning] Input::get_next_request(): refactor.
This commit is contained in:
parent
a801eb84d1
commit
c85c6357fb
|
@ -117,12 +117,11 @@ const Request& Input::get_next_request() const
|
||||||
log_current_request() ;
|
log_current_request() ;
|
||||||
|
|
||||||
// If the request is a calibration request, add it to the Stock
|
// If the request is a calibration request, add it to the Stock
|
||||||
// (if allowed)
|
// (if allowed, and if it is not empty)
|
||||||
if (Configuration::
|
if (Configuration::bool_value(
|
||||||
bool_value("positioning.accept-new-calibration-requests"))
|
"positioning.accept-new-calibration-requests")
|
||||||
|
&& request)
|
||||||
{
|
{
|
||||||
if (! request) // Skip the request if empty
|
|
||||||
return request ;
|
|
||||||
CalibrationRequest *calibration_request =
|
CalibrationRequest *calibration_request =
|
||||||
dynamic_cast<CalibrationRequest*>(
|
dynamic_cast<CalibrationRequest*>(
|
||||||
const_cast<Request*>(&request)) ;
|
const_cast<Request*>(&request)) ;
|
||||||
|
@ -130,8 +129,8 @@ const Request& Input::get_next_request() const
|
||||||
{
|
{
|
||||||
calibration_request->reference_point_delete_requests() ;
|
calibration_request->reference_point_delete_requests() ;
|
||||||
Stock::store_calibration_request(*calibration_request) ;
|
Stock::store_calibration_request(*calibration_request) ;
|
||||||
if (Configuration::
|
if (Configuration::bool_value(
|
||||||
bool_value("positioning.generate-reference-points"))
|
"positioning.generate-reference-points"))
|
||||||
Stock::regenerate_reference_points() ;
|
Stock::regenerate_reference_points() ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue