假设第四次获得扫描结果

This commit is contained in:
zogodo
2019-09-28 22:14:10 +08:00
parent 5607f25d09
commit b457d576e4
3 changed files with 12 additions and 10 deletions

View File

@@ -148,8 +148,10 @@ exit:
static int http_get_wifi_scan(httpd_request_t *req)
{
static int n = 1;
OSStatus err = kNoErr;
send_http("OK", 2, exit, &err);
char* re = (n++)%4 == 0 ? "OK" : "NO";
send_http(re, 2, exit, &err);
exit:
return err;
}