mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-11 04:28:14 +08:00
get scan OK
This commit is contained in:
@@ -153,17 +153,13 @@ static int http_get_wifi_scan(httpd_request_t *req)
|
||||
{
|
||||
scaned = false;
|
||||
send_http(wifi_ret, strlen(wifi_ret), exit, &err);
|
||||
free(wifi_ret);
|
||||
}
|
||||
else
|
||||
{
|
||||
send_http("NO", 2, exit, &err);
|
||||
}
|
||||
|
||||
/*
|
||||
static int n = 1;
|
||||
char* re = (n++)%4 == 0 ? "OK" : "NO";
|
||||
send_http(re, 2, exit, &err);
|
||||
*/
|
||||
exit:
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -102,6 +102,7 @@ void wifi_scan_callback(ScanResult_adv* scan_ret, void* arg)
|
||||
|
||||
scaned = true;
|
||||
free(ssids);
|
||||
free(secs);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,22 +13,12 @@ enum
|
||||
WIFI_STATE_CONNECTED,
|
||||
};
|
||||
|
||||
/*
|
||||
typedef struct _WifiResult
|
||||
{
|
||||
char ssid[32];
|
||||
wlan_sec_type_t security;
|
||||
}
|
||||
WifiResult;
|
||||
*/
|
||||
|
||||
#define WIFI_SCAN_RESULT_JSON "{'success':%d,'ssids':[%s],'secs':[%s]}"
|
||||
|
||||
extern char* wifi_ret;
|
||||
|
||||
extern char wifi_status;
|
||||
extern bool scaned;
|
||||
//extern WifiResult* wifi_rets;
|
||||
|
||||
extern void wifi_init(void);
|
||||
extern void ap_init(void);
|
||||
|
||||
Reference in New Issue
Block a user