mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 21:18:13 +08:00
#define -> .h
This commit is contained in:
@@ -63,12 +63,10 @@ exit:
|
|||||||
static int HttpGetTc1Status(httpd_request_t *req)
|
static int HttpGetTc1Status(httpd_request_t *req)
|
||||||
{
|
{
|
||||||
const unsigned char* sockets = GetSocketStatus();
|
const unsigned char* sockets = GetSocketStatus();
|
||||||
char* ap_name = "TC1-AP";
|
|
||||||
char* ap_pwd = "12345678";
|
|
||||||
char* tc1_status = malloc(256);
|
char* tc1_status = malloc(256);
|
||||||
sprintf(tc1_status, TC1_STATUS_JSON, sockets, (int)sys_config->micoSystemConfig.reserved,
|
sprintf(tc1_status, TC1_STATUS_JSON, sockets, (int)sys_config->micoSystemConfig.reserved,
|
||||||
sys_config->micoSystemConfig.ssid, sys_config->micoSystemConfig.user_key,
|
sys_config->micoSystemConfig.ssid, sys_config->micoSystemConfig.user_key,
|
||||||
ap_name, ap_pwd, ip_status.ip, ip_status.mask, ip_status.gateway);
|
ELAND_AP_SSID, ELAND_AP_KEY, ip_status.ip, ip_status.mask, ip_status.gateway);
|
||||||
|
|
||||||
OSStatus err = kNoErr;
|
OSStatus err = kNoErr;
|
||||||
send_http(tc1_status, strlen(tc1_status), exit, &err);
|
send_http(tc1_status, strlen(tc1_status), exit, &err);
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
char wifi_status = WIFI_STATE_NOCONNECT;
|
char wifi_status = WIFI_STATE_NOCONNECT;
|
||||||
|
|
||||||
mico_timer_t wifi_led_timer;
|
mico_timer_t wifi_led_timer;
|
||||||
IpStatus ip_status = { "0.0.0.0", "0.0.0.0", "0.0.0.0" };
|
IpStatus ip_status = { ELAND_AP_LOCAL_IP, ELAND_AP_LOCAL_IP, ELAND_AP_NET_MASK };
|
||||||
|
|
||||||
//wifi已连接获取到IP地址回调
|
//wifi已连接获取到IP地址回调
|
||||||
static void WifiGetIpCallback(IPStatusTypedef *pnet, void * arg)
|
static void WifiGetIpCallback(IPStatusTypedef *pnet, void * arg)
|
||||||
@@ -165,12 +165,6 @@ void WifiInit(void)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ELAND_AP_SSID "TC1-AP"
|
|
||||||
#define ELAND_AP_KEY "12345678"
|
|
||||||
#define ELAND_AP_LOCAL_IP "192.168.0.1"
|
|
||||||
#define ELAND_AP_DNS_SERVER "192.168.0.1"
|
|
||||||
#define ELAND_AP_NET_MASK "255.255.255.0"
|
|
||||||
|
|
||||||
void ApInit()
|
void ApInit()
|
||||||
{
|
{
|
||||||
os_log("Soft_ap_Server");
|
os_log("Soft_ap_Server");
|
||||||
|
|||||||
@@ -13,6 +13,12 @@ enum
|
|||||||
WIFI_STATE_CONNECTED,
|
WIFI_STATE_CONNECTED,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define ELAND_AP_SSID "TC1-AP-MAC"
|
||||||
|
#define ELAND_AP_KEY "12345678"
|
||||||
|
#define ELAND_AP_LOCAL_IP "192.168.0.1"
|
||||||
|
#define ELAND_AP_DNS_SERVER "192.168.0.1"
|
||||||
|
#define ELAND_AP_NET_MASK "255.255.255.0"
|
||||||
|
|
||||||
#define WIFI_SCAN_RESULT_JSON "{'success':%d,'ssids':[%s],'secs':[%s]}"
|
#define WIFI_SCAN_RESULT_JSON "{'success':%d,'ssids':[%s],'secs':[%s]}"
|
||||||
extern bool scaned;
|
extern bool scaned;
|
||||||
extern char* wifi_ret;
|
extern char* wifi_ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user