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
ee2e7912
Commit
ee2e7912
authored
Dec 30, 2014
by
funshine
Browse files
serial input now accept non-ascii chars
parent
5209c099
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/lua/lua.c
View file @
ee2e7912
...
@@ -616,15 +616,15 @@ void ICACHE_FLASH_ATTR readline(lua_Load *load){
...
@@ -616,15 +616,15 @@ void ICACHE_FLASH_ATTR readline(lua_Load *load){
load
->
line
[
load
->
line_position
]
=
0
;
load
->
line
[
load
->
line_position
]
=
0
;
continue
;
continue
;
}
}
/* EO
F
(ctrl+d) */
/* EO
T
(ctrl+d) */
else
if
(
ch
==
0x04
)
//
else if (ch == 0x04)
{
//
{
if
(
load
->
line_position
==
0
)
//
if (load->line_position == 0)
// No input which makes lua interpreter close
//
// No input which makes lua interpreter close
donejob
(
load
);
//
donejob(load);
else
//
else
continue
;
//
continue;
}
//
}
/* end of line */
/* end of line */
if
(
ch
==
'\r'
||
ch
==
'\n'
)
if
(
ch
==
'\r'
||
ch
==
'\n'
)
...
@@ -648,10 +648,11 @@ void ICACHE_FLASH_ATTR readline(lua_Load *load){
...
@@ -648,10 +648,11 @@ void ICACHE_FLASH_ATTR readline(lua_Load *load){
}
}
/* other control character or not an acsii character */
/* other control character or not an acsii character */
if
(
ch
<
0x20
||
ch
>=
0x80
)
// if (ch < 0x20 || ch >= 0x80)
{
// {
continue
;
// continue;
}
// }
/* echo */
/* echo */
if
(
uart0_echo
)
uart_putc
(
ch
);
if
(
uart0_echo
)
uart_putc
(
ch
);
...
...
bin/.gitignore
View file @
ee2e7912
...
@@ -4,4 +4,5 @@
...
@@ -4,4 +4,5 @@
*.bin
*.bin
*.bin_rep
*.bin_rep
!.gitignore
!.gitignore
!blank.bin
!esp_init_data_default.bin
bin/blank.bin
0 → 100644
View file @
ee2e7912
\ No newline at end of file
bin/esp_init_data_default.bin
0 → 100644
View file @
ee2e7912
File added
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