From e716aa4149be36ce443075c5c0de31c627c03b75 Mon Sep 17 00:00:00 2001 From: ranchuan Date: Tue, 9 Jan 2024 18:06:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E7=89=88=E6=9C=AC=E4=B8=8D?= =?UTF-8?q?=E5=BC=B9=E5=87=BA=E4=B8=8A=E4=BC=A0=E6=8F=90=E7=A4=BA=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- checher_slave.uvoptx | 4 ++-- checher_slave.uvprojx | 2 +- source/ReadMe.txt | 3 ++- source/main/compiler_info.h | 2 +- source/mycopy.py | 21 +++++++++------------ 5 files changed, 15 insertions(+), 17 deletions(-) diff --git a/checher_slave.uvoptx b/checher_slave.uvoptx index 50dd3ff..641a16f 100644 --- a/checher_slave.uvoptx +++ b/checher_slave.uvoptx @@ -299,7 +299,7 @@ 1 0 - 1 + 0 18 @@ -540,7 +540,7 @@ 1 0 - 0 + 1 18 diff --git a/checher_slave.uvprojx b/checher_slave.uvprojx index 7708fc1..15db327 100644 --- a/checher_slave.uvprojx +++ b/checher_slave.uvprojx @@ -4222,7 +4222,7 @@ 1 1 fromelf.exe --bin -o "$L@L.bin" "#L" - python source\mycopy.py + python source\mycopy.py debug 0 0 0 diff --git a/source/ReadMe.txt b/source/ReadMe.txt index 5616df9..f4ab7de 100644 --- a/source/ReadMe.txt +++ b/source/ReadMe.txt @@ -329,5 +329,6 @@ 2024.1.8 V2.13 使用新的can帧回复数据 解决ew自检模式 8导致小板死机的bug,自检返回值除以400,单位0.1ms - +2024.1.9 + 调试版本不弹出上传提示框 diff --git a/source/main/compiler_info.h b/source/main/compiler_info.h index cc15846..a1ff516 100644 --- a/source/main/compiler_info.h +++ b/source/main/compiler_info.h @@ -6,7 +6,7 @@ -#define BUILD_DATE "2024-01-08 16:28:07" +#define BUILD_DATE "2024-01-09 15:43:29" #define SOFT_VERSION "2.13" diff --git a/source/mycopy.py b/source/mycopy.py index c7fafed..730ad60 100644 --- a/source/mycopy.py +++ b/source/mycopy.py @@ -134,14 +134,13 @@ def creat_head(data:bytearray,date:str): return head -def main(): +def main(cmd_str:str): date=time.get_date() src=APP_FILE_SRC+".bin" dst=APP_FILE_DST+"_"+date+".pkt" if not os.path.exists(src): print(src+' File Error!!!') else: - if os.path.exists(dst): os.remove(dst) file = open(src,"rb") @@ -153,12 +152,10 @@ def main(): with open(dst,"wb") as f: f.write(data) print(dst+' create app file success.') - readback=os.popen("upload "+SQL_APP_PATH+" "+dst).readlines() - for i in readback: - print(i) - # sql=mysql.sql() - # if(sql.init(SQL_APP_PATH)==True): - # sql.insert(dst) + if(cmd_str=="app"): + readback=os.popen("upload "+SQL_APP_PATH+" "+dst).readlines() + for i in readback: + print(i) boot=BOOT_FILE_SRC+".bin" boot_dst=BOOT_FILE_DST+"_"+date+".bin" if os.path.exists(boot): @@ -173,11 +170,11 @@ def main(): with open(boot_dst,"wb") as f: f.write(d) print(boot_dst+" create boot file success.") - #sql=mysql.sql() - #if(sql.init(SQL_BOOT_PATH)==True): - # sql.insert(boot_dst) else: print("please build bootloader to create boot file") if __name__=="__main__": - main() + cmd_str="app" + if len(sys.argv)>=2: + cmd_str=sys.argv[1] + main(cmd_str)