diff options
author | John Klug <john.klug@multitech.com> | 2024-06-04 15:32:44 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2024-06-04 15:32:44 -0500 |
commit | 75dfceaa2c578e94202502c7020b80a6e14ce595 (patch) | |
tree | 6825c15a830ac665059cd37e5a95999fe00a21d9 | |
parent | ae1740d9a2582d1a4815bdf11ae18b46d696dbff (diff) | |
download | mts-io-sysfs-master.tar.gz mts-io-sysfs-master.tar.bz2 mts-io-sysfs-master.zip |
-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 |