|
|
|
@ -170,9 +170,8 @@ const uint8_t special_chars[19][8] = { |
|
|
|
|
{B00000, B11111, B11111, B11111, B11111, B11111, B11111, B11111}, // [14] Level 7
|
|
|
|
|
{B11111, B11111, B11111, B11111, B11111, B11111, B11111, B11111}, // [15] Level 8
|
|
|
|
|
{B00100, B00110, B00101, B00101, B01101, B11101, B11100, B11000}, // [16] Note
|
|
|
|
|
//{B01110, B10001, B10001, B11111, B11011, B11011, B11111, B00000} // [17] Disabled 2nd instance symbol
|
|
|
|
|
{B01110, B10001, B10001, B01110, B00100, B00100, B00110, B00110}, // [17] Disabled 2nd instance symbol
|
|
|
|
|
{B11111, B10001, B10111, B10001, B10111, B10111, B10111, B11111} // [18]Favorites Icon
|
|
|
|
|
{B11111, B10001, B10111, B10001, B10111, B10111, B10111, B11111} // [18] Favorites Icon
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
enum { SCROLLBAR, BLOCKBAR, METERBAR }; |
|
|
|
@ -755,7 +754,7 @@ void lcdml_menu_control(void) |
|
|
|
|
Serial.println(F("ENC-L long recognized")); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
save_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], selected_instance_id); |
|
|
|
|
//save_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], selected_instance_id);
|
|
|
|
|
|
|
|
|
|
//for (uint8_t i = 0; i < NUM_DEXED; i++)
|
|
|
|
|
// MicroDexed[i]->panic();
|
|
|
|
@ -5974,7 +5973,6 @@ bool check_favorite(uint8_t b, uint8_t v, uint8_t instance_id) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void draw_favorite_icon(uint8_t b, uint8_t v, uint8_t instance_id) |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
b = constrain(b, 0, MAX_BANKS - 1); |
|
|
|
|
v = constrain(v, 0, MAX_VOICES - 1); |
|
|
|
@ -5987,40 +5985,31 @@ void draw_favorite_icon(uint8_t b, uint8_t v, uint8_t instance_id) |
|
|
|
|
|
|
|
|
|
if (SD.exists(tmp)) |
|
|
|
|
{ //is Favorite
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(15, 1); |
|
|
|
|
//lcd.print("F");
|
|
|
|
|
lcd.setCursor(12, 0); |
|
|
|
|
lcd.write(2); //fav symbol
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ // it was not a favorite
|
|
|
|
|
|
|
|
|
|
lcd.setCursor(15, 1); |
|
|
|
|
lcd.setCursor(12, 0); |
|
|
|
|
lcd.print(" "); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool quick_check_favorites_in_bank(uint8_t b, uint8_t instance_id) |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
b = constrain(b, 0, MAX_BANKS - 1); |
|
|
|
|
|
|
|
|
|
char tmp[18]; |
|
|
|
|
|
|
|
|
|
if (sd_card > 0) |
|
|
|
|
{ |
|
|
|
|
sprintf(tmp, "/%s/%d/hasfav", FAV_CONFIG_PATH, b); |
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print("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 |
|
|
|
@ -6028,24 +6017,17 @@ bool quick_check_favorites_in_bank(uint8_t b, uint8_t instance_id) |
|
|
|
|
#endif |
|
|
|
|
return (true); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
|
|
{ // no favorites in bank stored
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return (false); |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.println(" - It is no Favorite in current Bank."); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
} else return false; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id) |
|
|
|
|
|
|
|
|
|
{ |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.println("Starting saving Favorite."); |
|
|
|
@ -6059,9 +6041,7 @@ void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id) |
|
|
|
|
|
|
|
|
|
if (sd_card > 0) |
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
sprintf(tmp, "/%s/%d/%d.fav", FAV_CONFIG_PATH, b, v); |
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.println("Save Favorite to SD card..."); |
|
|
|
|
Serial.println(tmp); |
|
|
|
@ -6085,13 +6065,11 @@ void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id) |
|
|
|
|
} |
|
|
|
|
lcd.setCursor(15, 1); |
|
|
|
|
lcd.write(2); //fav symbol
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.println("Added to Favorites..."); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
|
|
|
|
|
{ // delete the file, is no longer a favorite
|
|
|
|
|
SD.remove(tmp); |
|
|
|
|
#ifdef DEBUG |
|
|
|
@ -6109,11 +6087,9 @@ void save_favorite(uint8_t b, uint8_t v, uint8_t instance_id) |
|
|
|
|
Serial.print(countfavs); |
|
|
|
|
Serial.println("Removed hasfav file since no voice in bank flagged as favorite any more"); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
lcd.setCursor(15, 1); |
|
|
|
|
lcd.print(" "); //remove fav symbol
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.println("Removed from Favorites..."); |
|
|
|
|
#endif |
|
|
|
|