mirror of
https://github.com/Ai-Thinker-Open/TBXX_Flash_Tool.git
synced 2025-05-08 22:37:57 +08:00
V1.2 更改三元组顺序,添加图标
This commit is contained in:
parent
52fd70f593
commit
c316bd735b
@ -65,7 +65,7 @@
|
||||
如果提示 ```连接芯片失败```,可能是接线错误请检查接线,如果确认接线无误仍然连接失败可能是bootloader损坏。如果bootloader损坏只能采用官方专用烧录器重新烧录botloader。
|
||||
|
||||
### 打包可执行文件
|
||||
pyinstaller -F -w TBXX_Flash_Tool.py
|
||||
pyinstaller -F -w -i aithinker.ico TBXX_Flash_Tool.py
|
||||
|
||||
## 命令行版本操作说明
|
||||
命令行版本的指令格式为:
|
||||
|
@ -7,12 +7,16 @@ import io
|
||||
import os
|
||||
import struct
|
||||
import time
|
||||
import base64
|
||||
from PyQt5.QtWidgets import QPushButton,QApplication,QLineEdit,QWidget,QTextEdit,QVBoxLayout,QHBoxLayout,QComboBox,QFileDialog,QProgressBar
|
||||
from PyQt5.QtCore import Qt,QThread,pyqtSignal
|
||||
from PyQt5.QtGui import QIcon
|
||||
from Telink_Tools import get_port_list,tl_open_port,connect_chip,change_baud,telink_flash_write,telink_flash_erase
|
||||
|
||||
__version__ = "V1.0"
|
||||
|
||||
from aithinker_png import aithinker_png as logo
|
||||
|
||||
__version__ = "V1.2"
|
||||
|
||||
class TelinkThread(QThread):
|
||||
pressbarSignal = pyqtSignal(int)
|
||||
@ -135,6 +139,12 @@ class TB_Tools(QWidget):
|
||||
super().__init__(parent)
|
||||
|
||||
self.setWindowTitle("安信可TB模块烧录工具 " + __version__)
|
||||
|
||||
if not os.path.exists('aithinker.png'):
|
||||
tmp = open('aithinker.png', 'wb+')
|
||||
tmp.write(base64.b64decode(logo))
|
||||
tmp.close()
|
||||
|
||||
self.setWindowIcon(QIcon("aithinker.png"))
|
||||
#self.setWindowFlags(Qt.FramelessWindowHint)
|
||||
self.resize(500,300)
|
||||
@ -189,19 +199,25 @@ class TB_Tools(QWidget):
|
||||
self.tbox_ali_pID = QLineEdit()
|
||||
self.tbox_ali_Mac = QLineEdit()
|
||||
self.tbox_ali_Sct = QLineEdit()
|
||||
|
||||
self.tbox_ali_pID.setPlaceholderText("Product ID")
|
||||
self.tbox_ali_Mac.setPlaceholderText("MAC地址")
|
||||
self.tbox_ali_Sct.setPlaceholderText("Device Secret")
|
||||
|
||||
|
||||
btn_burn_triad=QPushButton("烧录三元组")
|
||||
btn_burn_triad.clicked.connect(self.burn_triad_fn)
|
||||
|
||||
line_3.addWidget(self.tbox_ali_pID)
|
||||
line_3.addWidget(self.tbox_ali_Mac)
|
||||
line_3.addWidget(self.tbox_ali_Sct)
|
||||
line_3.addWidget(self.tbox_ali_Mac)
|
||||
line_3.addWidget(btn_burn_triad)
|
||||
|
||||
line_3.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
line_3.setStretch(0, 1)
|
||||
line_3.setStretch(1, 2)
|
||||
line_3.setStretch(2, 5)
|
||||
line_3.setStretch(0, 2)
|
||||
line_3.setStretch(1, 5)
|
||||
line_3.setStretch(2, 2)
|
||||
line_3.setStretch(3, 1)
|
||||
|
||||
|
||||
|
@ -317,7 +317,8 @@ def main(custom_commandline=None):
|
||||
print("Open " + args.port + " ... ... ", end="")
|
||||
|
||||
try:
|
||||
_port = tl_open_port(args.port)
|
||||
_port = serial.serial_for_url(args.port)
|
||||
_port.baudrate = 115200
|
||||
except Exception:
|
||||
print("\033[3;31mFail!\033[0m")
|
||||
return
|
||||
|
1
aithinker_png.py
Normal file
1
aithinker_png.py
Normal file
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user