Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
1b03f01e
Commit
1b03f01e
authored
Dec 26, 2014
by
zeroday
Browse files
Merge pull request #51 from nodemcu/dev094
fix a bug when readline from uart
parents
fe07b12e
1a7884c2
Changes
1
Show whitespace changes
Inline
Side-by-side
app/lua/lua.c
View file @
1b03f01e
...
@@ -648,11 +648,6 @@ void ICACHE_FLASH_ATTR readline(lua_Load *load){
...
@@ -648,11 +648,6 @@ void ICACHE_FLASH_ATTR readline(lua_Load *load){
else
else
continue
;
continue
;
}
}
/* other control character or not an acsii character */
else
if
(
ch
<
0x20
||
ch
>=
0x80
)
{
continue
;
}
/* end of line */
/* end of line */
if
(
ch
==
'\r'
||
ch
==
'\n'
)
if
(
ch
==
'\r'
||
ch
==
'\n'
)
{
{
...
@@ -675,7 +670,11 @@ void ICACHE_FLASH_ATTR readline(lua_Load *load){
...
@@ -675,7 +670,11 @@ void ICACHE_FLASH_ATTR readline(lua_Load *load){
os_timer_arm
(
&
lua_timer
,
READLINE_INTERVAL
,
0
);
// no repeat
os_timer_arm
(
&
lua_timer
,
READLINE_INTERVAL
,
0
);
// no repeat
}
}
}
}
/* other control character or not an acsii character */
if
(
ch
<
0x20
||
ch
>=
0x80
)
{
continue
;
}
/* echo */
/* echo */
if
(
uart0_echo
)
uart_putc
(
ch
);
if
(
uart0_echo
)
uart_putc
(
ch
);
load
->
line
[
load
->
line_position
]
=
ch
;
load
->
line
[
load
->
line_position
]
=
ch
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment