Skip to content

Commit fba3a9d

Browse files
committed
Restore parameter management code, it's still needed
1 parent a180745 commit fba3a9d

File tree

2 files changed

+5
-20
lines changed

2 files changed

+5
-20
lines changed

Bluemchen/Inc/BluemchenParameterController.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -811,8 +811,8 @@ class ParameterController {
811811

812812
// called by MIDI cc and/or from patch
813813
void setValue(uint8_t pid, int16_t value) {
814-
// if (pid >= NOF_ADC_VALUES / 2)
815-
// user[pid] = value;
814+
if (pid >= NOF_ADC_VALUES / 2)
815+
user[pid] = value;
816816
// reset encoder value if associated through selectedPid to avoid skipping
817817
for (int i = 0; i < NOF_ENCODERS; ++i)
818818
if (selectedPid[i] == pid)

Bluemchen/Src/Bluemchen.cpp

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,6 @@ extern "C" void updateEncoderCounter(){
3131
encoder.updateCounter();
3232
}
3333

34-
int16_t getParameterValue(uint8_t pid) {
35-
if (pid < NOF_PARAMETERS) {
36-
if (pid < NOF_ADC_VALUES / 2) {
37-
return takeover.get(pid);
38-
}
39-
else {
40-
return graphics.params.getValue(pid);
41-
}
42-
}
43-
else
44-
{
45-
return 0;
46-
}
47-
}
48-
4934
// called from program, MIDI, or (potentially) digital bus
5035
void setParameterValue(uint8_t pid, int16_t value) {
5136
if (pid < NOF_PARAMETERS) {
@@ -118,9 +103,9 @@ void loop(){
118103

119104
graphics.params.updateEncoders(enc_data, 2);
120105

121-
//for(int i = NOF_ADC_VALUES / 2; i < NOF_PARAMETERS; ++i) {
122-
// graphics.params.updateValue(i, 0);
123-
//}
106+
for(int i = NOF_ADC_VALUES / 2; i < NOF_PARAMETERS; ++i) {
107+
graphics.params.updateValue(i, 0);
108+
}
124109

125110
graphics.draw();
126111
graphics.display();

0 commit comments

Comments
 (0)