Commit afcdad6e authored by Alessio Netti's avatar Alessio Netti
Browse files

Minor changes to SysFS "retain" option

parent 6d296707
......@@ -85,9 +85,10 @@ void SysfsSensorGroup::read() {
LOG(error) << "Error opening file " << _path << ":" << strerror(errno);
return;
}
} else {
fseek(_file, 0, SEEK_SET);
}
fseek(_file, 0, SEEK_SET);
size_t nelem = fread(buf, 1, 1024, _file);
reading.timestamp = getTimestamp();
......@@ -133,4 +134,5 @@ void SysfsSensorGroup::read() {
void SysfsSensorGroup::printGroupConfig(LOG_LEVEL ll, unsigned int leadingSpaces) {
std::string leading(leadingSpaces, ' ');
LOG_VAR(ll) << leading << "File path: " << _path;
LOG_VAR(ll) << leading << "Retain: " << (_retain ? "true" : "false");
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment