diff --git a/Makefile b/Makefile index b79afe8..6470145 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,7 @@ APPGEN ?= $(SDK_BASE)/tools/gen_appbin.py TARGET = httpd # which modules (subdirectories) of the project to include in compiling -MODULES = user esphttpclient +MODULES = user EXTRA_INCDIR = include libesphttpd/include # libraries used in this project, mainly provided by the SDK diff --git a/libesphttpd b/libesphttpd index c8dda50..7fce947 160000 --- a/libesphttpd +++ b/libesphttpd @@ -1 +1 @@ -Subproject commit c8dda50970d4c7c7ed2b9db4df7d433a39dde5b8 +Subproject commit 7fce9474395e208c83325ff6150fdd21ba16c9a4 diff --git a/user/apars_dcs.c b/user/apars_dcs.c index 5238582..7462d26 100644 --- a/user/apars_dcs.c +++ b/user/apars_dcs.c @@ -47,7 +47,9 @@ apars_handle_dcs(const char *buffer) } else if (buffer[2] == 'r') { // DECSTBM - Query scrolling region - sprintf(buf, "\033P1$r%d;%dr\033\\", 1, termconf_live.height); // 1-80 TODO real extent of scrolling region + int v0, v1; + screen_region_get(&v0, &v1); + sprintf(buf, "\033P1$r%d;%dr\033\\", v0+1, v1+1); apars_respond(buf); } else if (buffer[2] == 's') { @@ -64,7 +66,7 @@ apars_handle_dcs(const char *buffer) } else if (strneq(buffer+2, " q", 2)) { // DECSCUSR - Query cursor style - sprintf(buf, "\033P1$r%d q\033\\", 1); + sprintf(buf, "\033P1$r%d q\033\\", termconf_live.cursor_shape); /* Ps = 0 -> blinking block. Ps = 1 -> blinking block (default). diff --git a/user/apars_short.c b/user/apars_short.c index 06835b3..e00b2e2 100644 --- a/user/apars_short.c +++ b/user/apars_short.c @@ -106,7 +106,7 @@ void ICACHE_FLASH_ATTR apars_handle_hash_cmd(char c) // development codes - do not use! case '7': - http_get("http://example.com", NULL); + http_get("http://wtfismyip.com/text", NULL, http_callback_example); break; default: diff --git a/user/screen.c b/user/screen.c index 66a3e13..755aa44 100644 --- a/user/screen.c +++ b/user/screen.c @@ -1152,6 +1152,14 @@ screen_cursor_get(int *y, int *x) } } +/* Report scrolling region */ +void ICACHE_FLASH_ATTR +screen_region_get(int *pv0, int *pv1) +{ + *pv0 = TOP; + *pv1 = BTM; +} + /** * Set cursor X position */ @@ -1979,13 +1987,9 @@ screenSerializeToBuffer(char *buffer, size_t buf_len, ScreenNotifyTopics topics, bufput_utf8(termconf_live.default_fg & 0xFFFF); bufput_utf8((termconf_live.default_fg >> 16) & 0xFFFF); - dbg("Fg %04X,%04X", termconf_live.default_fg & 0xFFFF, (termconf_live.default_fg >> 16) & 0xFFFF); - bufput_utf8(termconf_live.default_bg & 0xFFFF); bufput_utf8((termconf_live.default_bg >> 16) & 0xFFFF); - dbg("Bg %04X,%04X", termconf_live.default_bg & 0xFFFF, (termconf_live.default_bg >> 16) & 0xFFFF); - bufput_utf8( (scr.cursor_visible << 0) | (termconf_live.debugbar << 1) | // debugbar - this was previously "hanging" diff --git a/user/screen.h b/user/screen.h index 8e4037b..e38f776 100644 --- a/user/screen.h +++ b/user/screen.h @@ -249,6 +249,8 @@ void screen_wrap_enable(bool enable); void screen_reverse_wrap_enable(bool enable); /** Set scrolling region */ void screen_set_scrolling_region(int from, int to); +/* Report scrolling region */ +void screen_region_get(int *pv0, int *pv1); /** Enable or disable origin remap to top left of scrolling region */ void screen_set_origin_mode(bool region_origin);