[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:
Matteo Cypriani 2012-06-08 19:08:56 +02:00
parent dce842bad3
commit 3640bcf0ba
3 changed files with 4 additions and 4 deletions

View File

@ -129,7 +129,7 @@ const Request& Input::get_next_request() const
return medium->get_current_request() ;
/* Update the current time */
if (Configuration::is_configured("replay"))
if (Configuration::bool_value("replay"))
Timestamp::update_current_time(request.get_time_sent()) ;
/* Clean the old requests */

View File

@ -522,7 +522,7 @@ void Stock::delete_calibration_requests_older_than(int timeout)
while (cr != calibration_requests.end())
{
Timestamp request_time ;
if (Configuration::is_configured("replay"))
if (Configuration::bool_value("replay"))
request_time = cr->get_time_sent() ;
else
request_time = cr->get_time_received() ;

View File

@ -95,7 +95,7 @@ inline void Timestamp::set(const uint64_t source_ms)
Timestamp Timestamp::get_current_time()
{
if (! Configuration::is_configured("replay"))
if (! Configuration::bool_value("replay"))
current_time.now() ;
return current_time ;
}
@ -108,7 +108,7 @@ Timestamp Timestamp::get_current_time()
void Timestamp::update_current_time(const Timestamp &source)
{
// 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:
if (current_time < source)