diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Device/Device.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Device/Device.cpp b/src/Device/Device.cpp index e743dd6..c440d4f 100644 --- a/src/Device/Device.cpp +++ b/src/Device/Device.cpp @@ -719,11 +719,11 @@ int Device::getPinValue(const std::string &name, std::string *data) if(lv != GPIOD_LINE_VALUE_ERROR) { if(lv == GPIOD_LINE_VALUE_INACTIVE) { if(data != NULL) - *data = "0"; + *data = "0\n"; return 0; } else { if(data != NULL) { - *data = "1"; + *data = "1\n"; return 0; } else return 1; @@ -758,7 +758,7 @@ void Device::show(std::string name) { } result = getPinValue(name,&fileData); if (result == 0) - printf("%s\n", fileData.c_str()); + printf("%s", fileData.c_str()); exitHandler(result); } // End of show |