Skip to content

Commit

Permalink
Restore parameter management code, it's still needed
Browse files Browse the repository at this point in the history
  • Loading branch information
antisvin committed Apr 10, 2023
1 parent a180745 commit fba3a9d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Bluemchen/Inc/BluemchenParameterController.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -811,8 +811,8 @@ class ParameterController {

// called by MIDI cc and/or from patch
void setValue(uint8_t pid, int16_t value) {
// if (pid >= NOF_ADC_VALUES / 2)
// user[pid] = value;
if (pid >= NOF_ADC_VALUES / 2)
user[pid] = value;
// reset encoder value if associated through selectedPid to avoid skipping
for (int i = 0; i < NOF_ENCODERS; ++i)
if (selectedPid[i] == pid)
Expand Down
21 changes: 3 additions & 18 deletions Bluemchen/Src/Bluemchen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,6 @@ extern "C" void updateEncoderCounter(){
encoder.updateCounter();
}

int16_t getParameterValue(uint8_t pid) {
if (pid < NOF_PARAMETERS) {
if (pid < NOF_ADC_VALUES / 2) {
return takeover.get(pid);
}
else {
return graphics.params.getValue(pid);
}
}
else
{
return 0;
}
}

// called from program, MIDI, or (potentially) digital bus
void setParameterValue(uint8_t pid, int16_t value) {
if (pid < NOF_PARAMETERS) {
Expand Down Expand Up @@ -118,9 +103,9 @@ void loop(){

graphics.params.updateEncoders(enc_data, 2);

//for(int i = NOF_ADC_VALUES / 2; i < NOF_PARAMETERS; ++i) {
// graphics.params.updateValue(i, 0);
//}
for(int i = NOF_ADC_VALUES / 2; i < NOF_PARAMETERS; ++i) {
graphics.params.updateValue(i, 0);
}

graphics.draw();
graphics.display();
Expand Down

0 comments on commit fba3a9d

Please sign in to comment.