From 08a407e0f3e8b5db200a952c2eb9d7aa54282809 Mon Sep 17 00:00:00 2001 From: Florian Taillard Date: Mon, 18 Apr 2011 16:31:10 +0200 Subject: [PATCH] [Positioning] Fix reading csv calibration file Add uint16_t into inputcsv to fix read type packet. The uint8_t is detected as a char. --- owlps-positioning/src/inputcsv.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/owlps-positioning/src/inputcsv.cc b/owlps-positioning/src/inputcsv.cc index fc4a6ff..0882d14 100644 --- a/owlps-positioning/src/inputcsv.cc +++ b/owlps-positioning/src/inputcsv.cc @@ -45,12 +45,14 @@ const Request& InputCSV::get_next_request() // Read request type uint8_t type ; - if (! file.read_field(type)) + uint16_t type_r ; + if (! file.read_field(type_r)) { // Wrong number of fields: blank current request current_request->clear() ; return *current_request ; } + type = type_r ; current_request->set_type(type) ; // Read Timestamp field