summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2024-06-04 15:32:44 -0500
committerJohn Klug <john.klug@multitech.com>2024-06-04 15:32:44 -0500
commit75dfceaa2c578e94202502c7020b80a6e14ce595 (patch)
tree6825c15a830ac665059cd37e5a95999fe00a21d9 /src
parentae1740d9a2582d1a4815bdf11ae18b46d696dbff (diff)
downloadmts-io-sysfs-master.tar.gz
mts-io-sysfs-master.tar.bz2
mts-io-sysfs-master.zip
Fix new line issues with mts-io-sysfs showHEAD0.2.14master
Diffstat (limited to 'src')
-rw-r--r--src/Device/Device.cpp6
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