fix incorrect DCS command handling
This commit is contained in:
@@ -54,7 +54,7 @@ APPGEN ?= $(SDK_BASE)/tools/gen_appbin.py
|
|||||||
TARGET = httpd
|
TARGET = httpd
|
||||||
|
|
||||||
# which modules (subdirectories) of the project to include in compiling
|
# which modules (subdirectories) of the project to include in compiling
|
||||||
MODULES = user esphttpclient
|
MODULES = user
|
||||||
EXTRA_INCDIR = include libesphttpd/include
|
EXTRA_INCDIR = include libesphttpd/include
|
||||||
|
|
||||||
# libraries used in this project, mainly provided by the SDK
|
# libraries used in this project, mainly provided by the SDK
|
||||||
|
|||||||
+1
-1
Submodule libesphttpd updated: c8dda50970...7fce947439
+4
-2
@@ -47,7 +47,9 @@ apars_handle_dcs(const char *buffer)
|
|||||||
}
|
}
|
||||||
else if (buffer[2] == 'r') {
|
else if (buffer[2] == 'r') {
|
||||||
// DECSTBM - Query scrolling region
|
// 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);
|
apars_respond(buf);
|
||||||
}
|
}
|
||||||
else if (buffer[2] == 's') {
|
else if (buffer[2] == 's') {
|
||||||
@@ -64,7 +66,7 @@ apars_handle_dcs(const char *buffer)
|
|||||||
}
|
}
|
||||||
else if (strneq(buffer+2, " q", 2)) {
|
else if (strneq(buffer+2, " q", 2)) {
|
||||||
// DECSCUSR - Query cursor style
|
// 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 = 0 -> blinking block.
|
||||||
Ps = 1 -> blinking block (default).
|
Ps = 1 -> blinking block (default).
|
||||||
|
|||||||
+1
-1
@@ -106,7 +106,7 @@ void ICACHE_FLASH_ATTR apars_handle_hash_cmd(char c)
|
|||||||
|
|
||||||
// development codes - do not use!
|
// development codes - do not use!
|
||||||
case '7':
|
case '7':
|
||||||
http_get("http://example.com", NULL);
|
http_get("http://wtfismyip.com/text", NULL, http_callback_example);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
+8
-4
@@ -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
|
* 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 & 0xFFFF);
|
||||||
bufput_utf8((termconf_live.default_fg >> 16) & 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 & 0xFFFF);
|
||||||
bufput_utf8((termconf_live.default_bg >> 16) & 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(
|
bufput_utf8(
|
||||||
(scr.cursor_visible << 0) |
|
(scr.cursor_visible << 0) |
|
||||||
(termconf_live.debugbar << 1) | // debugbar - this was previously "hanging"
|
(termconf_live.debugbar << 1) | // debugbar - this was previously "hanging"
|
||||||
|
|||||||
@@ -249,6 +249,8 @@ void screen_wrap_enable(bool enable);
|
|||||||
void screen_reverse_wrap_enable(bool enable);
|
void screen_reverse_wrap_enable(bool enable);
|
||||||
/** Set scrolling region */
|
/** Set scrolling region */
|
||||||
void screen_set_scrolling_region(int from, int to);
|
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 */
|
/** Enable or disable origin remap to top left of scrolling region */
|
||||||
void screen_set_origin_mode(bool region_origin);
|
void screen_set_origin_mode(bool region_origin);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user