-
Notifications
You must be signed in to change notification settings - Fork 0
/
7-ESP8266.fth
56 lines (43 loc) · 1.22 KB
/
7-ESP8266.fth
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
\ Support module for ESP8266 webserver interface to tachyon
\ 170501 initial code, dp
\ 170502 working on quiet mode with CR, dp
TACHYON
[~
IFNDEF GARDENCONTROL.fth
CR PRINT" !!! This module requires a GARDENCONTROL.fth !!! "
!!!
}
FORGET ESP8266.fth
pub ESP8266.fth PRINT" ESP Tachyon Support 170502 1600 V0.3" ;
pub @{ 123 emit ;
pub @} 125 emit ;
pub @" 34 emit ;
pub @[ 91 emit ;
pub @] 93 emit ;
pub @, 44 emit ;
pub @: 58 emit ;
pub showitj ( -- )
exclude @ NOT IF --- test for serial exclude flag
@{
ramlen 0 DO
@"
I 2* 2*
" HALTLSTSLSTTEBHLEBLLEDWLFLHLFLLLFDWLEBTDEBTNFLTDFLTNHRSDMINDDURHDURMLSTFWLMNWLMXSENFSENCLOGF" +
4 CTYPE @"
PRINT" : " @" params I + C@ . @" @,
--- I ramlen 1 - < IF @, ELSE @} THEN
LOOP
@" " GTL" PRINT$ @" @: @" gtl@ . @" @}
THEN
;
--- return JSON string of Tank Level
pub gtlj
exclude @ NOT IF
@{ @" " GTL" PRINT$ @" @: @" gtl@ . @" @}
THEN
;
--- prompt
pub MYPROMPT CR ;
--- set tachyon prompt no echo CR only no ok
pub QUIET ( on/off -- ) IF OFF ECHO ' MYPROMPT ELSE ON ECHO 0 THEN prompt 2+ W! ;
]~ END