Report Bugs Here

Moderator: Mmiscool

User avatar
By xtal
#33120 Just loaded v1.19 on my esp-13 flavor already containing v1.17 had no issue
Just loaded v1.19 on my esp-12E flavor already containing nodemcu -- load ok but will not boot tried reloading NG
loaded v1.17 on my esp-12E flavor Ok and booted then loaded v1.19 ok and booted -----hmmmmmmm

# I noticed on 1.17 that both 192.168.4.1 and 192.168.1.33 will display my code at same time
is this by design , since v1.19 does the same .

This code does not work properly unless the 2nd digit is not the length I want ? -- double checking --
mid(X4,start,end) ok sb last position of data I want,, I think we are 1 byte short
Code: Select all 
this code almost works  using 2nd digit as position of last char I want
mycommand = "eerfh25xx"
x = instr(mycommand,"rfh")
serialprintln "-- mycommand = 'eerfh25xx'     0,1,2,3,4,5,6,7,8"
serialprint "-- x = instr(mycommand,'rfh') SB '2' x = "
serialprintln x
q = mid(mycommand,x,8)
serialprint "-- q = mid(mycommand,x,8)  SB 'rhf25xx'  q = "
serialprintln q
y = mid(mycommand,5,8)
serialprint "-- y = mid(mycommand,5,8) SB '25xx' w = "
serialprintln y
z = x + 3
w = mid(mycommand,z,8)
serialprint "-- w = mid(mycommand,z,8) SB '25xx' w = "
serialprintln w
end



my results are using 2nd digit position of last byte I want [ it's short 1 byte ?]
-- mycommand = 'eerfh25xx'
-- x = instr(mycommand,'rfh') SB '2' x = 2
-- q = mid(mycommand,x,8) SB 'rhf25xx' q = rfh25x
-- y = mid(mycommand,5,8) SB '25xx' w = 25x
-- w = mid(mycommand,z,8) SB '25xx' w = 25x
Done...
User avatar
By xtal
#33199 would it be possible to store the wprint data in flash then
read it back and issue wprint

file.open("csend.txt","r")
while true do
line = file.readline()
if (line == nil) then break end
wprint |line|
end
User avatar
By Mmiscool
#33208 Posted new build. mid function should work as expected in normal basic interpreters.

Also fixed a flaw in the right function.
User avatar
By xtal
#33213 instr() appears broken or my syntax is bad

mycommand = "eerfh25xx"
x = instr(mycommand,"rfh") x = 0 is what I'm getting = nofind or syntax error
x = instr(mycommand,rfh)
x = instr(mycommand,'rfh')

mid() appears good assuming 1 is 1st position which is good then 0 available for nofind on instr