Browse Source

Merge c98cca895f into cc6c420e60

pull/5/merge
Juozas Masiulis GitHub 7 years ago
parent
commit
b411100c7b
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      src/Scope.cpp

+ 8
- 0
src/Scope.cpp View File

@@ -24,6 +24,7 @@ struct Scope : Module {
NUM_INPUTS
};
enum OutputIds {
SUM_OUTPUT,
NUM_OUTPUTS
};

@@ -124,6 +125,11 @@ void Scope::step() {
bufferIndex = 0; frameIndex = 0; return;
}
}

// Set the output

setf(outputs[SUM_OUTPUT], getf(inputs[X_INPUT]) + getf(inputs[Y_INPUT]));

}


@@ -332,6 +338,8 @@ ScopeWidget::ScopeWidget() {
addInput(createInput<PJ301MPort>(Vec(63, 319), module, Scope::Y_INPUT));
addInput(createInput<PJ301MPort>(Vec(154, 319), module, Scope::TRIG_INPUT));

addOutput(createOutput<PJ301MPort>(Vec(107, 319), module, Scope::SUM_OUTPUT));

addChild(createValueLight<TinyLight<GreenValueLight>>(Vec(104, 251), &module->lights[0]));
addChild(createValueLight<TinyLight<GreenValueLight>>(Vec(104, 296), &module->lights[1]));
addChild(createValueLight<TinyLight<GreenValueLight>>(Vec(150, 251), &module->lights[2]));


Loading…
Cancel
Save