]> pilppa.org Git - lib1wire.git/blobdiff - src/W1Device.cc
cleaned up test_w1_datalog_write example applications parameter handling.
[lib1wire.git] / src / W1Device.cc
index c9c2e7ed225318caa6b40630c6d2075d33796392..781ef6d878e2191a8f2fdc83f271d255a4e81494 100644 (file)
 
 #include "DeviceConfig.hh"
 #include "Factory.hh"
-#include "W1Store.hh"
+#include "StoreDay.hh"
 #include "W1Device.hh"
 
-using namespace w1;
 using namespace std;
+using namespace w1;
+using namespace plp;
 
 W1Device::W1Device(int family_code_param,
                string device_id_param,
@@ -31,7 +32,7 @@ W1Device::W1Device(int family_code_param,
        temp_str        = W1_SLAVE_FILE;
        dir_path        = rootdir + "/" + direntry_param->d_name;
        slave_file      = dir_path + "/" + temp_str;
-       log_debug("w1 data file: %s\n", slave_file.c_str());
+       log_debug("1-wire device's data file: %s\n", slave_file.c_str());
        family_code     = family_code_param;
        id              = device_id_param;
        name            = "";
@@ -129,7 +130,7 @@ void W1Device::save_data() {
        int                     dec_precision;
 
        dec_precision   = get_data_decimal_precision();
-       W1Store::save(id, &memory_cache, dec_precision);
+       StoreDay::save(id, &memory_cache, dec_precision);
        for(iter = memory_cache.begin(); iter != memory_cache.end(); iter++) {
                data    = (Data *)*iter;
                delete(data);