From: azao <821478748@qq.com> Date: Thu, 26 Mar 2026 08:27:13 +0000 (+0800) Subject: 更新编译问题 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=c328de68b470248b033c87bcbf1ad32837b78e7b;p=mirrors%2FASR1603_G5.git 更新编译问题 --- diff --git a/2.sdk/Helios_SDK/config/autoconf.h b/2.sdk/Helios_SDK/config/autoconf.h index 9e035d27..049ba1dd 100644 --- a/2.sdk/Helios_SDK/config/autoconf.h +++ b/2.sdk/Helios_SDK/config/autoconf.h @@ -1,45 +1,50 @@ -/* - * - * Automatically generated file; DO NOT EDIT. - * Helios SDK Configuration - * - */ -#define PROJECT_NAME_C3_W8 1 -#define CONFIG_LVGL_SPAN 1 -#define CONFIG_LVGL_FS_HELIOS 1 -#define CONFIG_LVGL_GIF_DECODE 1 -#define CONFIG_LVGL_SPINNER 1 -#define CONFIG_LCD 1 -#define CONFIG_LVGL_ANIMIMG 1 -#define CONFIG_LVGL_KEYBOARD 1 -#define CONFIG_LVGL_CALENDAR 1 -#define CONFIG_LVGL_LED 1 -#define CONFIG_VIOCE_CALL 1 -#define CONFIG_LVGL_FS_EXTFLASH_HELIOS 1 -#define CONFIG_LVGL_TABVIEW 1 -#define CONFIG_LVGL_LINE 1 -#define CONFIG_LVGL 1 -#define CONFIG_LVGL_CHART 1 -#define CONFIG_LVGL_LIST 1 -#define CONFIG_LVGL_MSGBOX 1 -#define CONFIG_LVGL_ARC 1 -#define CONFIG_LVGL_METER 1 -#define CONFIG_LVGL_JPG_DECODE 1 -#define CONFIG_LVGL_PNG_DECODE 1 -#define CONFIG_LVGL_IMGBTN 1 -//#define CONFIG_GH301x 1 -#define CONFIG_HX3918 1 -#define CONFIG_MBEDTLS 1 -#define CONFIG_SC7A20 1 -#define CONFIG_LVGL_WIN 1 -#define CONFIG_LVGL_COLORWHEEL 1 -#define CONFIG_LVGL_CANVAS 1 -#define CONFIG_LVGL_SPINBOX 1 -#define CONFIG_LVGL_QRCODE 1 -#define CONFIG_LVGL_TILEVIEW 1 -#define CONFIG_LVGL_HANDLER_TASK_PRIORITY 80 -#define CONFIG_CAMERA 1 -#define CONFIG_JPEG 1 -#define CONFIG_CAMERA_SAVEPHOTOS 1 -//菊风视频通话 -#define CONFIG_juphoon 1 \ No newline at end of file +/* + * + * Automatically generated file; DO NOT EDIT. + * Helios SDK Configuration + * + */ + + +#define PROJECT_NAME_G3_7PIN 1 //项目宏定义 + + +// #define CONFIG_LVGL_SPAN 1 +// #define CONFIG_LVGL_FS_HELIOS 1 +// #define CONFIG_LVGL_GIF_DECODE 1 +// #define CONFIG_LVGL_SPINNER 1 +//#define CONFIG_LCD 1 +// #define CONFIG_LVGL_ANIMIMG 1 +// #define CONFIG_LVGL_KEYBOARD 1 +// #define CONFIG_LVGL_CALENDAR 1 +// #define CONFIG_LVGL_LED 1 +#define CONFIG_VIOCE_CALL 1 +// #define CONFIG_LVGL_FS_EXTFLASH_HELIOS 1 +// #define CONFIG_LVGL_TABVIEW 1 +//#define CONFIG_LVGL_LINE 1 +//#define CONFIG_LVGL 1 +// #define CONFIG_LVGL_CHART 1 +// #define CONFIG_LVGL_LIST 1 +// #define CONFIG_LVGL_MSGBOX 1 +// #define CONFIG_LVGL_ARC 1 +// #define CONFIG_LVGL_METER 1 +//#define CONFIG_LVGL_JPG_DECODE 1 +// #define CONFIG_LVGL_PNG_DECODE 1 +// #define CONFIG_LVGL_IMGBTN 1 +//#define CONFIG_GH301x 1 +//#define CONFIG_HX3918 1 +#define CONFIG_MBEDTLS 1 +//#define CONFIG_SC7A20 1 +// #define CONFIG_LVGL_WIN 1 +// #define CONFIG_LVGL_COLORWHEEL 1 +// #define CONFIG_LVGL_CANVAS 1 +// #define CONFIG_LVGL_SPINBOX 1 +// #define CONFIG_LVGL_QRCODE 1 +// #define CONFIG_LVGL_TILEVIEW 1 +// #define CONFIG_LVGL_HANDLER_TASK_PRIORITY 80 +//#define CONFIG_CAMERA 1 +//#define CONFIG_JPEG 1 +#define CONFIG_CAMERA_SAVEPHOTOS 1 +#define CONFIG_VAD 1 +//菊风视频通话 +//#define CONFIG_juphoon 1 diff --git a/2.sdk/Helios_SDK/config/config.in b/2.sdk/Helios_SDK/config/config.in index 862820b5..86ce1df4 100644 --- a/2.sdk/Helios_SDK/config/config.in +++ b/2.sdk/Helios_SDK/config/config.in @@ -1,16 +1,15 @@ - -mainmenu "Helios SDK Configuration" - -menu "System Configuration" -source "../system/config.in" -endmenu - -menu "EG810MCN_GA_ALIPAY" -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 - + +mainmenu "Helios SDK Configuration" + +menu "System Configuration" +source "../system/config.in" +endmenu + +menu "EG810MCN_GA_VOLTE" +source "../services/microPython/config/config.in" +source "../components/poc/poc_option.in" +source "../components/GH301x/GH301x_option.in" +source "../components/SC7A20/SC7A20_option.in" +source "../components/juphoon/juphoon_option.in" +endmenu + diff --git a/2.sdk/Helios_SDK/config/config.mk b/2.sdk/Helios_SDK/config/config.mk index a1d59675..2dd020e3 100644 --- a/2.sdk/Helios_SDK/config/config.mk +++ b/2.sdk/Helios_SDK/config/config.mk @@ -1,66 +1,66 @@ -# -# Automatically generated file; DO NOT EDIT. -# Helios SDK Configuration -# -PROJECT_NAME_G3_7PIN=y -# -# System Configuration -# -CONFIG_MBEDTLS=y - -# -# EG810MCN_GA_VOLTE -# -# CONFIG_LVGL=y - -# -# lvgl option -# -# CONFIG_LVGL_PNG_DECODE=y -# CONFIG_LVGL_GIF_DECODE is not set -# CONFIG_LVGL_JPG_DECODE=y -#CONFIG_LVGL_FS_HELIOS=y -# CONFIG_LVGL_FS_SD_HELIOS is not set -# CONFIG_LVGL_FS_EXTFLASH_HELIOS=y -# CONFIG_LVGL_CUSTOMER_FONT_SUPPORT is not set -# CONFIG_LVGL_QRCODE=y -# CONFIG_LVGL_FONT is not set -# CONFIG_LVGL_ARC is not set -#CONFIG_LVGL_IMGBTN=y -#CONFIG_LVGL_LINE=y -#CONFIG_LVGL_LIST=y -# CONFIG_LVGL_CHART is not set -# CONFIG_LVGL_LED is not set -# CONFIG_LVGL_CANVAS=y -# CONFIG_LVGL_WIN=y -# CONFIG_LVGL_TABVIEW is not set -# CONFIG_LVGL_TILEVIEW=y -# CONFIG_LVGL_MSGBOX=y -# CONFIG_LVGL_METER is not set -# CONFIG_LVGL_CALENDAR is not set -# CONFIG_LVGL_SPINNER is not set -# CONFIG_LVGL_SPINBOX is not set -# CONFIG_LVGL_ANIMIMG is not set -# CONFIG_LVGL_COLORWHEEL is not set -# CONFIG_LVGL_KEYBOARD=y -# CONFIG_LVGL_SPAN=y -# CONFIG_LVGL_HANDLER_TASK_PRIORITY=80 -# CONFIG_QRCODE is not set -#CONFIG_CAMERA=y -# CONFIG_CAMERA_DECODE is not set -CONFIG_CAMERA_SAVEPHOTOS=y -# CONFIG_QUECTHING is not set -# CONFIG_SPINAND is not set -# CONFIG_RTMP is not set -#CONFIG_JPEG=y -# CONFIG_SPI_SDCARD is not set -CONFIG_VIOCE_CALL=y -# CONFIG_TTS is not set -#CONFIG_LCD=y -# CONFIG_UART_SLIP is not set -# CONFIG_POC is not set -#CONFIG_GH301x=y -#CONFIG_HX3918=y -#CONFIG_SC7A20=y -CONFIG_VAD=y -#CONFIG_juphoon=y +# +# Automatically generated file; DO NOT EDIT. +# Helios SDK Configuration +# +PROJECT_NAME_G3_7PIN=y +# +# System Configuration +# +CONFIG_MBEDTLS=y + +# +# EG810MCN_GA_VOLTE +# +# CONFIG_LVGL=y + +# +# lvgl option +# +# CONFIG_LVGL_PNG_DECODE=y +# CONFIG_LVGL_GIF_DECODE is not set +# CONFIG_LVGL_JPG_DECODE=y +#CONFIG_LVGL_FS_HELIOS=y +# CONFIG_LVGL_FS_SD_HELIOS is not set +# CONFIG_LVGL_FS_EXTFLASH_HELIOS=y +# CONFIG_LVGL_CUSTOMER_FONT_SUPPORT is not set +# CONFIG_LVGL_QRCODE=y +# CONFIG_LVGL_FONT is not set +# CONFIG_LVGL_ARC is not set +#CONFIG_LVGL_IMGBTN=y +#CONFIG_LVGL_LINE=y +#CONFIG_LVGL_LIST=y +# CONFIG_LVGL_CHART is not set +# CONFIG_LVGL_LED is not set +# CONFIG_LVGL_CANVAS=y +# CONFIG_LVGL_WIN=y +# CONFIG_LVGL_TABVIEW is not set +# CONFIG_LVGL_TILEVIEW=y +# CONFIG_LVGL_MSGBOX=y +# CONFIG_LVGL_METER is not set +# CONFIG_LVGL_CALENDAR is not set +# CONFIG_LVGL_SPINNER is not set +# CONFIG_LVGL_SPINBOX is not set +# CONFIG_LVGL_ANIMIMG is not set +# CONFIG_LVGL_COLORWHEEL is not set +# CONFIG_LVGL_KEYBOARD=y +# CONFIG_LVGL_SPAN=y +# CONFIG_LVGL_HANDLER_TASK_PRIORITY=80 +# CONFIG_QRCODE is not set +#CONFIG_CAMERA=y +# CONFIG_CAMERA_DECODE is not set +# CONFIG_CAMERA_SAVEPHOTOS=y +# CONFIG_QUECTHING is not set +# CONFIG_SPINAND is not set +# CONFIG_RTMP is not set +#CONFIG_JPEG=y +# CONFIG_SPI_SDCARD is not set +CONFIG_VIOCE_CALL=y +# CONFIG_TTS is not set +#CONFIG_LCD=y +# CONFIG_UART_SLIP is not set +# CONFIG_POC is not set +#CONFIG_GH301x=y +#CONFIG_HX3918=y +#CONFIG_SC7A20=y +CONFIG_VAD=y +#CONFIG_juphoon=y 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..d79939f8 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 @@ -1,109 +1,133 @@ -from common import Abstract -import osTimer -import EventMesh -from machine import Pin -import utime - -from queue import Queue -import _thread -import usys - - -motor_pin = Pin(Pin.GPIO36, Pin.OUT, Pin.PULL_PD, 0) -def open_motor():#开马达 - motor_pin.write(1) - -def close_motor():#关闭马达 - motor_pin.write(0) - - - -MOTOR_TIME = 100 -class motorEventManager(Abstract):#马达事件 - def __init__(self): - self.motor_timer = osTimer() - self.motorInfo_queue = Queue() - self.motor_enable = 0#马达使能 - self.motor_total_time = 0#总的时间 - self.motor_open_time = 0 #开马达事件 - self.motor_close_time = 0#关马达事件100ms - self.motor_count = 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)#关闭马达和定时器 - pass - - def motorInfo_queue_thread(self): - while True: - data = self.motorInfo_queue.get() - #print("ledInfo_queue:data = {}".format(data)) - if data != None: - try: - data["func"](data["data"]) - except Exception as e: - print("ledInfo_queue:ERROR:{}".format(e)) - usys.print_exception(e) - def publish_message_event_motorInfo(self,event,msg): - self.motorInfo_queue.put(msg) - - def publish_motor_event_cb(self, *args, **kwargs): - EventMesh.publish("publish_message_event_motorInfo",{"func":self.motor_fun_cb,"data":0}) - - def post_processor_after_instantiation(self): - pass - - # msg 0马达使能 1 马达振动时间100ms单位 2 震动次数 3 间隔时间振动 4 是否需要长振 5 长振时间 6间隔时间长振 7长振次数1一次 要为200ms的倍数 - def set_motor_time(self,event,msg): - if msg != None: - self.motor_enable = msg[0] - if self.motor_enable == 1: #马达使能 - self.motor_mode = msg [1] - 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_timer.stop() - # print("motor msg",msg) - close_motor() - self.motor_timer.start(MOTOR_TIME,1,self.publish_motor_event_cb) - - def motor_fun_cb(self, data): - if self.motor_mode == 0 or self.motor_enable == 0: - close_motor() - EventMesh.publish("close_motor_infor")#关闭马达和定时器 - return - if self.motor_mode == 1:# 持续振动时间100单位 长振 - if self.motor_total_time > 0: - self.motor_total_time-=1 - if self.motor_total_time > 0: - open_motor() - else: - close_motor() - EventMesh.publish("close_motor_infor")#关闭马达和定时器 - return - 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 - open_motor() - else: - close_motor() - if self.motor_count >= self.motor_total_time-1: - EventMesh.publish("close_motor_infor")#关闭马达和定时器 - return - self.motor_count+=1 - - def close_motor_infor(self,event,msg): - print("close_motor_infor!!!") - close_motor() - self.motor_enable = 0#马达使能 - self.motor_total_time = 0#总的时间 - self.motor_open_time = 0 #开马达事件 - self.motor_close_time = 0#关马达事件100ms - self.motor_count = 0 - self.motor_mode = 0#模式 - self.motor_timer.stop() - - - +from common import Abstract +import osTimer +import EventMesh +from machine import Pin +import utime + +from queue import Queue +import _thread +import usys + + +motor_pin = Pin(Pin.GPIO36, Pin.OUT, Pin.PULL_PD, 0) +def open_motor():#开马达 + motor_pin.write(1) + +def close_motor():#关闭马达 + motor_pin.write(0) + + + +MOTOR_TIME = 100 +class motorEventManager(Abstract):#马达事件 + def __init__(self): + self.motor_timer = osTimer() + self.motorInfo_queue = Queue() + self.motor_enable = 0#马达使能 + self.motor_total_time = 0#总的时间 + 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: + data = self.motorInfo_queue.get() + #print("ledInfo_queue:data = {}".format(data)) + if data != None: + try: + data["func"](data["data"]) + except Exception as e: + print("ledInfo_queue:ERROR:{}".format(e)) + usys.print_exception(e) + def publish_message_event_motorInfo(self,event,msg): + self.motorInfo_queue.put(msg) + + def publish_motor_event_cb(self, *args, **kwargs): + EventMesh.publish("publish_message_event_motorInfo",{"func":self.motor_fun_cb,"data":0}) + + def post_processor_after_instantiation(self): + pass + + # msg 0马达使能 1 马达振动时间100ms单位 2 震动次数 3 间隔时间振动 4 是否需要长振 5 长振时间 6间隔时间长振 7长振次数1一次 要为200ms的倍数 + def set_motor_time(self,event,msg): + if msg != None: + self.motor_enable = msg[0] + if self.motor_enable == 1: #马达使能 + self.motor_mode = msg [1] + self.motor_total_time = msg[2]#总的时间 + self.motor_open_time = msg[3] #开马达事件 + self.motor_close_time = msg[4]#关马达事件100ms + 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:{} 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) + + def motor_fun_cb(self, data): + if self.motor_mode == 0 or self.motor_enable == 0: + close_motor() + EventMesh.publish("close_motor_infor")#关闭马达和定时器 + return + if self.motor_mode == 1:# 持续振动时间100单位 长振 + if self.motor_count == 0: + self.motor_total_time-=1 + if self.motor_total_time > 0: + open_motor() + else: + 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 + open_motor() + else: + close_motor() + if self.motor_count >= self.motor_total_time-1: + close_motor() + EventMesh.publish("close_motor_infor")#关闭马达和定时器 + return + self.motor_count+=1 + + def close_motor_infor(self,event,msg): + print("close_motor_infor!!!") + close_motor() + self.motor_enable = 0#马达使能 + self.motor_total_time = 0#总的时间 + self.motor_open_time = 0 #开马达事件 + self.motor_close_time = 0#关马达事件100ms + self.motor_count = 0 + self.motor_mode = 0#模式 + self.motor_timer.stop() + + + 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..1dc6d3eb 100644 --- a/2.sdk/Helios_SDK/services/microPython/py/makeqstrdefs.py +++ b/2.sdk/Helios_SDK/services/microPython/py/makeqstrdefs.py @@ -203,7 +203,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":