Skip to content

Commit

Permalink
deviceID gets sent from the connector instead of pin number
Browse files Browse the repository at this point in the history
  • Loading branch information
elral committed Dec 22, 2024
1 parent 5fa8163 commit e55d65d
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/MF_Output/Output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e55d65d

Please sign in to comment.