Skip to content

Commit

Permalink
Cascade: override onReset to initialize channel ranges
Browse files Browse the repository at this point in the history
  • Loading branch information
alefnull committed Sep 5, 2022
1 parent 79e0fa9 commit c51514d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/funcgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,15 @@ struct Funcgen : Module {
}
}

void onReset() override {
for (int i = 0; i < CHANNEL_COUNT; i++) {
range[i] = 10;
unipolar[i] = true;
}
range_cascade = 10;
unipolar_cascade = true;
}

json_t *dataToJson() override {
json_t *rootJ = json_object();
json_object_set_new(rootJ, "range_a", json_integer(range[0]));
Expand Down

0 comments on commit c51514d

Please sign in to comment.