编译修改
authorazao <821478748@qq.com>
Thu, 26 Mar 2026 09:17:59 +0000 (17:17 +0800)
committerazao <821478748@qq.com>
Thu, 26 Mar 2026 09:17:59 +0000 (17:17 +0800)
2.sdk/Helios_SDK/config/config.in
2.sdk/Helios_SDK/services/microPython/ports/quectel/core/motor.py
2.sdk/Helios_SDK/services/microPython/ports/quectel/core/uwebsocket.py
2.sdk/Helios_SDK/services/microPython/py/makeqstrdefs.py

index 862820b..343bad7 100644 (file)
@@ -5,11 +5,10 @@ menu "System Configuration"
 source "../system/config.in"
 endmenu
 
-menu "EG810MCN_GA_ALIPAY"
+menu "EG810MCN_GA_VOLTE"
 source "../services/microPython/config/config.in"
 source "../components/poc/poc_option.in"
 source "../components/GH301x/GH301x_option.in"
-source "../components/HX3918/HX3918_option.in"
 source "../components/SC7A20/SC7A20_option.in"
 source "../components/juphoon/juphoon_option.in"
 endmenu
index c5c29f6..126ed5c 100644 (file)
@@ -28,12 +28,16 @@ class motorEventManager(Abstract):#马达事件
         self.motor_open_time = 0 #开马达事件
         self.motor_close_time = 0#关马达事件100ms
         self.motor_count = 0
+        self.motor_count_tmp = 0
         self.motor_mode = 0#模式
         _thread.start_new_thread(self.motorInfo_queue_thread, ())
         EventMesh.subscribe("publish_message_event_motorInfo",self.publish_message_event_motorInfo)
         EventMesh.subscribe("set_motor_time", self.set_motor_time)#设置参数
         EventMesh.subscribe("close_motor_infor", self.close_motor_infor)#关闭马达和定时器
+        EventMesh.subscribe("get_motor_enable", self.get_motor_enable)#关闭马达和定时器
         pass
+    def get_motor_enable(self,event=None,msg=None):
+        return self.motor_enable
 
     def motorInfo_queue_thread(self):
         while True:
@@ -63,9 +67,14 @@ class motorEventManager(Abstract):#马达事件
                 self.motor_total_time = msg[2]#总的时间
                 self.motor_open_time = msg[3] #开马达事件
                 self.motor_close_time = msg[4]#关马达事件100ms
-                self.motor_count = 0
+                self.motor_total_time_tmp=self.motor_total_time
+                if len(msg) <= 5:
+                    self.motor_count = 0
+                else:
+                    self.motor_count = msg[5]
+
                 self.motor_timer.stop()
-                # print("motor msg",msg)
+                print("motor msg:{} len:{} self.motor_count:{}".format(msg,len(msg),self.motor_count))
                 close_motor()
                 self.motor_timer.start(MOTOR_TIME,1,self.publish_motor_event_cb)
 
@@ -75,7 +84,7 @@ class motorEventManager(Abstract):#马达事件
             EventMesh.publish("close_motor_infor")#关闭马达和定时器
             return
         if self.motor_mode == 1:# 持续振动时间100单位 长振
-            if self.motor_total_time > 0:
+            if self.motor_count == 0:
                 self.motor_total_time-=1
                 if self.motor_total_time > 0:
                     open_motor()
@@ -83,6 +92,20 @@ class motorEventManager(Abstract):#马达事件
                     close_motor()
                     EventMesh.publish("close_motor_infor")#关闭马达和定时器
                     return
+            else:
+                if self.motor_count_tmp > self.motor_count:
+                    close_motor()
+                    EventMesh.publish("close_motor_infor")#关闭马达和定时器
+                    return
+                self.motor_total_time_tmp-=1
+                if self.motor_total_time_tmp > 0:
+                    open_motor()
+                else:
+                    close_motor()
+                    self.motor_total_time_tmp=self.motor_total_time
+                    self.motor_count_tmp+=1
+                    
+                    pass
         elif self.motor_mode == 2:# 间隔振动
             # print("self.motor_count",self.motor_count,self.motor_open_time,self.motor_close_time,self.motor_total_time)
             if self.motor_count % (self.motor_open_time) < self.motor_close_time: # 4 4 2 1%4 = 1 2%4 = 2 3%4 = 3
@@ -90,6 +113,7 @@ class motorEventManager(Abstract):#马达事件
             else:
                 close_motor()
             if self.motor_count >= self.motor_total_time-1:
+                close_motor()
                 EventMesh.publish("close_motor_infor")#关闭马达和定时器
                 return
             self.motor_count+=1
index 0fda29d..258d5f1 100644 (file)
@@ -287,7 +287,7 @@ class Client(object):
                               uri.hostname, uri.port)
 
         sock = socket.socket()
-        addr = socket.getaddrinfo(uri.hostname, uri.port,socket.AF_INET)
+        addr = socket.getaddrinfo(uri.hostname, uri.port)
         sock.connect(addr[0][4])
 
         if uri.protocol == 'wss':
index ad4f22d..1aa56b9 100644 (file)
@@ -79,6 +79,7 @@ def process_file(f):
         re_match = re.compile(r'MP_COMPRESSED_ROM_TEXT\("([^"]*)"\)')
     output = []
     last_fname = None
+    print("正在处理的文件 =", f.name)
     for line in f:
         if line.isspace():
             continue
@@ -203,7 +204,7 @@ if __name__ == "__main__":
         pass
 
     if args.command == "split":
-        with io.open(args.input_filename, encoding="utf-8") as infile:
+        with io.open(args.input_filename, encoding="utf-8", errors="ignore") as infile:
             process_file(infile)
 
     if args.command == "cat":