X-Git-Url: http://pilppa.org/gitweb/?p=lib1wire.git;a=blobdiff_plain;f=src_test%2Ftest_w1_datalog_read.cc;fp=src_test%2Ftest_w1_datalog_read.cc;h=80822bd76a5016f17e882f3dfb0f52423ed0e332;hp=2658c46ebffb26f2fb7a2681b2faa986847f167d;hb=a7002b0a87c5f17b542dfbd44f482014a191df97;hpb=da203ad44792ca37320768f4cbe68587c4806910 diff --git a/src_test/test_w1_datalog_read.cc b/src_test/test_w1_datalog_read.cc index 2658c46..80822bd 100644 --- a/src_test/test_w1_datalog_read.cc +++ b/src_test/test_w1_datalog_read.cc @@ -12,12 +12,11 @@ #include #include +#include +#include +#include -#include "Date.hh" -#include "DataReader.hh" -#include "DeviceConfig.hh" #include "Factory.hh" -#include "W1Util.hh" using namespace std; using namespace plp; @@ -58,15 +57,15 @@ int main(int argc, char** argv) { list::iterator list_iter; // default values than can be overwritten with parameters - loc = "/tmp/w1data"; + loc = DeviceConfig::get_base_dir_name(); if (argc > 1) { loc = argv[1]; log_info("storage location: %s\n", loc.c_str()); + DeviceConfig::set_base_dir_name(loc); } else { log_warning("No storage location parameter given, using default location: %s\n", loc.c_str()); } - DeviceConfig::set_base_dir_name(loc); dev_lst = Factory::get_device_list(); for(list_iter = dev_lst.begin(); list_iter != dev_lst.end(); list_iter++) { device = (Device *)*list_iter;