[Positioner] Add option unique-calibration-requests
The default behaviour is preserved.
This commit is contained in:
parent
167cc1fcb6
commit
dce842bad3
|
@ -169,6 +169,14 @@ csv-file = /tmp/owlps-positioner.log
|
||||||
# deleted. See also the replay option.
|
# deleted. See also the replay option.
|
||||||
#calibration-requests-timeout = 0
|
#calibration-requests-timeout = 0
|
||||||
|
|
||||||
|
# With this option activated, the calibration requests associated with
|
||||||
|
# an existing reference point are deleted when receiving a new
|
||||||
|
# calibration request, before to associate the new request with the
|
||||||
|
# reference point.
|
||||||
|
# The default is true, as there is generally no point keeping old
|
||||||
|
# calibration requests.
|
||||||
|
#unique-calibration-requests = true
|
||||||
|
|
||||||
# If you activate the above option and want the calibration requests
|
# If you activate the above option and want the calibration requests
|
||||||
# to be treated as positioning requests (in addition to the normal
|
# to be treated as positioning requests (in addition to the normal
|
||||||
# treatment of calibration requests), activate this option.
|
# treatment of calibration requests), activate this option.
|
||||||
|
|
|
@ -148,7 +148,9 @@ const Request& Input::get_next_request() const
|
||||||
const_cast<Request*>(&request)) ;
|
const_cast<Request*>(&request)) ;
|
||||||
if (calibration_request != NULL)
|
if (calibration_request != NULL)
|
||||||
{
|
{
|
||||||
calibration_request->reference_point_delete_requests() ;
|
if (Configuration::bool_value(
|
||||||
|
"positioning.unique-calibration-requests"))
|
||||||
|
calibration_request->reference_point_delete_requests() ;
|
||||||
Stock::store_calibration_request(*calibration_request) ;
|
Stock::store_calibration_request(*calibration_request) ;
|
||||||
|
|
||||||
if (Configuration::is_configured("verbose"))
|
if (Configuration::is_configured("verbose"))
|
||||||
|
|
|
@ -276,6 +276,10 @@ void UserInterface::fill_positioning_options()
|
||||||
po::value<unsigned int>()->default_value(0),
|
po::value<unsigned int>()->default_value(0),
|
||||||
"Maximum age of a calibration request before to delete it"
|
"Maximum age of a calibration request before to delete it"
|
||||||
" (0 = unlimited). See also the \"replay\" option.")
|
" (0 = unlimited). See also the \"replay\" option.")
|
||||||
|
("positioning.unique-calibration-requests",
|
||||||
|
po::value<bool>()->default_value(true),
|
||||||
|
"Always delete existing former calibration requests when receiving"
|
||||||
|
" a new calibration request for an existing reference point.")
|
||||||
("positioning.position-calibration-requests",
|
("positioning.position-calibration-requests",
|
||||||
po::value<bool>()->default_value(false),
|
po::value<bool>()->default_value(false),
|
||||||
"When accept-new-calibration-requests is activated, allow the"
|
"When accept-new-calibration-requests is activated, allow the"
|
||||||
|
|
Loading…
Reference in New Issue