Browse Source

serial input now accept non-ascii chars

funshine 9 years ago
parent
commit
ee2e791282
4 changed files with 16 additions and 14 deletions
  1. 14 13
      app/lua/lua.c
  2. 2 1
      bin/.gitignore
  3. 0 0
      bin/blank.bin
  4. BIN
      bin/esp_init_data_default.bin

+ 14 - 13
app/lua/lua.c

@@ -616,15 +616,15 @@ void ICACHE_FLASH_ATTR readline(lua_Load *load){
         load->line[load->line_position] = 0;
         continue;
       }
-      /* EOF(ctrl+d) */
-      else if (ch == 0x04)
-      {
-        if (load->line_position == 0)
-          // No input which makes lua interpreter close 
-          donejob(load);
-        else
-          continue;
-      }
+      /* EOT(ctrl+d) */
+      // else if (ch == 0x04)
+      // {
+      //   if (load->line_position == 0)
+      //     // No input which makes lua interpreter close 
+      //     donejob(load);
+      //   else
+      //     continue;
+      // }
 
       /* end of line */
       if (ch == '\r' || ch == '\n')
@@ -648,10 +648,11 @@ void ICACHE_FLASH_ATTR readline(lua_Load *load){
       }
 
       /* other control character or not an acsii character */
-      if (ch < 0x20 || ch >= 0x80)
-      {
-        continue;
-      }
+      // if (ch < 0x20 || ch >= 0x80)
+      // {
+      //   continue;
+      // }
+      
       /* echo */
       if(uart0_echo) uart_putc(ch);
 

+ 2 - 1
bin/.gitignore

@@ -4,4 +4,5 @@
 *.bin
 *.bin_rep
 !.gitignore
-
+!blank.bin
+!esp_init_data_default.bin

File diff suppressed because it is too large
+ 0 - 0
bin/blank.bin


BIN
bin/esp_init_data_default.bin


Some files were not shown because too many files changed in this diff