Skip to content

Commit f9a1fd9

Browse files
committed
Expand: fix bug where steps didn't cycle correctly
1 parent 19fc42a commit f9a1fd9

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/switch18.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,12 @@ struct Switch18 : Module, SwitchBase {
155155
outputs[STEP_1_OUTPUT + i].setVoltage(signal * volumes[i]);
156156
}
157157
else {
158-
outputs[STEP_1_OUTPUT + i].setVoltage(signal);
158+
if (i == current_step) {
159+
outputs[STEP_1_OUTPUT + i].setVoltage(signal);
160+
}
161+
else {
162+
outputs[STEP_1_OUTPUT +i].setVoltage(0.f);
163+
}
159164
}
160165
lights[STEP_1_LIGHT + i].setBrightness(i == current_step ? 1.f : 0.f);
161166
}

0 commit comments

Comments
 (0)