diff --git a/.config b/.config index 0304d61..8dda168 100644 --- a/.config +++ b/.config @@ -635,15 +635,7 @@ CONFIG_PKG_CJSON_VER="v1.7.15" # # CONFIG_PKG_USING_RT_MEMCPY_CM is not set # CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set -CONFIG_PKG_USING_RT_VSNPRINTF_FULL=y -CONFIG_PKG_RT_VSNPRINTF_FULL_PATH="/packages/system/enhanced-kservice/rt_vsnprintf_full" -# CONFIG_RT_VSNPRINTF_FULL_REPLACING_SPRINTF is not set -# CONFIG_RT_VSNPRINTF_FULL_REPLACING_SNPRINTF is not set -# CONFIG_RT_VSNPRINTF_FULL_REPLACING_PRINTF is not set -# CONFIG_RT_VSNPRINTF_FULL_REPLACING_VSPRINTF is not set -# CONFIG_RT_VSNPRINTF_FULL_REPLACING_VSNPRINTF is not set -CONFIG_PKG_USING_RT_VSNPRINTF_FULL_LATEST_VERSION=y -CONFIG_PKG_RT_VSNPRINTF_FULL_VER="latest" +# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set # end of enhanced kernel services # diff --git a/applications/TODO.md b/applications/TODO.md index 7d31a12..b925bbf 100644 --- a/applications/TODO.md +++ b/applications/TODO.md @@ -1 +1,2 @@ ---加密所有信息 \ No newline at end of file +setCommWindow 概率性崩溃,疑似与写入配置有关 +setCommWindow 崩溃,疑似传参不对 \ No newline at end of file diff --git a/applications/alarmer.c b/applications/alarmer.c index 1794dd8..81c8e01 100644 --- a/applications/alarmer.c +++ b/applications/alarmer.c @@ -85,7 +85,7 @@ static struct rt_alarm *alarm[4+1];//支持2组开窗共4个闹钟,加一个 void InitAlarm() { struct rt_alarm_setup setup; - static time_t now; + time_t now; struct tm p_tm; /* 获取当前时间戳,并把下一秒时间设置为闹钟时间 */ now = time(NULL); @@ -162,7 +162,7 @@ void updateAlarm(uint8_t *t, size_t len) // LOG_HEX("alarm",16,t,4); struct rt_alarm_setup setup; - static time_t now; + time_t now; struct tm p_tm; /* 获取当前时间戳,并把下一秒时间设置为闹钟时间 */ now = time(NULL); diff --git a/applications/cfg.c b/applications/cfg.c index 8d2624c..9aeed6e 100644 --- a/applications/cfg.c +++ b/applications/cfg.c @@ -81,6 +81,7 @@ INIT_APP_EXPORT(iniUFMsg); */ int set_cfg(const char *k, long v) { + return; // setLock(); // if (rt_strcmp(v,"NULL") == 0) {//delete key @@ -447,6 +448,11 @@ void postFileInfo(const char *fin, uint8_t index) rt_mq_send(&upfilelist, &msg, sizeof(msg)); } +/** + * 更新最后缓存的文件 + * @param k + * @return + */ int updateLstFile(const char *fin) { nsetLock(); @@ -462,7 +468,7 @@ int updateLstFile(const char *fin) } /** - * 获取最后缓存文件 + * 获取最后缓存的文件 * @param k * @return */ diff --git a/applications/cfg.h b/applications/cfg.h index 85ebbc7..b5a3ab3 100644 --- a/applications/cfg.h +++ b/applications/cfg.h @@ -25,8 +25,8 @@ #define MAX_KEY_LEN 60 -#define SECTION_TO_SEND "tosend" -#define SECTION_LST_FILE "lstfile" +#define SECTION_TO_SEND "tosend"//待发送文件清单列表 +#define SECTION_LST_FILE "lstfile"//最后缓存的文件名称 //typedef struct //{ diff --git a/applications/func/func.c b/applications/func/func.c index b5cce8e..fcf05c0 100644 --- a/applications/func/func.c +++ b/applications/func/func.c @@ -330,7 +330,7 @@ extern void updateAlarm(uint8_t *t, size_t len); void setCommWindow(uint8_t *t, size_t len) { LOG_I("FUNC = setCommWindow"); - + LOG_HEX("new rtc",16,t,len); //not working here // char tmpstr[20]; @@ -341,6 +341,14 @@ void setCommWindow(uint8_t *t, size_t len) // LOG_D("updated new CommWindow zone"); } + +void d_sw(void) +{ + uint8_t cfg[]={0x03, 0x1F, 0x03, 0x20, 0x07, 0x1F, 0x09, 0x1E}; + setCommWindow(cfg, 8); +} + + /** * 手动控制开窗 * @param t 开窗时长,单位分钟,时间到则自动关窗。t=0时需要手动关窗。 @@ -1311,6 +1319,7 @@ MSH_CMD_EXPORT(d_getFileSize,d_getFileSize); MSH_CMD_EXPORT(isEthUP,isEthUP); MSH_CMD_EXPORT(reportSysCfg,reportSysCfg); MSH_CMD_EXPORT(d_isInFence,d_isInFence); +MSH_CMD_EXPORT(d_sw,msw); #endif diff --git a/applications/main.c b/applications/main.c index 3867c07..5a4bf8c 100644 --- a/applications/main.c +++ b/applications/main.c @@ -57,7 +57,7 @@ int main(void) - while (1) + while (0) { /* 拉低PIN脚 */ rt_pin_write(LED_HEART, PIN_LOW); diff --git a/applications/map.c b/applications/map.c index 33ceed2..2c8b3d7 100644 --- a/applications/map.c +++ b/applications/map.c @@ -146,16 +146,12 @@ int mapParse(const char *fin,float *x, float *y) LOG_D("%lf-%lf", x[var], y[var]); rst = cnt; } -// cJSON_Delete(llp); } } } -// cJSON_Delete(sitem); } } _exit: -// cJSON_Delete(object); -// cJSON_Delete(item); cJSON_Delete(root); rt_free(buffer); return rst; @@ -214,7 +210,9 @@ static demo(int argc, char **argv) float polyX[10]={},polyY[10]={}; int polyCorners = mapParse(f,polyX,polyY); for (uint8_t var = 0; var < polyCorners; var++) { - LOG_I("%d=%lf,%lf",var+1,polyX[var],polyY[var]); + LOG_I("%d=%d.%d,%d.%d",var+1, + (int)polyX[var],(int)((long)(polyX[var]*1000000) % 1000000), + (int)polyY[var],(int)((long)(polyY[var]*1000000) % 1000000)); } } MSH_CMD_EXPORT_ALIAS(demo,d_parseFence,解析围栏); diff --git a/applications/ttmsg/ttmsg.c b/applications/ttmsg/ttmsg.c index 8135957..a0de1aa 100644 --- a/applications/ttmsg/ttmsg.c +++ b/applications/ttmsg/ttmsg.c @@ -469,7 +469,7 @@ void recTT_thread_entry() void recTT(void) { /* 创建线程 */ - rt_thread_t thread = rt_thread_create("recTT", recTT_thread_entry, RT_NULL, 1024 * 5, 27, 10); + rt_thread_t thread = rt_thread_create("recTT", recTT_thread_entry, RT_NULL, 1024 * 6, 27, 10); /* 创建成功则启动线程 */ if (thread != RT_NULL) { diff --git a/drivers/board.c b/drivers/board.c index 5891af6..4572d60 100644 --- a/drivers/board.c +++ b/drivers/board.c @@ -172,9 +172,9 @@ void phy_reset(void) { rt_pin_mode(ETH_RESET_PIN, PIN_MODE_OUTPUT); rt_pin_write(ETH_RESET_PIN, PIN_HIGH); - rt_thread_mdelay(50); + rt_thread_mdelay(200); rt_pin_write(ETH_RESET_PIN, PIN_LOW); - rt_thread_mdelay(50); + rt_thread_mdelay(200); rt_pin_write(ETH_RESET_PIN, PIN_HIGH); } diff --git a/packages/pkgs.json b/packages/pkgs.json index 06f4e01..deecd34 100644 --- a/packages/pkgs.json +++ b/packages/pkgs.json @@ -9,11 +9,6 @@ "ver": "v1.7.15", "name": "CJSON" }, - { - "path": "/packages/system/enhanced-kservice/rt_vsnprintf_full", - "ver": "latest", - "name": "RT_VSNPRINTF_FULL" - }, { "path": "/packages/system/syswatch", "ver": "latest", diff --git a/rtconfig.h b/rtconfig.h index 759b248..601535a 100644 --- a/rtconfig.h +++ b/rtconfig.h @@ -283,8 +283,6 @@ /* enhanced kernel services */ -#define PKG_USING_RT_VSNPRINTF_FULL -#define PKG_USING_RT_VSNPRINTF_FULL_LATEST_VERSION /* end of enhanced kernel services */ /* acceleration: Assembly language or algorithmic acceleration packages */ @@ -346,7 +344,7 @@ /* end of miscellaneous packages */ /* Arduino libraries */ -//#define BSP_USING_SDRAM + /* Projects */