diff --git a/MicroDexed.ino b/MicroDexed.ino index e5ae1a2..2cc28b4 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -916,7 +916,7 @@ bool checkMidiChannel(byte inChannel, uint8_t instance_id) void init_MIDI_send_CC(void) { #ifdef DEBUG - Serial.println("init_MIDI_send_CC():"); + Serial.println(F("init_MIDI_send_CC():")); #endif MD_sendControlChange(configuration.dexed[selected_instance_id].midi_channel, 7, configuration.dexed[selected_instance_id].sound_intensity); MD_sendControlChange(configuration.dexed[selected_instance_id].midi_channel, 10, configuration.dexed[selected_instance_id].pan); @@ -2991,7 +2991,7 @@ void show_patch(uint8_t instance_id) Serial.println(F("+======+======+======+======+======+======+======+======+================+================+================+")); Serial.println(F("| R1 | R2 | R3 | R4 | L1 | L2 | L3 | L4 | LEV_SCL_BRK_PT | SCL_LEFT_DEPTH | SCL_RGHT_DEPTH |")); Serial.println(F("+------+------+------+------+------+------+------+------+----------------+----------------+----------------+")); - Serial.print("| "); + Serial.print(F("| ")); SerialPrintFormatInt3(MicroDexed[instance_id]->getVoiceDataElement((i * 21) + DEXED_OP_EG_R1)); Serial.print(F(" | ")); SerialPrintFormatInt3(MicroDexed[instance_id]->getVoiceDataElement((i * 21) + DEXED_OP_EG_R2)); diff --git a/UI.hpp b/UI.hpp index b352aa5..f739fae 100644 --- a/UI.hpp +++ b/UI.hpp @@ -690,7 +690,7 @@ void lcdml_menu_control(void) else if ((millis() - g_LCDML_CONTROL_button_press_time[ENC_R]) >= LONG_BUTTON_PRESS) { #ifdef DEBUG - Serial.println("ENC-R long released"); + Serial.println(F("ENC-R long released")); #endif //LCDML.BT_quit(); encoderDir[ENC_R].ButtonLong(true); @@ -710,7 +710,7 @@ void lcdml_menu_control(void) if (encoderDir[ENC_R].ButtonPressed() == true && (millis() - g_LCDML_CONTROL_button_press_time[ENC_R]) >= LONG_BUTTON_PRESS) { #ifdef DEBUG - Serial.println("ENC-R long recognized"); + Serial.println(F("ENC-R long recognized")); #endif encoderDir[ENC_R].ButtonLong(true); @@ -6688,9 +6688,9 @@ uint8_t search_accepted_char(uint8_t c) for (uint8_t i = 0; i < sizeof(accepted_chars) - 1; i++) { Serial.print(i, DEC); - Serial.print(":"); + Serial.print(F(":")); Serial.print(c); - Serial.print("=="); + Serial.print(F("==")); Serial.println(accepted_chars[i], DEC); if (c == accepted_chars[i]) return (i); @@ -7287,14 +7287,14 @@ bool check_favorite(uint8_t b, uint8_t v, uint8_t instance_id) { snprintf_P(tmp, sizeof(tmp), PSTR("/%s/%d/%d.fav"), FAV_CONFIG_PATH, b, v); #ifdef DEBUG - Serial.print("check if Voice is a Favorite: "); + Serial.print(F("check if Voice is a Favorite: ")); Serial.print(tmp); Serial.println(); #endif if (SD.exists(tmp)) { //is Favorite #ifdef DEBUG - Serial.println(" - It is in Favorites."); + Serial.println(F(" - It is in Favorites.")); #endif return true; } @@ -7302,7 +7302,7 @@ bool check_favorite(uint8_t b, uint8_t v, uint8_t instance_id) { // it was not a favorite #ifdef DEBUG - Serial.println(" - It is not in Favorites."); + Serial.println(F(" - It is not in Favorites.")); #endif return false; } @@ -7350,14 +7350,14 @@ bool quick_check_favorites_in_bank(uint8_t b, uint8_t instance_id) { snprintf_P(tmp, sizeof(tmp), PSTR("/%s/%d"), FAV_CONFIG_PATH, b); #ifdef DEBUG - Serial.print("check if there is a Favorite in Bank: "); + Serial.print(F("check if there is a Favorite in Bank: ")); Serial.print(tmp); Serial.println(); #endif if (SD.exists(tmp) ) { // this bank HAS at least 1 favorite(s) #ifdef DEBUG - Serial.println("quickcheck found a FAV in bank!"); + Serial.println(F("quickcheck found a FAV in bank!")); #endif return (true); } @@ -7365,7 +7365,7 @@ bool quick_check_favorites_in_bank(uint8_t b, uint8_t instance_id) { // no favorites in bank stored return (false); #ifdef DEBUG - Serial.println(" - It is no Favorite in current Bank."); + Serial.println(F(" - It is no Favorite in current Bank.")); #endif } } @@ -7376,7 +7376,7 @@ bool quick_check_favorites_in_bank(uint8_t b, uint8_t instance_id) void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id) { #ifdef DEBUG - Serial.println("Starting saving Favorite."); + Serial.println(F("Starting saving Favorite.")); #endif b = constrain(b, 0, MAX_BANKS - 1); v = constrain(v, 0, MAX_VOICES - 1); @@ -7389,7 +7389,7 @@ void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id) snprintf_P(tmp, sizeof(tmp), PSTR("/%s/%d/%d.fav"), FAV_CONFIG_PATH, b, v); snprintf_P(tmpfolder, sizeof(tmpfolder), PSTR("/%s/%d"), FAV_CONFIG_PATH, b); #ifdef DEBUG - Serial.println("Save Favorite to SD card..."); + Serial.println(F("Save Favorite to SD card...")); Serial.println(tmp); #endif if (!SD.exists(tmp)) @@ -7400,7 +7400,7 @@ void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id) } myFav = SD.open(tmp, FILE_WRITE); myFav.close(); - Serial.println("Favorite saved..."); + Serial.println(F("Favorite saved...")); #ifdef TESTDISPLAY20x4 display.setCursor(17, 0); #else @@ -7408,14 +7408,14 @@ void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id) #endif display.write(2); //fav symbol #ifdef DEBUG - Serial.println("Added to Favorites..."); + Serial.println(F("Added to Favorites...")); #endif } else { // delete the file, is no longer a favorite SD.remove(tmp); #ifdef DEBUG - Serial.println("Removed from Favorites..."); + Serial.println(F("Removed from Favorites...")); #endif for (i = 0; i < 32; i++) { //if no other favs exist in current bank, remove folder snprintf_P(tmp, sizeof(tmp), PSTR("/%s/%d/%d.fav"), FAV_CONFIG_PATH, b, i); @@ -7425,9 +7425,9 @@ void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id) snprintf_P(tmp, sizeof(tmp), PSTR("/%s/%d"), FAV_CONFIG_PATH, b); SD.rmdir(tmp); #ifdef DEBUG - Serial.println("Fav count in bank:"); + Serial.println(F("Fav count in bank:")); Serial.print(countfavs); - Serial.println("Removed folder since no voice in bank flagged as favorite any more"); + Serial.println(F("Removed folder since no voice in bank flagged as favorite any more")); #endif } #ifdef TESTDISPLAY20x4 @@ -7437,7 +7437,7 @@ void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id) #endif display.print(" "); //remove fav symbol #ifdef DEBUG - Serial.println("Removed from Favorites..."); + Serial.println(F("Removed from Favorites...")); #endif } } diff --git a/dexed_sd.cpp b/dexed_sd.cpp index 515464d..83bfd90 100644 --- a/dexed_sd.cpp +++ b/dexed_sd.cpp @@ -527,7 +527,7 @@ bool save_sd_drumsettings_json(uint8_t number) AudioNoInterrupts(); if (SD.exists(filename)) { #ifdef DEBUG - Serial.println("remove old drumsettings file"); + Serial.println(F("remove old drumsettings file")); #endif SD.begin(); SD.remove(filename);