From: azao <821478748@qq.com> Date: Thu, 26 Mar 2026 09:17:59 +0000 (+0800) Subject: 编译修改 X-Git-Url: http://git.snicker.com.cn/css/html/static/gitweb.css?a=commitdiff_plain;h=751146f2ac6d565268e0b639b65a573568150427;p=mirrors%2FASR1603_G5.git 编译修改 --- diff --git a/2.sdk/Helios_SDK/config/config.in b/2.sdk/Helios_SDK/config/config.in index 862820b5..343bad71 100644 --- a/2.sdk/Helios_SDK/config/config.in +++ b/2.sdk/Helios_SDK/config/config.in @@ -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 diff --git a/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/motor.py b/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/motor.py index c5c29f62..126ed5c6 100644 --- a/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/motor.py +++ b/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/motor.py @@ -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 diff --git a/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/uwebsocket.py b/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/uwebsocket.py index 0fda29dc..258d5f1d 100644 --- a/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/uwebsocket.py +++ b/2.sdk/Helios_SDK/services/microPython/ports/quectel/core/uwebsocket.py @@ -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': diff --git a/2.sdk/Helios_SDK/services/microPython/py/makeqstrdefs.py b/2.sdk/Helios_SDK/services/microPython/py/makeqstrdefs.py index ad4f22d5..1aa56b92 100644 --- a/2.sdk/Helios_SDK/services/microPython/py/makeqstrdefs.py +++ b/2.sdk/Helios_SDK/services/microPython/py/makeqstrdefs.py @@ -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":