diff --git a/.github/workflows/build-plugin.yml b/.github/workflows/build-plugin.yml index ec63601..961853e 100644 --- a/.github/workflows/build-plugin.yml +++ b/.github/workflows/build-plugin.yml @@ -2,7 +2,7 @@ name: Build VCV Rack Plugin on: [push, pull_request] env: - rack-sdk-version: 2.4.1 + rack-sdk-version: 2.5.1 rack-plugin-toolchain-dir: /home/build/rack-plugin-toolchain defaults: diff --git a/src/MidiThing.cpp b/src/MidiThing.cpp index 18340b5..c7a5b6e 100644 --- a/src/MidiThing.cpp +++ b/src/MidiThing.cpp @@ -485,10 +485,16 @@ struct LEDDisplay : LightWidget { if (font && font->handle >= 0) { - std::string text = "?-?v"; // fallback if module not yet defined + std::string text; if (module) { text = module->cfgPortModeNames[module->getVoltageMode(row, col) + 1]; } + else { + // fallback if module not yet defined + const char* cfgPortModeNames[5] = {"0/10v", "-5/5v", "-10/0v", "0/8v", "0/5v"}; + const int randomModeForDisplay = rack::random::u32() % 5; + text = cfgPortModeNames[randomModeForDisplay]; + } char buffer[numChars + 1]; int l = text.size(); if (l > numChars)