diff --git a/README.md b/README.md index 716d3581..27cab97e 100644 --- a/README.md +++ b/README.md @@ -26,19 +26,18 @@ Tencent QQ group QQ群: 309957875
- add coap module # Change log +2015-01-08
+fix net.socket:send() issue when multi sends are called.
+*NOTE*: if data length is bigger than 1460, send next packet AFTER "sent" callback is called.
+fix file.read() api, take 0xFF as a regular byte, not EOF.
+pre_build/latest/nodemcu_512k_latest.bin is removed. use pre_build/latest/nodemcu_latest.bin instead. + 2015-01-07
retrive more ram back.
add api file.format() to rebuild file system.
rename "NodeMcu" to "NodeMCU" in firmware.
add some check for file system op. -2015-01-06
-update sdk to 0.9.5.
-pre_build bin now compiled by gcc toolchain.
-memory/heap usage optimized.
-add support for multiple platform and toolchain include eclipse.
-combine firmware for 512K, 1M, 2M, 4M flash to one. flash size auto-detected. - [more change log](https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_en#change_log)
[更多变更日志](https://github.com/nodemcu/nodemcu-firmware/wiki/nodemcu_api_cn#change_log) diff --git a/app/.settings/language.settings.xml b/app/.settings/language.settings.xml index 1e3a8ec5..d4c4a342 100644 --- a/app/.settings/language.settings.xml +++ b/app/.settings/language.settings.xml @@ -5,7 +5,7 @@ - + diff --git a/app/include/user_config.h b/app/include/user_config.h index 8e784520..fa71de0a 100644 --- a/app/include/user_config.h +++ b/app/include/user_config.h @@ -7,7 +7,7 @@ #define NODE_VERSION_INTERNAL 0U #define NODE_VERSION "NodeMCU 0.9.5" -#define BUILD_DATE "build 20150107" +#define BUILD_DATE "build 20150108" // #define FLASH_512K // #define FLASH_1M diff --git a/app/lwip/app/espconn.c b/app/lwip/app/espconn.c index 15dcc2dd..bd81e4d6 100644 --- a/app/lwip/app/espconn.c +++ b/app/lwip/app/espconn.c @@ -272,7 +272,8 @@ espconn_sent(struct espconn *espconn, uint8 *psent, uint16 length) value = espconn_find_connection(espconn, &pnode); switch (espconn ->type) { case ESPCONN_TCP: - if (value && (pnode->pcommon.write_len == pnode->pcommon.write_total)){ + // if (value && (pnode->pcommon.write_len == pnode->pcommon.write_total)){ + if (value && (pnode->pcommon.cntr == 0)){ espconn_tcp_sent(pnode, psent, length); }else return ESPCONN_ARG; diff --git a/app/lwip/app/espconn_tcp.c b/app/lwip/app/espconn_tcp.c index df92929a..9cc7129d 100644 --- a/app/lwip/app/espconn_tcp.c +++ b/app/lwip/app/espconn_tcp.c @@ -188,7 +188,7 @@ espconn_tcp_sent(void *arg, uint8 *psent, uint16 length) data_to_send = true; ptcp_sent->pcommon.ptrbuf = psent + len; ptcp_sent->pcommon.cntr = length - len; - ptcp_sent->pcommon.write_len = len; + ptcp_sent->pcommon.write_len += len; espconn_printf("espconn_tcp_sent sending %d bytes, remain %d\n", len, ptcp_sent->pcommon.cntr); } diff --git a/app/modules/file.c b/app/modules/file.c index fa7628d3..f6548890 100644 --- a/app/modules/file.c +++ b/app/modules/file.c @@ -159,23 +159,23 @@ static int file_g_read( lua_State* L, int n, int16_t end_char ) n = LUAL_BUFFERSIZE; if(end_char < 0 || end_char >255) end_char = EOF; - signed char ec = (signed char)end_char; - + int ec = (int)end_char; + luaL_Buffer b; if((FS_OPEN_OK - 1)==file_fd) return luaL_error(L, "open a file first"); luaL_buffinit(L, &b); char *p = luaL_prepbuffer(&b); - signed char c = EOF; + int c = EOF; int i = 0; do{ - c = (signed char)fs_getc(file_fd); + c = fs_getc(file_fd); if(c==EOF){ break; } - p[i++] = c; + p[i++] = (char)(0xFF & c); }while((c!=EOF) && (c!=ec) && (i