diff --git a/UI.hpp b/UI.hpp index 23e63c8..4a31960 100644 --- a/UI.hpp +++ b/UI.hpp @@ -265,6 +265,7 @@ void lcd_active_instance_number(uint8_t instance_id); void lcd_OP_active_instance_number(uint8_t instance_id, uint8_t op); void lcd_special_chars(uint8_t mode); void eeprom_update_var(uint16_t pos, uint8_t val, const char* val_string); +void lcd_display_delay_sync(uint8_t sync); void string_trim(char *s); void save_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); @@ -1376,7 +1377,7 @@ void UI_func_delay_time(uint8_t param) lcd_special_chars(BLOCKBAR); if (configuration.fx.delay_sync[selected_instance_id] > 0) { - lcd_display_bar_int("Delay Sync", configuration.fx.delay_sync[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 4, false, false, true); + lcd_display_delay_sync(configuration.fx.delay_sync[selected_instance_id]); } else { @@ -1437,7 +1438,7 @@ void UI_func_delay_time(uint8_t param) if (configuration.fx.delay_sync[selected_instance_id] > 0) { - lcd_display_bar_int("Delay Sync", configuration.fx.delay_sync[selected_instance_id], 10.0, DELAY_TIME_MIN, DELAY_TIME_MAX, 4, false, false, true); + lcd_display_delay_sync(configuration.fx.delay_sync[selected_instance_id]); } else { @@ -6029,6 +6030,41 @@ void lcd_special_chars(uint8_t mode) } } +void lcd_display_delay_sync(uint8_t sync) +{ + lcd.show(0, 0, LCD_cols - 2, "Delay Sync"); + lcd.show(1, 0, 10, "MIDI Sync "); + switch (sync) + { + case 1: + lcd.show(1, 10, 5, "1/16"); + break; + case 2: + lcd.show(1, 10, 5, "1/16T"); + break; + case 3: + lcd.show(1, 10, 5, "1/8"); + break; + case 4: + lcd.show(1, 10, 5, "1/8T"); + break; + case 5: + lcd.show(1, 10, 5, "1/4"); + break; + case 6: + lcd.show(1, 10, 5, "1/4T"); + break; + case 7: + lcd.show(1, 10, 5, "1/2"); + break; + case 8: + lcd.show(1, 10, 5, "1/2T"); + break; + case 9: + lcd.show(1, 10, 5, "1/1"); + break; + } +} void eeprom_update_var(uint16_t pos, uint8_t val, const char* val_string) { #ifdef DEBUG @@ -6086,7 +6122,7 @@ void locate_previous_favorite() { configuration.performance.bank[selected_instance_id] = MAX_BANKS - 1; configuration.performance.voice[selected_instance_id] = 32; - } + } if (configuration.performance.voice[selected_instance_id] >= 1 && configuration.performance.bank[selected_instance_id] >= 0) { @@ -6096,15 +6132,15 @@ void locate_previous_favorite() do { //first find previous fav in current bank configuration.performance.voice[selected_instance_id]--; - favsearcher++; + favsearcher++; } while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], - selected_instance_id) == false && configuration.performance.voice[selected_instance_id] >= 1 && favsearcher < 18); + selected_instance_id) == false && configuration.performance.voice[selected_instance_id] >= 1 && favsearcher < 18); - // if found, we are done. else quick check in previous banks + // if found, we are done. else quick check in previous banks if ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], - selected_instance_id) == false && configuration.performance.voice[selected_instance_id] >= 0 && + selected_instance_id) == false && configuration.performance.voice[selected_instance_id] >= 0 && configuration.performance.bank[selected_instance_id] >= 0 && favsearcher < 170) { configuration.performance.voice[selected_instance_id] = 32; @@ -6113,14 +6149,14 @@ void locate_previous_favorite() configuration.performance.bank[selected_instance_id]--; favsearcher++; } while (quick_check_favorites_in_bank(configuration.performance.bank[selected_instance_id], selected_instance_id) == false && - favsearcher < 132 && configuration.performance.bank[selected_instance_id] >= 0); + favsearcher < 132 && configuration.performance.bank[selected_instance_id] >= 0); do { //last try to search if a bank with fav was found configuration.performance.voice[selected_instance_id]--; favsearcher++; } while ( check_favorite(configuration.performance.bank[selected_instance_id], configuration.performance.voice[selected_instance_id], - selected_instance_id) == false && configuration.performance.voice[selected_instance_id] >= 1 && favsearcher < 170); + selected_instance_id) == false && configuration.performance.voice[selected_instance_id] >= 1 && favsearcher < 170); } } favsearcher = 0;