From 3640bcf0bab08fe445b46d7f72963bed641220bf Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Fri, 8 Jun 2012 19:08:56 +0200 Subject: [PATCH] [Positioner] replay option is boolean Fixes the test of the replay option: it is a boolean, not a configured/not configured option. --- owlps-positioner/src/input.cc | 2 +- owlps-positioner/src/stock.cc | 2 +- owlps-positioner/src/timestamp.cc | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/owlps-positioner/src/input.cc b/owlps-positioner/src/input.cc index 5030508..54604bb 100644 --- a/owlps-positioner/src/input.cc +++ b/owlps-positioner/src/input.cc @@ -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 */ diff --git a/owlps-positioner/src/stock.cc b/owlps-positioner/src/stock.cc index dd92569..1ad0d3c 100644 --- a/owlps-positioner/src/stock.cc +++ b/owlps-positioner/src/stock.cc @@ -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() ; diff --git a/owlps-positioner/src/timestamp.cc b/owlps-positioner/src/timestamp.cc index 61b968f..38cd01d 100644 --- a/owlps-positioner/src/timestamp.cc +++ b/owlps-positioner/src/timestamp.cc @@ -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)