From: SnickerSun Date: Sat, 14 Sep 2024 05:52:12 +0000 (+0800) Subject: Cat1 升级脚本到PY_OTA_V13 支持 接听和挂断电话带 电话号 X-Git-Tag: release_V1.2.70_20241020_135402~481 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=1a16ef3dcadaaf80801a3837f0381ef902bfe120;p=mirrors%2FFD230.git Cat1 升级脚本到PY_OTA_V13 支持 接听和挂断电话带 电话号 --- diff --git a/cat1modem/EG810MCNLAR06A01M08_VOLTE_OCPU_QPY_BETA0312_20240914-1326.zip b/cat1modem/EG810MCNLAR06A01M08_VOLTE_OCPU_QPY_BETA0312_20240914-1326.zip new file mode 100644 index 000000000..01d1d8791 --- /dev/null +++ b/cat1modem/EG810MCNLAR06A01M08_VOLTE_OCPU_QPY_BETA0312_20240914-1326.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7be93d062f35acfd2de98654ca699818935125a9544e1e4bafb3ae2bf8b5340f +size 11640213 diff --git a/cat1modem/src/cat1Service.py b/cat1modem/src/cat1Service.py index 0ff791903..c45968fef 100644 --- a/cat1modem/src/cat1Service.py +++ b/cat1modem/src/cat1Service.py @@ -73,7 +73,7 @@ sms.setCallback(msg_cb)#sms注册回调 CAT1_SERVICE_HEAD = 'FE' #固定head PROJECT_NAME = "Cat1SlipUDPService" -PROJECT_VERSION = "PY_SRV_V12" +PROJECT_VERSION = "PY_SRV_V13" CONFIG_JSON="/usr/system_config.json" CURRENT_APP_TYPE="pysrv" @@ -94,9 +94,9 @@ def get_default_versionvalue_by_py(app_type): if (app_type == "pymain"): return "PY_MAIN_V2" elif (app_type == "pyota"): - return "PY_OTA_V11" + return "PY_OTA_V13" elif (app_type == "pysrv"): - return "PY_SRV_V11" + return "PY_SRV_V13" #如果没有configfile则创建它 if not ql_fs.path_exists(CONFIG_JSON): @@ -661,20 +661,20 @@ class Cat1Service: return 0 # 电话接听消息 - def notifyConnecteCall(self): + def notifyConnecteCall(self, phone_numb): self.clear_remain() __head = '0A' - self.__message = '0' + self.__message = str(phone_numb) self.__Socket_UDP(__head, self.__message) # if self.__err == 1 or self.__value[2] != 'OK': # return -1 return 0 # 电话拒接消息 - def notifyDisconnectCall(self): + def notifyDisconnectCall(self, phone_numb): self.clear_remain() __head = '0B' - self.__message = '0' + self.__message = str(phone_numb) self.__Socket_UDP(__head, self.__message) # if self.__err == 1 or self.__value[2] != 'OK': # return -1 @@ -956,11 +956,12 @@ def voice_callback(args): elif args[0] == 11: if eventMesh.publish("get_volte_switch") == 1: #开启VOLTE功能 print('voicecall connected, PhoneNO: ', args[6]) - cat1service.notifyConnecteCall() + cat1service.notifyConnecteCall(args[6]) elif args[0] == 12: print('voicecall disconnect') if eventMesh.publish("get_volte_switch") == 1: #开启VOLTE功能 - cat1service.notifyDisconnectCall() + print('voicecall disconnected, PhoneNO: ', args[6]) + cat1service.notifyDisconnectCall(args[6]) elif args[0] == 13: print('voicecall is waiting, PhoneNO: ', args[6]) elif args[0] == 14: diff --git a/cat1modem/src/checkota.py b/cat1modem/src/checkota.py index 302c9fd9d..a088eebe6 100644 --- a/cat1modem/src/checkota.py +++ b/cat1modem/src/checkota.py @@ -14,7 +14,7 @@ import utime import log import uos -PROJECT_VERSION="PY_OTA_V12" +PROJECT_VERSION="PY_OTA_V13" CONFIG_JSON="/usr/system_config.json" CURRENT_APP_TYPE="pyota" # 设置日志输出级别 diff --git a/cat1modem/EG810MCNLAR06A01M08_VOLTE_OCPU_QPY_BETA0312_20240913-0927.zip b/cat1modem/src/current_img/EG810MCNLAR06A01M08_VOLTE_OCPU_QPY_BETA0312_20240913-0927.zip similarity index 100% rename from cat1modem/EG810MCNLAR06A01M08_VOLTE_OCPU_QPY_BETA0312_20240913-0927.zip rename to cat1modem/src/current_img/EG810MCNLAR06A01M08_VOLTE_OCPU_QPY_BETA0312_20240913-0927.zip diff --git a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp index a698d3a2f..089543701 100644 --- a/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp +++ b/code/sdk/application/wearable/fd230app/nativeui/makephone/src/MainCallingPresenter.cpp @@ -209,7 +209,7 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event) { cat1_call_hungup(); - cat1_handle_call_disconnected(); + cat1_handle_call_disconnected("callnumb"); } else { @@ -253,7 +253,7 @@ bool MainCallingPresenter::OnClick(UIView& view, const ClickEvent& event) if (CallerLogModel::GetInstance()->GetCallSource() == CallerLogModel::CallSourceCat1) { cat1_call_hungup(); - cat1_handle_call_disconnected(); + cat1_handle_call_disconnected("callnumb"); return true; //#endif diff --git a/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp b/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp index f36c09371..921fbd519 100755 --- a/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp +++ b/code/sdk/application/wearable/service/msg_center/src/notify/makephone_notification.cpp @@ -735,7 +735,7 @@ void CalldialTimerCallBackProc(int data) if(dail_falg>=DIAL_TIME) { cat1_call_hungup(); - cat1_handle_call_disconnected(); + cat1_handle_call_disconnected("callnumb"); } } diff --git a/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp b/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp index 7f59e17ff..2ab86e783 100644 --- a/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp +++ b/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.cpp @@ -994,22 +994,22 @@ void restart_time_sync(void) } } -int cat1_handle_call_connected(void) +int cat1_handle_call_connected(char* phonenum) { - WEARABLE_LOGI(WEARABLE_LOG_MODULE_MAIN_SERVICE,"cat1 call connected\n"); + WEARABLE_LOGI(WEARABLE_LOG_MODULE_MAIN_SERVICE,"cat1 call connected %s\n",phonenum); //声音处理 - incomedcall_event_sendmsg_toUI("ok"); + incomedcall_event_sendmsg_toUI(phonenum); uapi_cat1_start_volte_voice(); return 1; } //来电挂断处理 -int cat1_handle_call_disconnected(void) +int cat1_handle_call_disconnected(char* phonenum) { - WEARABLE_LOGI(WEARABLE_LOG_MODULE_MAIN_SERVICE,"cat1 call disconnected\n"); + WEARABLE_LOGI(WEARABLE_LOG_MODULE_MAIN_SERVICE,"cat1 call disconnected %s\n",phonenum); //TODO: 关闭声音 - callend_event_sendmsg_toUI("0k"); + callend_event_sendmsg_toUI(phonenum); uapi_cat1_stop_volte_voice(); return 1; } @@ -1225,10 +1225,10 @@ static int udp_packet_parse(char *rx_buffer, int len) index = cat1_handle_timesync(msg_buffer); break; case UDP_MSG_CALL_CONNECTED: - index = cat1_handle_call_connected(); + index = cat1_handle_call_connected(msg_buffer); break; case UDP_MSG_CALL_DISCONNECTED: - index = cat1_handle_call_disconnected(); + index = cat1_handle_call_disconnected(msg_buffer); break; case UDP_CMD_CAT1_OTA_UPDATE: WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP,"CAT1_OTA_UPDATE reply %s\n",msg_buffer); diff --git a/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.h b/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.h index 218df946a..196c1db14 100644 --- a/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.h +++ b/code/sdk/drivers/peripheral/slip/cat1Service/cat1_server.h @@ -42,7 +42,7 @@ void ble_get_cat1_at_msg(char *buffer,uint8_t len); void send_dtfm_number_toCat1(char ch);//发送dtfm void send_volte_switch_toCat1(void); //发送VOLTE开关标识到CAT1 -int cat1_handle_call_disconnected(void); +int cat1_handle_call_disconnected(char* phonenum); #ifdef __cplusplus #if __cplusplus