Skip to content

Commit

Permalink
Restrict 14-bit CCs to 0-31
Browse files Browse the repository at this point in the history
  • Loading branch information
Dewb committed Dec 30, 2024
1 parent 209e941 commit 5a1d28b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/faderbank/FaderbankWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ void appendFaderConfigMenu(FaderbankModule* fb, ::Menu* menu, int faderIndex)
FaderbankModule::ControllerRecord record = fb->records[faderIndex];

std::vector<std::string> modeNames { "CC", "CC (14-bit)" };
uint8_t ccMax = record.faderMode == FaderbankModule::FaderMode14bitCC ? 31 : 127;

std::vector<std::string> channelNames;
for (auto i = 0; i < 16; i++)
Expand All @@ -166,7 +167,7 @@ void appendFaderConfigMenu(FaderbankModule* fb, ::Menu* menu, int faderIndex)
}

std::vector<std::string> ccNames;
for (auto i = 0; i < 128; i++)
for (auto i = 0; i < ccMax + 1; i++)
{
std::ostringstream ss;
ss << i;
Expand Down

0 comments on commit 5a1d28b

Please sign in to comment.