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:
#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
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<need_py_srv_ver_txt )
{
WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"start cat1 python ota\n");
Cat1_OTA(CAT1_TCP_START_OTA);
void cat1_call_answer(void)
{
#if PY_SRV_VER_CURRENT >=16
- if(g_py_ver>=16)
+ if(g_py_ver>=16)
{
if(osTimerIsRunning(g_timer_time_answer)==0 )
{
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: