Merge pull request #955 from zhujunsan/dev
Fix example code in WiFi Module Doc
This commit is contained in:
commit
aac9824364
|
@ -468,7 +468,7 @@ function listap(t) -- (SSID : Authmode, RSSI, BSSID, Channel)
|
||||||
print("\n\t\t\tSSID\t\t\t\t\tBSSID\t\t\t RSSI\t\tAUTHMODE\t\tCHANNEL")
|
print("\n\t\t\tSSID\t\t\t\t\tBSSID\t\t\t RSSI\t\tAUTHMODE\t\tCHANNEL")
|
||||||
for bssid,v in pairs(t) do
|
for bssid,v in pairs(t) do
|
||||||
local ssid, rssi, authmode, channel = string.match(v, "([^,]+),([^,]+),([^,]+),([^,]*)")
|
local ssid, rssi, authmode, channel = string.match(v, "([^,]+),([^,]+),([^,]+),([^,]*)")
|
||||||
print(string.format("%32.s",ssid).."\t"..bssid.."\t "..rssi.."\t\t"..authmode.."\t\t\t"..channel)
|
print(string.format("%32s",ssid).."\t"..bssid.."\t "..rssi.."\t\t"..authmode.."\t\t\t"..channel)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
wifi.sta.getap(1, listap)
|
wifi.sta.getap(1, listap)
|
||||||
|
@ -478,7 +478,7 @@ function listap(t)
|
||||||
print("\n\t\t\tSSID\t\t\t\t\tBSSID\t\t\t RSSI\t\tAUTHMODE\t\tCHANNEL")
|
print("\n\t\t\tSSID\t\t\t\t\tBSSID\t\t\t RSSI\t\tAUTHMODE\t\tCHANNEL")
|
||||||
for bssid,v in pairs(t) do
|
for bssid,v in pairs(t) do
|
||||||
local ssid, rssi, authmode, channel = string.match(v, "([^,]+),([^,]+),([^,]+),([^,]*)")
|
local ssid, rssi, authmode, channel = string.match(v, "([^,]+),([^,]+),([^,]+),([^,]*)")
|
||||||
print(string.format("%32.s",ssid).."\t"..bssid.."\t "..rssi.."\t\t"..authmode.."\t\t\t"..channel)
|
print(string.format("%32s",ssid).."\t"..bssid.."\t "..rssi.."\t\t"..authmode.."\t\t\t"..channel)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
scan_cfg = {}
|
scan_cfg = {}
|
||||||
|
|
Loading…
Reference in New Issue