refactor cv mod to allow both cv mods configurable per channel. Fix euclidean sum mod. update large font.

This commit is contained in:
2025-07-02 14:16:15 -07:00
parent a640723be8
commit 7ce8bb661d
7 changed files with 118 additions and 133 deletions

View File

@ -9,6 +9,11 @@
// UI Display functions for drawing the UI to the OLED display.
//
/*
* Font: velvetscreen.bdf 9pt
* https://stncrn.github.io/u8g2-unifont-helper/
* "%/0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
*/
const uint8_t TEXT_FONT[437] U8G2_FONT_SECTION("velvetscreen") PROGMEM =
"\64\0\2\2\3\3\2\3\4\5\5\0\0\5\0\5\0\0\221\0\0\1\230 \4\200\134%\11\255tT"
"R\271RI(\6\252\334T\31)\7\252\134bJ\12+\7\233\345\322J\0,\5\221T\4-\5\213"
@ -25,8 +30,13 @@ const uint8_t TEXT_FONT[437] U8G2_FONT_SECTION("velvetscreen") PROGMEM =
"\7p\10\255\364V\266\323\2q\7\255\364\216\257\5r\10\253d\242\32*\2t\6\255t\376#w\11"
"\255\364V\245FN\13x\6\233dR\7\0\0\0\4\377\377\0";
const uint8_t LARGE_FONT[916] U8G2_FONT_SECTION("stk-l") PROGMEM =
"#\0\4\4\4\5\2\1\6\17\30\1\0\27\0\0\0\1\77\0\0\3w%'\17\37\313\330R#&"
/*
* Font: STK-L.bdf 36pt
* https://stncrn.github.io/u8g2-unifont-helper/
* "%/0123456789ACDEFINORSTUVXx"
*/
const uint8_t LARGE_FONT[715] U8G2_FONT_SECTION("stk-l") =
"\33\0\4\4\4\5\2\1\6\20\30\0\0\27\0\0\0\1\77\0\0\2\256%'\17\37\313\330R#&"
"\32!F\14\211I\310\24!\65\204(MF\21)Cd\304\10\62b\14\215\60Vb\334\20\0/\14"
"\272\336\336d\244\350\263q\343\0\60\37|\377\216!%*\10\35\263\253ChD\30\21bB\14\242S"
"\306lv\210\204\22Ef\0\61\24z\337\322\60R\205\314\234\31\61F\310\270\371\177\224\42\3\62\33|"
@ -37,24 +47,18 @@ const uint8_t LARGE_FONT[916] U8G2_FONT_SECTION("stk-l") PROGMEM =
"\234\335\235\42\261&\325\31\0\67\23|\377\302\212\7)\347Crt\70\345\300\221\363\16\0\70 |\377"
"\216)\64*\10\35\263\354\20\11\42d\20\235BC\204\4\241cvv\210\204\32Tf\0\71\32|\377"
"\216)\64*\10\35\263\263C$\226\250I\71_\14\42\241\6\225\31\0A\26}\17S\271Si(\31"
"\65d\324\210q\366\356\301w\366\273\1B$}\17C\42\65KF\221\30\66b\330\210a#\206\215\30"
"Eb\311&\243H\14;g\317\36\204`\261\4\0C\27}\17\317\251\64K\10!\63:\377\247\304F"
"\20\42\261F\21\22\0D\33}\17C\42\65KF\15\31\66b\330\210q\366\77;\66b\24\211%j"
"\22\1E\21|\377\302\7)\347%\42\214F\316/\37<\60F\20|\377\302\7)\347\313\64\331\214\234"
"\177\11\0G\31\216\37\17*\65L\206\35\264v>\322\241\15\217\221 \65\204\215\262\63\0H\17|\377"
"\302\60\373g\17\36\60\263\177\66\0I\7so\302\37$J\22|\377\346\374\377\322\230\261C\210H\250"
"Ae\6\0K\42|\377\302\60S\247F\14\42\61h\310\30\42c&!\63\202\320\251\64JV\14\42"
"\61\352\230\375l\0L\15{\357\302\300\371\377\37>x\60\0M$}\17\203\310r\346N\245Q\263\202"
"E\12)L\224\60Q\302\310\20#C\214\14\61\23\306L\30s\366\335\0N#}\17\203@s\346\216"
"\35C\205*Q\42\23cL\214\61\62\304\310\20\63#\314\214\60\224\25f\327\231\33O\26}\17\317\251"
"\64KF\215\30g\377\337\215\30\65dM\252\63\0P\26|\377B\32%+F\35\263W\207H\254H"
"\203h\344\374%\0Q\31}\17S\261\64KF\215\30g\377oF\230\31q\246\210\42E%F\0R"
"\65d\324\210q\366\356\301w\366\273\1C\27}\17\317\251\64K\10!\63:\377\247\304F\20\42\261F"
"\21\22\0D\33}\17C\42\65KF\15\31\66b\330\210q\366\77;\66b\24\211%j\22\1E\21"
"|\377\302\7)\347%\42\214F\316/\37<\60F\20|\377\302\7)\347\313\64\331\214\234\177\11\0I"
"\7so\302\37$N#}\17\203@s\346\216\35C\205*Q\42\23cL\214\61\62\304\310\20\63#"
"\314\214\60\224\25f\327\231\33O\26}\17\317\251\64KF\215\30g\377\337\215\30\65dM\252\63\0R"
"\61\216\37\203\242\65L\206\221\30\67b\334\210q#\306\215\30\67b\30\211QD\230(J\65d\330\230"
"Qc\10\315j\314(\42\303H\214\33\61\356\340\0S!\216\37\317\261DKH\221\30\67b\334\210\261"
"c)M\246Ji\331\331\32\64\207\212D\223Uh\0T\15}\17\303\7\251\206\316\377\377\12\0U\21"
"|\377\302\60\373\377\317F\14\32\242\6\225\31\0X)~\37\303@\203\307H\14\33B\210\14\21RC"
"\206\241\63h\222(I\203\346\220\15\31E\204\14!\42\303F\20;h\341\0x\24\312\336\302 CG"
"H\240\61E\312\14\222)\6Y\64\0\0\0\0\4\377\377\0";
"Qc\10\315j\314(\42\303H\214\33\61\356\340\0S\42\216\37\317\261DKH\221\30\67b\334\210\261"
"c)M\226-\331\301c\307\32\64\207\212D\223Uh\0T\15}\17\303\7\251\206\316\377\377\12\0U"
"\21|\377\302\60\373\377\317F\14\32\242\6\225\31\0V\26\177\375\302H\373\377\345\210qCH\221\241\212"
"\4\271\223e\207\1X)~\37\303@\203\307H\14\33B\210\14\21RC\206\241\63h\222(I\203\346"
"\220\15\31E\204\14!\42\303F\20;h\341\0x\24\312\336\302 CGH\240\61E\312\14\222)\6"
"Y\64\0\0\0\0\4\377\377\0";
#define play_icon_width 14
#define play_icon_height 14
@ -287,31 +291,17 @@ void DisplayChannelPage() {
swingDivisionMark();
break;
case PARAM_CH_EUC_STEPS:
mainText = String(ch.getSteps());
mainText = String(ch.getSteps(withCvMod));
subText = "EUCLID STEPS";
break;
case PARAM_CH_EUC_HITS:
mainText = String(ch.getHits());
mainText = String(ch.getHits(withCvMod));
subText = "EUCLID HITS";
break;
case PARAM_CH_CV_SRC: {
mainText = F("SRC");
switch (ch.getCvSource()) {
case CV_NONE:
subText = F("NONE");
break;
case CV_1:
subText = F("CV 1");
break;
case CV_2:
subText = F("CV 2");
break;
}
break;
}
case PARAM_CH_CV_DEST: {
mainText = F("DEST");
switch (ch.getCvDestination()) {
case PARAM_CH_CV1_DEST:
case PARAM_CH_CV2_DEST: {
mainText = (app.selected_param == PARAM_CH_CV1_DEST) ? F("CV1") : F("CV2");
switch ((app.selected_param == PARAM_CH_CV1_DEST) ? ch.getCv1Dest() : ch.getCv2Dest()) {
case CV_DEST_NONE:
subText = F("NONE");
break;
@ -347,7 +337,7 @@ void DisplayChannelPage() {
// Draw Channel Page menu items
String menu_items[PARAM_CH_LAST] = {
F("MOD"), F("PROBABILITY"), F("DUTY"), F("OFFSET"), F("SWING"), F("EUCLID STEPS"),
F("EUCLID HITS"), F("CV SOURCE"), F("CV DEST")};
F("EUCLID HITS"), F("CV1 MOD"), F("CV2 MOD")};
drawMenuItems(menu_items, PARAM_CH_LAST);
}