diff --git a/ueforth/esp32/camera_server.fs b/ueforth/esp32/camera_server.fs index 4d508ff..c188d7f 100644 --- a/ueforth/esp32/camera_server.fs +++ b/ueforth/esp32/camera_server.fs @@ -4,6 +4,47 @@ DEFINED? camera [IF] vocabulary camera-server camera-server definitions also camera also httpd +r| + + + + +| constant index-html# constant index-html + +: handle-index + s" text/html" ok-response + index-html index-html# send +; + : handle-image s" image/jpeg" ok-response esp_camera_fb_get dup dup @ swap cell+ @ send @@ -12,6 +53,7 @@ also camera also httpd : handle1 handleClient + s" /" path str= if handle-index exit then s" /image" path str= if handle-image exit then notfound-response ; diff --git a/ueforth/posix/xlib_test.fs b/ueforth/posix/xlib_test.fs index 973d125..cd0c32a 100644 --- a/ueforth/posix/xlib_test.fs +++ b/ueforth/posix/xlib_test.fs @@ -2,7 +2,7 @@ include posix/xlib.fs also x11 -z" :0" XOpenDisplay constant display +0 XOpenDisplay constant display display XDefaultScreen constant screen display screen XBlackPixel constant black display screen XWhitePixel constant white