I have tried several variations of this with same results...
------------------------------------------
-- Function for RSSI----------------------
local function listap(t)
for k,v in pairs(t) do
print(k.." : "..v)
vt.sbuf = vt.sbuf ..k.." : "..v
end
listap=nil
collectgarbage()
end
-- code snip -----------------------------
elseif cmd=="Baud" then
if vt.baud==9600 then
vt.baud=38400
elseif vt.baud==38400 then
vt.baud=115200
elseif vt.baud==115200 then
vt.baud=9600
end
uart.setup(0,vt.baud,8,0,1)
elseif cmd=="Adc" then vt.adc = adc.read(0)
elseif cmd=="Rssi" then
if cmd=="Rssi" then
cmx = cmd
cmd = "--"
print("---- RSSI ----")
--uart.write(0."--SSID--")
wifi.sta.getap(listap)
listap=nil
end
I'm trying to use the above code , the PROBLEM is
the first time I click the Rssi button the code
prints ---- RSSI ---- and print the rssi/etc and sbuf is up dated....
any later Rssi click just prints ---- RSSI ---- and nothing else
it is not hung ? / clicking other buttons work....
What do I need to do ?????