Skip to content
Snippets Groups Projects
Commit ee633549 authored by Johannes Eder's avatar Johannes Eder
Browse files

fixed inverted LED values


Signed-off-by: default avatarJohannes Eder <eder@fortiss.org>
parent 75b08070
No related branches found
No related tags found
No related merge requests found
......@@ -48,14 +48,14 @@ public final class LEDGeneratorExtension extends WiringPiLibraryGeneratorExtensi
@Override
public String getWriteCode(OutputPort logicalSignal, String value) {
String pin = getPinNumber();
return "digitalWrite(" + pin + ", (" + value + " == 1 ? LOW : HIGH));\n";
return "digitalWrite(" + pin + ", (" + value + " == 1 ? HIGH : LOW));\n";
}
/** {@inheritDoc} */
@Override
public String getNoValWriteCode(OutputPort logicalSignal) {
String pin = getPinNumber();
return "digitalWrite(" + pin + ", HIGH);\n";
return "digitalWrite(" + pin + ", LOW);\n";
}
/** Returns the pin number for the given button UID. */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment