- refactorisé toutes les entêtes avec le bon nom et la bonne date de version

This commit is contained in:
Christian Zufferey
2018-08-23 10:43:56 +02:00
parent 4de81d02d1
commit e66fa356f4
11 changed files with 13 additions and 20 deletions

View File

@@ -1,5 +1,5 @@
-- Démarre un WIFI AP
print("\wifi_ap_start.lua zf20180724.2220 \n")
print("\n wifi_ap_start.lua zf180823.1039 \n")
wifi.setmode(wifi.SOFTAP)
wifi.ap.config({ ssid = "NodeMCU", pwd = "12345678" })

View File

@@ -1,5 +1,5 @@
-- Démarre le WIFI en mode AP
print("\wifi_ap_stop.lua zf180822.1425 \n")
print("\n wifi_ap_stop.lua zf180823.1039 \n")
local zmodewifi=wifi.getmode()
if zmodewifi == wifi.SOFTAP then
@@ -8,4 +8,3 @@ elseif zmodewifi == wifi.STATIONAP then
wifi.setmode(wifi.STATION)
end
print("WIFI AP arrêté")

View File

@@ -1,4 +1,4 @@
-- Petit script pour configurer le client WIFI du NodeMCU
print("\wifi_cli_conf.lua zf180822.1407 \n")
print("\n wifi_cli_conf.lua zf180823.1039 \n")
wifi.sta.config{ssid="Hugo", pwd="tototutu", save=true}

View File

@@ -1,5 +1,5 @@
-- Petit script pour connecter le NodeMCU sur un AP Wifi avec l'accompte sauvé en EEPROM
print("\wifi_clidef_start.lua zf180822.1504 \n")
print("\n wifi_cli_start.lua zf180823.1039 \n")
local zmodewifi=wifi.getmode()
if zmodewifi == wifi.NULLMODE then

View File

@@ -1,5 +1,5 @@
-- Démarre le WIFI en mode AP
print("\wifi_cli_stop.lua zf180822.1506 \n")
print("\n wifi_cli_stop.lua zf180823.1039 \n")
local zmodewifi=wifi.getmode()
if zmodewifi == wifi.STATION then
@@ -8,4 +8,3 @@ elseif zmodewifi == wifi.STATIONAP then
wifi.setmode(wifi.SOFTAP)
end
print("WIFI CLI arrêté")

View File

@@ -1,5 +1,5 @@
-- Enclenche le mode configuration WIFI
print("\nzf180718.1107\n")
print("\n wifi_cnf_start.lua zf180823.1039 \n")
function get_ip()
if wifi.sta.getip() == nil then
@@ -16,4 +16,3 @@ wifi.sta.clearconfig()
print("\nwifi config http://192.168.4.1\n")
tmr.alarm(0, 1000, tmr.ALARM_AUTO , get_ip)
enduser_setup.start()

View File

@@ -1,4 +1,4 @@
-- Déclenche le mode configuration WIFI
-- zf180713.1453
print("\n wifi_cnf_stop.lua zf180823.1039 \n")
enduser_setup.stop()

View File

@@ -1,5 +1,5 @@
-- Petit script pour obtenir l'adresse IP du NodeMCU connecté sur un AP Wifi
print("\wifi_get_ip.lua zf180822.1522 \n")
print("\n wifi_get_ip.lua zf180823.1039 \n")
wifitimer1=tmr.create()
tmr.alarm(wifitimer1, 1000, tmr.ALARM_AUTO , function()
@@ -10,4 +10,3 @@ tmr.alarm(wifitimer1, 1000, tmr.ALARM_AUTO , function()
dofile("wifi_info.lua")
end
end)

View File

@@ -1,5 +1,5 @@
-- Petit script pour afficher les infos actuel du WIFI
print("\wifi_info.lua zf180822.1520 \n")
print("\n wifi_info.lua zf180823.1039 \n")
local zmodewifi=wifi.getmode()
@@ -13,7 +13,7 @@ elseif zmodewifi == wifi.STATION then
do
local sta_config=wifi.sta.getconfig(true)
print(string.format("Current client config:\n\tssid:\"%s\"\tpassword:\"%s\"\n\tbssid:\"%s\"\tbssid_set:%s", sta_config.ssid, sta_config.pwd, sta_config.bssid, (sta_config.bssid_set and "true" or "false")))
end
end
elseif zmodewifi == wifi.SOFTAP then
print("WIFI mode AP")
print("AP MAC:\n\t"..wifi.ap.getmac())
@@ -24,8 +24,7 @@ elseif zmodewifi == wifi.STATIONAP then
do
local sta_config=wifi.sta.getconfig(true)
print(string.format("Current client config:\n\tssid:\"%s\"\tpassword:\"%s\"\n\tbssid:\"%s\"\tbssid_set:%s", sta_config.ssid, sta_config.pwd, sta_config.bssid, (sta_config.bssid_set and "true" or "false")))
end
end
print("AP MAC: "..wifi.ap.getmac())
print("AP IP: "..wifi.ap.getip())
end

View File

@@ -1,4 +1,4 @@
-- Déconnecte le WIFI
-- zf180713.1453
print("\n wifi_off.lua zf180823.1039 \n")
wifi.sta.disconnect()

View File

@@ -1,7 +1,5 @@
-- Exemple de petit script pour démarrer le WIFI
print("\n wifi_start.lua zf180822.1510 \n")
print("\n wifi_start.lua zf180823.1039 \n")
dofile("wifi_cli_start.lua")
dofile("wifi_ap_start.lua")