Force flags from dipSw to "nice 1-bit values" to prevent menus from locking up
This commit is contained in:
parent
16e9bd0407
commit
9fbfde3867
1 changed files with 7 additions and 7 deletions
|
@ -155,13 +155,13 @@ bool readEEPROM() {
|
||||||
if(trill3_interval<3 || trill3_interval > 4) trill3_interval = TRILL3_INTERVAL_FACTORY; //Deal with possible zero/bad values
|
if(trill3_interval<3 || trill3_interval > 4) trill3_interval = TRILL3_INTERVAL_FACTORY; //Deal with possible zero/bad values
|
||||||
|
|
||||||
//Flags stored in bit field
|
//Flags stored in bit field
|
||||||
fastBoot = dipSwBits & (1<<DIPSW_FASTBOOT);
|
fastBoot = (dipSwBits & (1<<DIPSW_FASTBOOT))?1:0;
|
||||||
legacy = dipSwBits & (1<<DIPSW_LEGACY);
|
legacy = (dipSwBits & (1<<DIPSW_LEGACY))?1:0;
|
||||||
legacyBrAct = dipSwBits & (1<<DIPSW_LEGACYBRACT);
|
legacyBrAct = (dipSwBits & (1<<DIPSW_LEGACYBRACT))?1:0;
|
||||||
slowMidi = dipSwBits & (1<<DIPSW_SLOWMIDI);
|
slowMidi = (dipSwBits & (1<<DIPSW_SLOWMIDI))?1:0;
|
||||||
gateOpenEnable = dipSwBits & (1<<DIPSW_GATEOPEN);
|
gateOpenEnable = (dipSwBits & (1<<DIPSW_GATEOPEN))?1:0;
|
||||||
specialKeyEnable = dipSwBits & (1<<DIPSW_SPKEYENABLE);
|
specialKeyEnable = (dipSwBits & (1<<DIPSW_SPKEYENABLE))?1:0;
|
||||||
bcasMode = dipSwBits & (1<<DIPSW_BCASMODE);
|
bcasMode = (dipSwBits & (1<<DIPSW_BCASMODE))?1:0;
|
||||||
|
|
||||||
return hasWritten;
|
return hasWritten;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue