mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 21:18:13 +08:00
动态显示真实公功率OK
This commit is contained in:
@@ -109,7 +109,6 @@ static int HttpGetPowerInfo(httpd_request_t *req)
|
||||
|
||||
char* powers = GetPowerRecord(idx);
|
||||
sprintf(power_info_json, POWER_INFO_JSON, power_record.idx, PW_NUM, powers);
|
||||
power_record.idx++; //test
|
||||
send_http(power_info_json, strlen(power_info_json), exit, &err);
|
||||
exit:
|
||||
return err;
|
||||
|
||||
@@ -161,7 +161,7 @@ int application_start(void)
|
||||
//发送功率数据
|
||||
if (power_last != power || main_num > 4)
|
||||
{
|
||||
//SetPowerRecord(&power_record, power);
|
||||
SetPowerRecord(&power_record, power);
|
||||
power_last = power;
|
||||
main_num =0;
|
||||
sprintf(power_buf, "{\"mac\":\"%s\",\"power\":\"%u.%u\",\"total_time\":%u}",
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
mico_timer_t power_timer;
|
||||
|
||||
PowerRecord power_record = { 44, {
|
||||
PowerRecord power_record = { 1, {
|
||||
0,1,2,3,4,5,6,7,8,9,
|
||||
10,11,12,13,14,15,16,17,18,19,
|
||||
20,21,22,23,24,25,26,27,28,29,
|
||||
|
||||
Reference in New Issue
Block a user