[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() ;
|
||||
|
||||
// If the request is a calibration request, add it to the Stock
|
||||
// (if allowed)
|
||||
if (Configuration::
|
||||
bool_value("positioning.accept-new-calibration-requests"))
|
||||
// (if allowed, and if it is not empty)
|
||||
if (Configuration::bool_value(
|
||||
"positioning.accept-new-calibration-requests")
|
||||
&& request)
|
||||
{
|
||||
if (! request) // Skip the request if empty
|
||||
return request ;
|
||||
CalibrationRequest *calibration_request =
|
||||
dynamic_cast<CalibrationRequest*>(
|
||||
const_cast<Request*>(&request)) ;
|
||||
|
@ -130,8 +129,8 @@ const Request& Input::get_next_request() const
|
|||
{
|
||||
calibration_request->reference_point_delete_requests() ;
|
||||
Stock::store_calibration_request(*calibration_request) ;
|
||||
if (Configuration::
|
||||
bool_value("positioning.generate-reference-points"))
|
||||
if (Configuration::bool_value(
|
||||
"positioning.generate-reference-points"))
|
||||
Stock::regenerate_reference_points() ;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue