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