From b752880735735eb05733cf797a2ab276afe40bd6 Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Sun, 11 Dec 2022 18:19:18 +0100 Subject: [PATCH] Moved some debug strings into flashmem. --- MicroDexed.ino | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/MicroDexed.ino b/MicroDexed.ino index 0e9053f..48209c7 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -1973,7 +1973,6 @@ void check_configuration_drums(void) { configuration.drums.midi_channel = constrain(configuration.drums.midi_channel, DRUMS_MIDI_CHANNEL_MIN, DRUMS_MIDI_CHANNEL_MAX); for (uint8_t i = 0; i < NUM_DRUMSET_CONFIG - 1; i++) { - Serial.printf("CHK m=%d\n", drum_config[i].midinote); drum_config[i].midinote = constrain(drum_config[i].midinote, DRUMS_MIDI_NOTE_MIN, DRUMS_MIDI_NOTE_MAX); drum_config[i].pitch = constrain(drum_config[i].pitch, DRUMS_PITCH_MIN, DRUMS_PITCH_MAX); drum_config[i].pan = constrain(drum_config[i].pan, DRUMS_PANORAMA_MIN, DRUMS_PANORAMA_MAX); @@ -2344,7 +2343,7 @@ int8_t handle_midi_learn(int8_t note) { int8_t ret_channel = -1; #ifdef DEBUG - Serial.print("MIDI learning for "); + Serial.print(F("MIDI learning for ")); Serial.println(note); #endif @@ -2358,9 +2357,9 @@ int8_t handle_midi_learn(int8_t note) { configuration.epiano.lowest_note = note; ret_channel = configuration.epiano.midi_channel; #ifdef DEBUG - Serial.print("MIDI learned lowest note: "); + Serial.print(F("MIDI learned lowest note: ")); Serial.print(note); - Serial.print(" for EPiano, ghosting MIDI channel "); + Serial.print(F(" for EPiano, ghosting MIDI channel ")); Serial.println(ret_channel); #endif } else if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_epiano_highest_note)) { @@ -2370,9 +2369,9 @@ int8_t handle_midi_learn(int8_t note) { configuration.epiano.highest_note = note; ret_channel = configuration.epiano.midi_channel; #ifdef DEBUG - Serial.print("MIDI learned highest note: "); + Serial.print(F("MIDI learned highest note: ")); Serial.print(note); - Serial.print(" for EPiano, ghosting MIDI channel "); + Serial.print(F(" for EPiano, ghosting MIDI channel ")); Serial.println(ret_channel); #endif } @@ -2386,11 +2385,11 @@ int8_t handle_midi_learn(int8_t note) { configuration.dexed[selected_instance_id].lowest_note = note; ret_channel = configuration.dexed[selected_instance_id].midi_channel; #ifdef DEBUG - Serial.print("MIDI learned lowest note: "); + Serial.print(F("MIDI learned lowest note: ")); Serial.print(note); - Serial.print(" for instance: "); + Serial.print(F(" for instance: ")); Serial.print(selected_instance_id); - Serial.print(", ghosting MIDI channel "); + Serial.print(F(", ghosting MIDI channel ")); Serial.println(ret_channel); #endif } else if (LCDML.FUNC_getID() == LCDML.OTHER_getIDFromFunction(UI_func_highest_note)) { @@ -2400,11 +2399,11 @@ int8_t handle_midi_learn(int8_t note) { configuration.dexed[selected_instance_id].highest_note = note; ret_channel = configuration.dexed[selected_instance_id].midi_channel; #ifdef DEBUG - Serial.print("MIDI learned highest note: "); + Serial.print(F("MIDI learned highest note: ")); Serial.print(note); - Serial.print(" for instance: "); + Serial.print(F(" for instance: ")); Serial.print(selected_instance_id); - Serial.print(", ghosting MIDI channel "); + Serial.print(F(", ghosting MIDI channel ")); Serial.println(ret_channel); #endif }