Make camera lazy load.
This commit is contained in:
@ -211,6 +211,7 @@ variable hld
|
|||||||
: z" postpone s" state @ if postpone drop else drop then ; immediate
|
: z" postpone s" state @ if postpone drop else drop then ; immediate
|
||||||
: r" parse-quote state @ if swap aliteral aliteral then ; immediate
|
: r" parse-quote state @ if swap aliteral aliteral then ; immediate
|
||||||
: r| [char] | parse state @ if swap aliteral aliteral then ; immediate
|
: r| [char] | parse state @ if swap aliteral aliteral then ; immediate
|
||||||
|
: r~ [char] ~ parse state @ if swap aliteral aliteral then ; immediate
|
||||||
: s>z ( a n -- z ) here >r zplace r> ;
|
: s>z ( a n -- z ) here >r zplace r> ;
|
||||||
: z>s ( z -- a n ) 0 over begin dup c@ while 1+ swap 1+ swap repeat drop ;
|
: z>s ( z -- a n ) 0 over begin dup c@ while 1+ swap 1+ swap repeat drop ;
|
||||||
|
|
||||||
|
|||||||
@ -62,6 +62,7 @@ e: check-boot
|
|||||||
out: cmove
|
out: cmove
|
||||||
out: z>s
|
out: z>s
|
||||||
out: s>z
|
out: s>z
|
||||||
|
out: r~
|
||||||
out: r|
|
out: r|
|
||||||
out: r"
|
out: r"
|
||||||
out: z"
|
out: z"
|
||||||
@ -490,8 +491,6 @@ e: test-posix-forth-namespace
|
|||||||
e: test-esp32-forth-namespace
|
e: test-esp32-forth-namespace
|
||||||
internals voclist
|
internals voclist
|
||||||
out: ansi
|
out: ansi
|
||||||
out: camera-server
|
|
||||||
out: camera
|
|
||||||
out: registers
|
out: registers
|
||||||
out: web-interface
|
out: web-interface
|
||||||
out: httpd
|
out: httpd
|
||||||
|
|||||||
@ -12,10 +12,21 @@
|
|||||||
\ See the License for the specific language governing permissions and
|
\ See the License for the specific language governing permissions and
|
||||||
\ limitations under the License.
|
\ limitations under the License.
|
||||||
|
|
||||||
( Handling for ESP32-CAM )
|
( Lazy loaded camera gandling for ESP32-CAM )
|
||||||
DEFINED? esp_camera_init [IF]
|
DEFINED? esp_camera_init [IF]
|
||||||
|
|
||||||
|
internals definitions
|
||||||
|
transfer{
|
||||||
|
esp_camera_init esp_camera_deinit
|
||||||
|
esp_camera_fb_get esp_camera_fb_return
|
||||||
|
esp_camera_sensor_get
|
||||||
|
}transfer
|
||||||
|
forth definitions
|
||||||
|
|
||||||
|
: camera r|
|
||||||
|
|
||||||
vocabulary camera camera definitions
|
vocabulary camera camera definitions
|
||||||
|
also internals
|
||||||
|
|
||||||
transfer{
|
transfer{
|
||||||
esp_camera_init esp_camera_deinit
|
esp_camera_init esp_camera_deinit
|
||||||
@ -53,5 +64,7 @@ constant camera-fb-count
|
|||||||
constant camera-format
|
constant camera-format
|
||||||
|
|
||||||
forth definitions
|
forth definitions
|
||||||
|
camera
|
||||||
|
| evaluate ;
|
||||||
|
|
||||||
[THEN]
|
[THEN]
|
||||||
|
|||||||
@ -12,11 +12,14 @@
|
|||||||
\ See the License for the specific language governing permissions and
|
\ See the License for the specific language governing permissions and
|
||||||
\ limitations under the License.
|
\ limitations under the License.
|
||||||
|
|
||||||
( Camera Server )
|
( Lazy loaded Camera Server )
|
||||||
DEFINED? camera [IF]
|
DEFINED? camera [IF]
|
||||||
|
|
||||||
|
: camera-server r~
|
||||||
|
|
||||||
|
camera
|
||||||
vocabulary camera-server camera-server definitions
|
vocabulary camera-server camera-server definitions
|
||||||
also camera also httpd
|
also camera also httpd
|
||||||
|
|
||||||
r|
|
r|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
@ -82,5 +85,7 @@ Frame();
|
|||||||
;
|
;
|
||||||
|
|
||||||
only forth definitions
|
only forth definitions
|
||||||
|
camera-server
|
||||||
|
~ evaluate ;
|
||||||
|
|
||||||
[THEN]
|
[THEN]
|
||||||
|
|||||||
Reference in New Issue
Block a user