Added last parts of UI for MIDI sync'd delay.

pull/46/head
Holger Wirtz 3 years ago
parent 52d8beac5b
commit 19d1bfdfa4
  1. 40
      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

Loading…
Cancel
Save