From e55d65d042669c8231d6e07746867099538b3a09 Mon Sep 17 00:00:00 2001 From: elral <3263285+elral@users.noreply.github.com> Date: Sun, 22 Dec 2024 15:35:13 +0100 Subject: [PATCH] deviceID gets sent from the connector instead of pin number --- src/MF_Output/Output.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/MF_Output/Output.cpp b/src/MF_Output/Output.cpp index 497ba466..865643df 100644 --- a/src/MF_Output/Output.cpp +++ b/src/MF_Output/Output.cpp @@ -46,16 +46,10 @@ namespace Output void OnSet() { // Read led state argument, interpret string as boolean - int pin = cmdMessenger.readInt16Arg(); + int output = cmdMessenger.readInt16Arg(); int state = cmdMessenger.readInt16Arg(); - - // Set led - if (state == 0xFF) - digitalWrite(pin, MF_HIGH); - else if (state == 0x00) - digitalWrite(pin, MF_LOW); - else - analogWrite(pin, state); + + outputs[output].set(state); } void PowerSave(bool state)