[Positioner] replay option is boolean
Fixes the test of the replay option: it is a boolean, not a configured/not configured option.
This commit is contained in:
parent
dce842bad3
commit
3640bcf0ba
|
@ -129,7 +129,7 @@ const Request& Input::get_next_request() const
|
||||||
return medium->get_current_request() ;
|
return medium->get_current_request() ;
|
||||||
|
|
||||||
/* Update the current time */
|
/* Update the current time */
|
||||||
if (Configuration::is_configured("replay"))
|
if (Configuration::bool_value("replay"))
|
||||||
Timestamp::update_current_time(request.get_time_sent()) ;
|
Timestamp::update_current_time(request.get_time_sent()) ;
|
||||||
|
|
||||||
/* Clean the old requests */
|
/* Clean the old requests */
|
||||||
|
|
|
@ -522,7 +522,7 @@ void Stock::delete_calibration_requests_older_than(int timeout)
|
||||||
while (cr != calibration_requests.end())
|
while (cr != calibration_requests.end())
|
||||||
{
|
{
|
||||||
Timestamp request_time ;
|
Timestamp request_time ;
|
||||||
if (Configuration::is_configured("replay"))
|
if (Configuration::bool_value("replay"))
|
||||||
request_time = cr->get_time_sent() ;
|
request_time = cr->get_time_sent() ;
|
||||||
else
|
else
|
||||||
request_time = cr->get_time_received() ;
|
request_time = cr->get_time_received() ;
|
||||||
|
|
|
@ -95,7 +95,7 @@ inline void Timestamp::set(const uint64_t source_ms)
|
||||||
|
|
||||||
Timestamp Timestamp::get_current_time()
|
Timestamp Timestamp::get_current_time()
|
||||||
{
|
{
|
||||||
if (! Configuration::is_configured("replay"))
|
if (! Configuration::bool_value("replay"))
|
||||||
current_time.now() ;
|
current_time.now() ;
|
||||||
return current_time ;
|
return current_time ;
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ Timestamp Timestamp::get_current_time()
|
||||||
void Timestamp::update_current_time(const Timestamp &source)
|
void Timestamp::update_current_time(const Timestamp &source)
|
||||||
{
|
{
|
||||||
// We should never call this function if we are in replay mode:
|
// We should never call this function if we are in replay mode:
|
||||||
assert(Configuration::is_configured("replay")) ;
|
assert(Configuration::bool_value("replay")) ;
|
||||||
|
|
||||||
// According to human perception, time generally goes only forward:
|
// According to human perception, time generally goes only forward:
|
||||||
if (current_time < source)
|
if (current_time < source)
|
||||||
|
|
Loading…
Reference in New Issue