-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
in function usePin the member variable dmxPin is set to argument var pin, before it is tested for unequality; the next if test will always be false:
void DmxMasterClass::usePin(uint8_t pin) {
dmxPin = pin;
if (dmxStarted && (pin != dmxPin)) {
dmxEnd();
dmxBegin();
}
}
Solution is of course test-before-set:
void DmxMasterClass::usePin(uint8_t pin) {
if (pin != dmxPin) {
dmxPin = pin;
if (dmxStarted) {
dmxEnd();
dmxBegin();
}
}
}
Metadata
Metadata
Assignees
Labels
No labels