|
@ -68,6 +68,7 @@ typedef struct { |
|
|
// wifi
|
|
|
// wifi
|
|
|
char stationSsid[SSID_LEN]; |
|
|
char stationSsid[SSID_LEN]; |
|
|
char stationPwd[PWD_LEN]; |
|
|
char stationPwd[PWD_LEN]; |
|
|
|
|
|
bool isHidden; |
|
|
|
|
|
|
|
|
cfgIp_t ip; |
|
|
cfgIp_t ip; |
|
|
} cfgSys_t; |
|
|
} cfgSys_t; |
|
@ -359,6 +360,7 @@ class settings { |
|
|
else { |
|
|
else { |
|
|
snprintf(mCfg.sys.stationSsid, SSID_LEN, FB_WIFI_SSID); |
|
|
snprintf(mCfg.sys.stationSsid, SSID_LEN, FB_WIFI_SSID); |
|
|
snprintf(mCfg.sys.stationPwd, PWD_LEN, FB_WIFI_PWD); |
|
|
snprintf(mCfg.sys.stationPwd, PWD_LEN, FB_WIFI_PWD); |
|
|
|
|
|
mCfg.sys.isHidden = false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
snprintf(mCfg.sys.deviceName, DEVNAME_LEN, DEF_DEVICE_NAME); |
|
|
snprintf(mCfg.sys.deviceName, DEVNAME_LEN, DEF_DEVICE_NAME); |
|
@ -426,6 +428,7 @@ class settings { |
|
|
char buf[16]; |
|
|
char buf[16]; |
|
|
obj[F("ssid")] = mCfg.sys.stationSsid; |
|
|
obj[F("ssid")] = mCfg.sys.stationSsid; |
|
|
obj[F("pwd")] = mCfg.sys.stationPwd; |
|
|
obj[F("pwd")] = mCfg.sys.stationPwd; |
|
|
|
|
|
obj[F("hidd")] = (bool) mCfg.sys.isHidden; |
|
|
obj[F("dev")] = mCfg.sys.deviceName; |
|
|
obj[F("dev")] = mCfg.sys.deviceName; |
|
|
obj[F("adm")] = mCfg.sys.adminPwd; |
|
|
obj[F("adm")] = mCfg.sys.adminPwd; |
|
|
obj[F("prot_mask")] = mCfg.sys.protectionMask; |
|
|
obj[F("prot_mask")] = mCfg.sys.protectionMask; |
|
@ -438,6 +441,7 @@ class settings { |
|
|
} else { |
|
|
} else { |
|
|
getChar(obj, F("ssid"), mCfg.sys.stationSsid, SSID_LEN); |
|
|
getChar(obj, F("ssid"), mCfg.sys.stationSsid, SSID_LEN); |
|
|
getChar(obj, F("pwd"), mCfg.sys.stationPwd, PWD_LEN); |
|
|
getChar(obj, F("pwd"), mCfg.sys.stationPwd, PWD_LEN); |
|
|
|
|
|
getVal<bool>(obj, F("hidd"), &mCfg.sys.isHidden); |
|
|
getChar(obj, F("dev"), mCfg.sys.deviceName, DEVNAME_LEN); |
|
|
getChar(obj, F("dev"), mCfg.sys.deviceName, DEVNAME_LEN); |
|
|
getChar(obj, F("adm"), mCfg.sys.adminPwd, PWD_LEN); |
|
|
getChar(obj, F("adm"), mCfg.sys.adminPwd, PWD_LEN); |
|
|
getVal<uint16_t>(obj, F("prot_mask"), &mCfg.sys.protectionMask); |
|
|
getVal<uint16_t>(obj, F("prot_mask"), &mCfg.sys.protectionMask); |
|
|