mirror of
https://github.com/oopuuu/zTC1.git
synced 2025-12-12 13:08:13 +08:00
一开始就显示日志
This commit is contained in:
@@ -510,6 +510,7 @@ function GetSysLog() {
|
||||
log_div.scrollTo(0, log_div.scrollHeight);
|
||||
});
|
||||
}
|
||||
GetSysLog();
|
||||
|
||||
function GetTimedTask() {
|
||||
HttpGet("/task", function (re) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -29,13 +29,13 @@ char* GetLogRecord()
|
||||
int i = log_record.idx - LOG_NUM + 1;
|
||||
i = i < 0 ? 0 : i;
|
||||
char* tmp = log_record_str;
|
||||
sprintf(tmp, "%d\n", log_record.idx);
|
||||
for (; i <= log_record.idx; i++)
|
||||
{
|
||||
tmp += strlen(tmp);
|
||||
if (!log_record.logs[i%LOG_NUM]) continue;
|
||||
sprintf(tmp, "%s\n", log_record.logs[i%LOG_NUM]);
|
||||
tmp += strlen(tmp);
|
||||
}
|
||||
sprintf(tmp, "%d", log_record.idx);
|
||||
return log_record_str;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "mico.h"
|
||||
#include "micokit_ext.h"
|
||||
|
||||
#define VERSION "v1.0.2"
|
||||
#define VERSION "v1.0.3"
|
||||
|
||||
#define TYPE 1
|
||||
#define TYPE_NAME "zTC1"
|
||||
|
||||
Reference in New Issue
Block a user