From: hcj <1224667075@qq.com> Date: Sat, 23 Nov 2024 08:55:33 +0000 (+0800) Subject: cat1升级限制修改 X-Git-Tag: fd230_release_V1.3.102~39^2~4 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=2ba5fff7c3696c58ea13ed336dcf5b349ba96c39;p=mirrors%2FFD230.git cat1升级限制修改 --- diff --git a/cat1modem/src/main.py b/cat1modem/src/main.py index 0f8b84a69..fa20465a8 100644 --- a/cat1modem/src/main.py +++ b/cat1modem/src/main.py @@ -6,16 +6,19 @@ try: except Exception as e: main_flag = 0 print("启动失败!!!!!\r\n".format(e),'slipservice') + try: from usr.tcpService import TcpService except Exception as e: main_flag = 0 print("启动失败!!!!!\r\n".format(e),'tcpService') + try: import usr.checkota except Exception as e: main_flag = 0 print("启动失败!!!!!\r\n".format(e),'checkota') + example.exec('/usr/main_init.py') print("启动成功!!!!!\r\n") except Exception as e: diff --git a/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/system/cat1ota/Cat1pyVersion.txt b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/system/cat1ota/Cat1pyVersion.txt new file mode 100644 index 000000000..19c7bdba7 --- /dev/null +++ b/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/system/cat1ota/Cat1pyVersion.txt @@ -0,0 +1 @@ +16 \ No newline at end of file diff --git a/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp b/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp index 3ed7a45dd..4599a858d 100644 --- a/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp +++ b/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp @@ -247,7 +247,11 @@ static uint8_t g_time_synced = 0; #define MAX_TIME_SYNC_RETRY_TIME 5 static uint8_t g_time_sync_retry_time = 0; -#define PY_SRV_VER_CURRENT 15 + +static uint8_t need_py_srv_ver_txt = 0; + +#define PY_SRV_VER_CURRENT 16 + #define PY_SRV_VER_SUPORT_PY_OTA_MINI_VER 13 @@ -755,7 +759,23 @@ static int decodeNetStat(char* msg) if ( g_python_updated == 0) { /**升级开始,马上设置 */ - if (g_py_ver >= PY_SRV_VER_SUPORT_PY_OTA_MINI_VER && g_py_ver != PY_SRV_VER_CURRENT) + // if(>=16) + // /home/hcj/FD230/code/sdk/build/config/target_config/brandy/mk_fs_image/fd230/fs/user/system/cat1ota/Cat1pyVersion.txt + + FILE *fp= fopen("/user/system/cat1ota/Cat1pyVersion.txt","rb+"); + if(fp) + { + char read_buf[32]={0}; + int read_size=fread(read_buf,1,32,fp); + if(read_size) + { + need_py_srv_ver_txt=atoi(read_buf); + } + fclose(fp); + } + + + if (g_py_ver >= PY_SRV_VER_SUPORT_PY_OTA_MINI_VER && (g_py_ver < PY_SRV_VER_CURRENT ) || g_py_ver=16 - if(g_py_ver>=16) + if(g_py_ver>=16) { if(osTimerIsRunning(g_timer_time_answer)==0 ) { @@ -1352,6 +1372,12 @@ static int udp_packet_parse(char *rx_buffer, int len) index = cat1_handle_timesync(msg_buffer); break; case UDP_MSG_CALL_CONNECTED: + if(g_timer_time_answer) + osTimerStop(g_timer_time_answer); + + if(g_timer_time_Dial) + osTimerStop(g_timer_time_Dial); + index = cat1_handle_call_connected(msg_buffer); break; case UDP_MSG_CALL_DISCONNECTED: