X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=src%2FW1CounterDevice.cc;h=4f500e9007f4bcf4a9e2bbbb116dda8d88589e17;hb=64f4c95cf6d3a772bfc721081dc39e2105c2756c;hp=2566e1d4888114c0ccad31f28965a510948f39a0;hpb=87afaf6ff028091d7de11f577bc1f24f1bd0d3e3;p=lib1wire.git diff --git a/src/W1CounterDevice.cc b/src/W1CounterDevice.cc index 2566e1d..4f500e9 100644 --- a/src/W1CounterDevice.cc +++ b/src/W1CounterDevice.cc @@ -17,14 +17,12 @@ W1CounterDevice::W1CounterDevice(dirent *direntry, int family_code_param, string id_param): W1Device(direntry, family_code_param, id_param) { ifstream ifs(slave_file.c_str()); - if (ifs.is_open() == false) { + if (ifs.is_open() == true) { string text; text = get_time() + ": device type = " + get_devicetype_name() + ", id = " + id + ", could not read file: " + slave_file; cout << text << endl; cout << "verify that you have w1_ds2423 kernel module loaded." << endl; - } - else { ifs.close(); } } @@ -45,7 +43,7 @@ bool W1CounterDevice::is_supported_family_code(int family_code) { return ret_val; } -string W1CounterDevice::get_value() { +string W1CounterDevice::get_raw_value() { string ret_val; string value_line; int pos;