Update UART settings.

This commit is contained in:
sorgelig
2020-04-22 22:59:14 +08:00
parent 72d8831068
commit e59bb17eaa
5 changed files with 30 additions and 16 deletions

View File

@@ -2239,8 +2239,7 @@ void HandleUI(void)
uint mode = GetUARTMode() + 1;
if (mode > sizeof(config_uart_msg) / sizeof(config_uart_msg[0])) mode = 0;
sprintf(s, "uartmode %d", mode);
system(s);
SetUARTMode(mode);
menustate = MENU_UART1;
}
break;
@@ -2251,10 +2250,8 @@ void HandleUI(void)
{
int mode = GetUARTMode();
SetMidiLinkMode(GetMidiLinkMode() ^ ((menusub == 1) ? 2 : 1));
sprintf(s, "uartmode %d", 0);
system(s);
sprintf(s, "uartmode %d", mode);
system(s);
SetUARTMode(0);
SetUARTMode(mode);
menustate = MENU_UART1;
}
break;
@@ -2263,10 +2260,8 @@ void HandleUI(void)
int mode = GetUARTMode();
if(mode != 0)
{
sprintf(s, "uartmode %d", 0);
system(s);
sprintf(s, "uartmode %d", mode);
system(s);
SetUARTMode(0);
SetUARTMode(mode);
menustate = MENU_8BIT_SYSTEM1;
}
}