修复RTC数量过多时系统崩溃的问题

更新updateAllSysCfg逻辑,不在此函数更新RTC
This commit is contained in:
CSSC-WORK\murmur 2023-09-11 19:08:16 +08:00
parent 4531f56592
commit 88bc44e238
4 changed files with 11 additions and 7 deletions

View File

@ -100,7 +100,7 @@ int set_cfgs(const char *k, const char * v)
v = NULL;
}
char tmp[30];
char tmp[128];
get_cfgs(k,tmp);
// LOG_D("v=%s-----%s",v,tmp);
if (strcmp(v,tmp) == 0) {

View File

@ -21,7 +21,7 @@
#define ENCRYTTYPE 1<<4
#define MAX_KEY_LEN 60
#define MAX_KEY_LEN 128
#define SECTION_TO_SEND "tosend"//待发送文件清单列表
#define SECTION_LST_FILE "lstfile"//最后缓存的文件名称

View File

@ -371,8 +371,12 @@ void setCommWindow(uint8_t *t, size_t len)
len= len/4*4;//窗口需要成对
updateAlarm(t,len);
memset(scfg.openWindowTime,0,sizeof(scfg.openWindowTime));
memcpy(scfg.openWindowTime,t,len);
rt_sem_release(cfgUpdate);
// rt_sem_release(cfgUpdate);
char tmpstr[len*3];
bytes2str(t, len, 10, ",", tmpstr);
set_cfgs("openWindowTime",tmpstr);
// LOG_D("updated new CommWindow zone");
ack();
@ -605,9 +609,9 @@ void updateAllSysCfg(uint8_t *cfg, size_t len)
rst &= set_cfg("minTTsinal",scfg.minTTsinal);
rst &= set_cfg("timeout",scfg.timeout);
char tmpstr[sizeof(scfg.openWindowTime)*4];
bytes2str(scfg.openWindowTime, 8, 10, ",", tmpstr);
rst &= set_cfgs("openWindowTime",tmpstr);
// char tmpstr[sizeof(scfg.openWindowTime)*3];
// bytes2str(scfg.openWindowTime, sizeof(scfg.openWindowTime), 10, ",", tmpstr);
// rst &= set_cfgs("openWindowTime",tmpstr);
rst &= set_cfg("maxSizePerFile", scfg.maxSizePerFile);

View File

@ -167,4 +167,4 @@ void updateDebuglogName(void)
MSH_CMD_EXPORT(updateDebuglogName,debug日志的文件名);
//MSH_CMD_EXPORT(initLogFileBackend,initLogFileBackend);
INIT_APP_EXPORT(initLogFileBackend);
//INIT_APP_EXPORT(initLogFileBackend);