diff --git a/bulldog-linux/src/main/java/io/silverspoon/bulldog/linux/sysfs/SysFsPin.java b/bulldog-linux/src/main/java/io/silverspoon/bulldog/linux/sysfs/SysFsPin.java index 3844c27e..1ec411f2 100644 --- a/bulldog-linux/src/main/java/io/silverspoon/bulldog/linux/sysfs/SysFsPin.java +++ b/bulldog-linux/src/main/java/io/silverspoon/bulldog/linux/sysfs/SysFsPin.java @@ -54,7 +54,7 @@ public boolean isExported() { public void exportIfNecessary() { if (!isExported()) { - echoToFile(getPinString(), Paths.get(directory, "/export")); + echoToFile(getPinString(), exportPath); long startTime = System.currentTimeMillis(); while (!Files.exists(getValueFilePath())) { @@ -68,7 +68,7 @@ public void exportIfNecessary() { public void unexport() { if (isExported()) { - echoToFile(getPinString(), Paths.get(directory, "/unexport")); + echoToFile(getPinString(), unexportPath); } } @@ -106,7 +106,7 @@ public Signal getValue() { } public void setValue(Signal signal) { - echoToFile(String.valueOf(signal.getNumericValue()), getPinDirectory()); + echoToFile(String.valueOf(signal.getNumericValue()), getValueFilePath()); } private void echoToFile(String value, Path file) {