uart: further clean up

This commit is contained in:
Joo Aun Saw 2022-08-30 09:53:39 +10:00 committed by Johny Mattsson
parent 5e6cb4d1fa
commit 0e71189c11
1 changed files with 3 additions and 5 deletions

View File

@ -144,12 +144,10 @@ static int uart_setup( lua_State* L )
databits = luaL_checkinteger( L, 3 );
parity = luaL_checkinteger( L, 4 );
stopbits = luaL_checkinteger( L, 5 );
if(id == CONFIG_ESP_CONSOLE_UART_NUM){
if (!lua_isnoneornil(L, 6)) {
if (!lua_isnoneornil(L, 6)) {
if(id == CONFIG_ESP_CONSOLE_UART_NUM){
input_echo = luaL_checkinteger(L, 6) > 0;
}
} else {
if (!lua_isnoneornil(L, 6)) {
} else {
luaL_checktable(L, 6);
lua_getfield (L, 6, "tx");