fix mico-os uncommited

This commit is contained in:
Your Name
2025-03-08 17:25:54 +08:00
parent 3983df25d3
commit c02678849f
4 changed files with 681 additions and 683 deletions

View File

@@ -331,7 +331,7 @@ static int HttpGetMqttReportFreq(httpd_request_t *req)
OSStatus err = kNoErr;
int buf_size = 97;
char *freq = malloc(buf_size);
sprintf(freq, "%d", &MQTT_REPORT_FREQ);
sprintf(freq, "%d", MQTT_REPORT_FREQ);
send_http(freq, strlen(freq), exit, &err);

View File

@@ -979,7 +979,7 @@ if(!seconds||seconds==0){
seconds=1;
}
HttpPost("/mqtt/report/freq", function (re) {
ShowToast("已设置上报频率,重启后生效!");
ShowToast("已设置上报频率");
}, seconds);
}

File diff suppressed because it is too large Load Diff

View File

@@ -87,12 +87,12 @@ int application_start(void)
}
MicoSysLed(0);
if (user_config->version != USER_CONFIG_VERSION)
{
tc1_log("WARNGIN: user params restored!");
err = mico_system_context_restore(sys_config);
require_noerr(err, exit);
}
// if (user_config->version != USER_CONFIG_VERSION)
// {
// tc1_log("WARNGIN: user params restored!");
// err = mico_system_context_restore(sys_config);
// require_noerr(err, exit);
// }
if (sys_config->micoSystemConfig.name[0] == 1)
{
@@ -138,11 +138,11 @@ int application_start(void)
ProcessTask();
}
int freq = user_config->mqtt_report_freq;
tc1_log("shangbao频率 %d",freq);
if(freq == 0){
freq = 2;
}
tc1_log("shangbao频率22 %d",freq);
mico_thread_msleep(1000*freq);
}