Skip to content

Commit

Permalink
limit toly pools knob display between -15 and +15 for large or small …
Browse files Browse the repository at this point in the history
…voltage values
  • Loading branch information
AdamPorcineFudgepuppy committed Jun 6, 2024
1 parent 62427f2 commit 4b6f5c9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"slug": "computerscare",
"version": "2.1.7",
"version": "2.1.8",
"name": "computerscare",
"brand": "computerscare",
"author": "computerscare",
Expand Down
11 changes: 10 additions & 1 deletion src/ComputerscareTolyPools-v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,16 @@ struct PoolsSmallDisplayV2 : SmallLetterDisplay

}
else if (type == 1) {
value = std::to_string(module->rotation);

//keep the displayed knob value between -15 and +15
int rotationDisplay = 0;
if(module->rotation > 0) {
rotationDisplay = module->rotation % 16;
} else if(module->rotation < 0) {
rotationDisplay = -1*( (-1* module->rotation)%16);
}

value = std::to_string(rotationDisplay);
}
else if (type == 2) {
value = std::to_string(module->numInputChannels);
Expand Down

0 comments on commit 4b6f5c9

Please sign in to comment.