设置一个发送时网络判断
authorazao <821478748@qq.com>
Thu, 16 Oct 2025 07:50:19 +0000 (15:50 +0800)
committerazao <821478748@qq.com>
Thu, 16 Oct 2025 07:50:19 +0000 (15:50 +0800)
修改桌面日期间距

2.sdk/project/K8/sdk/services/microPython/ports/quectel/core/protocol.py
2.sdk/project/K8/sdk/services/microPython/ports/quectel/core/ui_WatchFaceScreen.py
2.sdk/project/K8/sdk/system/platform/ASR_1606/boards/EG810MCN_GA_VOLTE/images/firmware_base_release_pack.zip

index 6b83599..ec14809 100644 (file)
@@ -559,6 +559,7 @@ class SockMangager(Abstract):
         EventMesh.subscribe("send_unbind_dev_to_iot",self.send_unbind_dev_to_iot)#心跳包定时器开启
         self.reconnect_count = 0
         self.deviceReadState = ""
+        
         # self.connect_timer.start(2000,0,self.iot_connect_timerCb)
 
     def send_device_information(self,event,msg):
@@ -622,6 +623,9 @@ class SockMangager(Abstract):
         if stagecode == 3 and subcode == 1:
             socket_log.info('Network connection successful!')
 
+        if sim.getStatus() != 1 or self.start_voice_flag == 1:#网络正常
+            return
+        
         if self.reconnect_count >= WEB_CONNECT_MAX_COUNT: #重连次数大于10次不在进重连只有下发心跳才重新连接
             return
         token = EventMesh.publish("get_dev_token")
@@ -692,6 +696,8 @@ class SockMangager(Abstract):
         # print("心跳发送数据包:{}".format(heart_packet))
 
     def send_packet_iot(self,data):#发送数据给iot,data为接口json数据
+        if sim.getStatus() != 1 or self.start_voice_flag == 1:#网络正常
+            return
         #Header
         header = ustruct.pack('>H', 0xFFFE)  # 使用大端模式
         #Type
index 6eeab82..8fd006d 100644 (file)
@@ -179,7 +179,7 @@ status_img3.add_style(style_watchface_img_default, lv.PART.MAIN|lv.STATE.DEFAULT
 
 #日期
 watchface1_date_span = lv.label(Watchface1)
-watchface1_date_span.set_pos(85, 191)
+watchface1_date_span.set_pos(70, 191)
 watchface1_date_span.set_size(140, 50)
 watchface1_date_span.set_align(lv.TEXT_ALIGN.LEFT)
 watchface1_date_span.set_text("")
index 29fc8e2..dbb23ba 100644 (file)
Binary files a/2.sdk/project/K8/sdk/system/platform/ASR_1606/boards/EG810MCN_GA_VOLTE/images/firmware_base_release_pack.zip and b/2.sdk/project/K8/sdk/system/platform/ASR_1606/boards/EG810MCN_GA_VOLTE/images/firmware_base_release_pack.zip differ