Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
aac98243
Commit
aac98243
authored
Jan 20, 2016
by
Terry Ellison
Browse files
Merge pull request #955 from zhujunsan/dev
Fix example code in WiFi Module Doc
parents
a4e7885a
598b0981
Changes
1
Hide whitespace changes
Inline
Side-by-side
docs/en/modules/wifi.md
View file @
aac98243
...
@@ -468,7 +468,7 @@ function listap(t) -- (SSID : Authmode, RSSI, BSSID, Channel)
...
@@ -468,7 +468,7 @@ function listap(t) -- (SSID : Authmode, RSSI, BSSID, Channel)
print
(
"
\n\t\t\t
SSID\t\t\t\t\tBSSID\t\t\t RSSI\t\tAUTHMODE\t\tCHANNEL"
)
print
(
"
\n\t\t\t
SSID\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)
...
@@ -478,7 +478,7 @@ function listap(t)
print
(
"
\n\t\t\t
SSID\t\t\t\t\tBSSID\t\t\t RSSI\t\tAUTHMODE\t\tCHANNEL"
)
print
(
"
\n\t\t\t
SSID\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
=
{}
...
@@ -930,4 +930,4 @@ Stops the DHCP service.
...
@@ -930,4 +930,4 @@ Stops the DHCP service.
none
none
#### Returns
#### Returns
boolean indicating success
boolean indicating success
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment