Skip to content

Commit

Permalink
v2.0.1 Minor bug fixes, check log
Browse files Browse the repository at this point in the history
  • Loading branch information
neroroxxx committed Jun 16, 2023
1 parent 9562ae5 commit 008dc21
Show file tree
Hide file tree
Showing 30 changed files with 3,529 additions and 2,013 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=BMC
version=2.0.0
version=2.0.1
author=Nero Rox
maintainer=Nero Rox <info@roxxxtar.com>
sentence=Fully featured MIDI Controller Library with a Companion Editor App for 32-bit Teensy boards, Requires Teensyduino.
Expand Down
12 changes: 6 additions & 6 deletions src/BMC-Api.h
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ void getDeviceName(uint8_t deviceType, uint16_t index, char* str){
// otherwise once the last setlist is reached BMC will
// ignore this function
void setListNext(bool t_wrap){
setLists.scrollSet(BMC_NEXT, t_wrap, 1);
setLists.scrollSet(BMC_NEXT, t_wrap, 1, 0, BMC_MAX_SETLISTS-1);
}
// * GROUP: SETLISTS
// go to the previous setlist
Expand All @@ -687,7 +687,7 @@ void getDeviceName(uint8_t deviceType, uint16_t index, char* str){
// otherwise once the first setlist is reached BMC will
// ignore this function
void setListPrevious(bool t_wrap){
setLists.scrollSet(BMC_PREV, t_wrap, 1);
setLists.scrollSet(BMC_PREV, t_wrap, 1, 0, BMC_MAX_SETLISTS-1);
}
// * GROUP: SETLISTS
// returns the current song number in the setlist
Expand All @@ -706,7 +706,7 @@ void getDeviceName(uint8_t deviceType, uint16_t index, char* str){
// otherwise once the last song is reached BMC will
// ignore this function
void setListSongNext(bool t_wrap){
setLists.scrollSong(BMC_NEXT, t_wrap, 1);
setLists.scrollSong(BMC_NEXT, t_wrap, 1, 0, BMC_MAX_SETLISTS_SONGS-1);
}
// * GROUP: SETLISTS
// go to previous song in the list
Expand All @@ -715,7 +715,7 @@ void getDeviceName(uint8_t deviceType, uint16_t index, char* str){
// otherwise once the first song is reached BMC will
// ignore this function
void setListSongPrevious(bool t_wrap){
setLists.scrollSong(BMC_PREV, t_wrap, 1);
setLists.scrollSong(BMC_PREV, t_wrap, 1, 0, BMC_MAX_SETLISTS_SONGS-1);
}
// * GROUP: SETLISTS
// get the current song number in the setlist
Expand All @@ -734,7 +734,7 @@ void getDeviceName(uint8_t deviceType, uint16_t index, char* str){
// otherwise once the last song is reached BMC will
// ignore this function
void setListSongPartNext(bool t_wrap){
setLists.scrollPart(BMC_NEXT, t_wrap, 1);
setLists.scrollPart(BMC_NEXT, t_wrap, 1, 0, BMC_MAX_SETLISTS_SONG_PARTS-1);
}
// * GROUP: SETLISTS
// go to previous song in the list
Expand All @@ -743,7 +743,7 @@ void getDeviceName(uint8_t deviceType, uint16_t index, char* str){
// otherwise once the first song is reached BMC will
// ignore this function
void setListSongPartPrevious(bool t_wrap){
setLists.scrollPart(BMC_PREV, t_wrap, 1);
setLists.scrollPart(BMC_PREV, t_wrap, 1, 0, BMC_MAX_SETLISTS_SONG_PARTS-1);
}
// * GROUP: SETLISTS
// move a song within a setlist, you can move the song up or down
Expand Down
8 changes: 5 additions & 3 deletions src/BMC-Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@
*/

// BMC Version stored in EEPROM (for editor usage)
#define BMC_VERSION_MAJ 2
#define BMC_VERSION_MIN 0
#define BMC_VERSION_PATCH 0
#define BMC_VERSION_MAJ 2
#define BMC_VERSION_MIN 0
#define BMC_VERSION_PATCH 1

#define BMC_VERSION_STR "2.0.1"

//16 bits unsigned, LSB byte is minor, MSB byte is major
#define BMC_VERSION ((BMC_VERSION_MAJ<<8) | BMC_VERSION_MIN)
Expand Down
2 changes: 2 additions & 0 deletions src/BMC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ void BMC::update(){
}
oneSecondTimer = 0;
oneMilliSecondtimer = 0;
BMC_PRINTLN("");
BMC_PRINTLN("FIRST loop() complete");
}
if(globals.reloadLayer()){
Expand Down Expand Up @@ -279,6 +280,7 @@ void BMC::update(){
}
#if BMC_MAX_SETLISTS > 0
// used to re-trigger current preset
setLists.update();
if(globals.triggerSetListChange()){
setLists.set(setLists.get());
} else if(globals.triggerSongChange()){
Expand Down
72 changes: 38 additions & 34 deletions src/BMC.debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ void BMC::setupDebug(){
"line '#define BMC_DEBUG' from your config"
);
printBoardInfo();
BMC_PRINTLN("");
#ifdef BMC_USE_DAW_LC
#ifdef BMC_USE_DAW_LC
BMC_PRINTLN(">>>>> BMC_USE_DAW_LC <<<<<");
#endif
BMC_PRINTLN("");
}
void BMC::printDebugHeader(char* str){
BMC_PRINTLN("");
Expand All @@ -48,6 +48,8 @@ void BMC::readDebug(){
BMC_PRINTLN("board = Print Board Info");
BMC_PRINTLN("eeprom = Displays EEPROM.length()");
BMC_PRINTLN("objects = Displays the sizes of many objects used by BMC");
BMC_PRINTLN("sync = Displays the Sync Features Available");


#ifdef BMC_HAS_HARDWARE
BMC_PRINTLN("pins = Displays the pins for buttons/leds/pots/encoders");
Expand Down Expand Up @@ -138,6 +140,13 @@ void BMC::readDebug(){
printBoardInfo();
printDebugHeader(debugInput);

} else if(BMC_STR_MATCH(debugInput,"sync")){
printDebugHeader(debugInput);
printSyncInfo();
printDebugHeader(debugInput);




#if BMC_MAX_BUTTONS > 0 || BMC_MAX_GLOBAL_BUTTONS> 0
} else if(BMC_STR_MATCH(debugInput,"buttons")){
Expand Down Expand Up @@ -222,53 +231,26 @@ void BMC::readDebug(){
} else if(BMC_STR_MATCH(debugInput,"version")){

printDebugHeader(debugInput);
BMC_PRINTLNNS("BMC Library Version \"",BMC_VERSION_MAJ,".",BMC_VERSION_MIN,".",BMC_VERSION_PATCH,"\"");
BMC_PRINTLN("BMC Library Version", BMC_VERSION_STR);
BMC_PRINTLNNS("BMC Library Version stored in EEPROM ",'"',BMC_GET_BYTE(1,store.version),".",BMC_GET_BYTE(0,store.version),'"');
printDebugHeader(debugInput);

} else if(BMC_STR_MATCH(debugInput,"eeprom")){

printDebugHeader(debugInput);
BMC_PRINTLN("EEPROM size",editor.getEepromSize(),"bytes.");
BMC_PRINTLN("Store:", sizeof(bmcStore),"Bytes");
printDebugHeader(debugInput);

} else if(BMC_STR_MATCH(debugInput,"build")){

printDebugHeader(debugInput);
BMC_PRINTLN("BMC_DEVICE_NAME",BMC_DEVICE_NAME);
BMC_PRINT("BMC_EDITOR_SYSEX_ID",BMC_EDITOR_SYSEX_ID);
BMC_PRINTLN("BMC_DEVICE_NAME:",BMC_DEVICE_NAME);
BMC_PRINT("BMC_EDITOR_SYSEX_ID:",BMC_EDITOR_SYSEX_ID);
BMC_PRINTNS("0x");
BMC_PRINT_HEX(BMC_EDITOR_SYSEX_ID);
BMC_PRINTLN("");
BMC_PRINTLN("");
BMC_PRINTLN("*** GLOBAL ***");
BMC_PRINTLN("BMC_MAX_PRESETS", BMC_MAX_PRESETS);
BMC_PRINTLN("BMC_MAX_PRESET_ITEMS", BMC_MAX_PRESET_ITEMS);
BMC_PRINTLN("BMC_MAX_CUSTOM_SYSEX", BMC_MAX_CUSTOM_SYSEX);
BMC_PRINTLN("BMC_MAX_TRIGGERS", BMC_MAX_TRIGGERS);
BMC_PRINTLN("BMC_MAX_TIMED_EVENTS", BMC_MAX_TIMED_EVENTS);
BMC_PRINTLN("BMC_MAX_TEMPO_TO_TAP", BMC_MAX_TEMPO_TO_TAP);
BMC_PRINTLN("BMC_MAX_SKETCH_BYTES", BMC_MAX_SKETCH_BYTES);
BMC_PRINTLN("BMC_MAX_GLOBAL_BUTTONS", BMC_MAX_GLOBAL_BUTTONS);
BMC_PRINTLN("BMC_MAX_BUTTON_EVENTS", BMC_MAX_BUTTON_EVENTS);
BMC_PRINTLN("BMC_MAX_GLOBAL_ENCODERS", BMC_MAX_GLOBAL_ENCODERS);
BMC_PRINTLN("BMC_MAX_GLOBAL_POTS", BMC_MAX_GLOBAL_POTS);
BMC_PRINTLN("BMC_MAX_GLOBAL_LEDS", BMC_MAX_GLOBAL_LEDS);
BMC_PRINTLN("BMC_MAX_NL_RELAYS", BMC_MAX_NL_RELAYS);
BMC_PRINTLN("BMC_MAX_L_RELAYS", BMC_MAX_L_RELAYS);
BMC_PRINTLN("");
BMC_PRINTLN("*** LAYERS ***");
BMC_PRINTLN("BMC_MAX_LAYERS", BMC_MAX_LAYERS);
BMC_PRINTLN("BMC_MAX_BUTTONS", BMC_MAX_BUTTONS);
BMC_PRINTLN("BMC_MAX_BUTTON_EVENTS", BMC_MAX_BUTTON_EVENTS);
BMC_PRINTLN("BMC_MAX_ENCODERS", BMC_MAX_ENCODERS);
BMC_PRINTLN("BMC_MAX_POTS", BMC_MAX_POTS);
BMC_PRINTLN("BMC_MAX_LEDS", BMC_MAX_LEDS);
BMC_PRINTLN("BMC_MAX_ENCODERS", BMC_MAX_ENCODERS);
BMC_PRINTLN("BMC_MAX_POTS", BMC_MAX_POTS);
BMC_PRINTLN("BMC_MAX_PIXELS", BMC_MAX_PIXELS);
BMC_PRINTLN("BMC_MAX_RGB_PIXELS", BMC_MAX_RGB_PIXELS);

editor.printDevicesInfo();
BMC_PRINTLN("");
printDebugHeader(debugInput);
#ifdef BMC_HAS_HARDWARE
Expand Down Expand Up @@ -545,10 +527,32 @@ void BMC::printBoardInfo(){
BMC_PRINTLNNS("Teensy ", BMC_TEENSY_MODEL_STR," @ ",F_CPU/1000000.0,"MHz (",F_CPU,")");
BMC_PRINTLN("RAM:", BMC_TEENSY_RAM_SIZE,"Bytes");
BMC_PRINTLN("EEPROM:", BMC_TEENSY_EEPROM_SIZE,"Bytes");
BMC_PRINTLN("Store:", sizeof(bmcStore),"Bytes");
BMC_PRINTLN("USB Host:", BMC_TEENSY_HAS_USB_HOST?"Yes":"No");
BMC_PRINTLN("SD Card:", BMC_TEENSY_HAS_SD_CARD?"Yes":"No");
BMC_PRINTLN("Hardware Serial Ports:", BMC_TEENSY_TOTAL_SERIAL_PORTS);
}
void BMC::printSyncInfo(){
#if defined(BMC_USE_SYNC)
#if defined(BMC_USE_DAW_LC)
BMC_PRINTLN("DAW SYNC ENABLED");
#endif
#if defined(BMC_USE_FAS)
BMC_PRINTLN("FAS SYNC ENABLED");
#endif
#if defined(BMC_USE_HELIX)
BMC_PRINTLN("HELIX SYNC ENABLED");
#endif
#if defined(BMC_USE_BEATBUDDY)
BMC_PRINTLN("BEATBUDDY SYNC ENABLED");
#endif
#if defined(BMC_USE_KEMPER)
BMC_PRINTLN("KEMPER SYNC ENABLED");
#endif
#else
BMC_PRINTLN("SYNC UNAVAILABLE");
#endif
}
void BMC::midiInDebug(BMCMidiMessage message){
if(!globals.getMidiInDebug() || message.getStatus()==BMC_NONE){
return;
Expand Down
1 change: 1 addition & 0 deletions src/BMC.editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ void BMC::assignStoreData(){
}
void BMC::assignSettings(){
// Set the global settings
globals.offset = settings.getDisplayOffset()?0:1;
midiClock.setMaster(settings.getMasterClock());
midiActiveSense.setOutputPorts(settings.getListenerPorts());
midi.setListenerEnable(settings.getIncomingListenerEnabled());
Expand Down
Loading

0 comments on commit 008dc21

Please sign in to comment.