增加交互式配置支持

main
jixishi 2024-04-26 22:29:00 +08:00
parent 92c92e67e1
commit 8d4273df77
4 changed files with 8 additions and 1 deletions

View File

@ -13,6 +13,8 @@
* [x] Hex断帧设置 * [x] Hex断帧设置
* [x] UDP数据转发 * [x] UDP数据转发
* [x] TCP数据转发 * [x] TCP数据转发
* [x] 参数交互配置
* [x] Ctrl组合键
* [ ] 文件接收发送 * [ ] 文件接收发送
## 运行示例 ## 运行示例
@ -34,3 +36,9 @@
5. Hex发送 `./COM -p COM8 -b 115200` 5. Hex发送 `./COM -p COM8 -b 115200`
![img5.png](image/img5.png) ![img5.png](image/img5.png)
6. 交互配置 `./COM`
![img6.png](image/img6.png)
7. Ctrl组合键发送指令.ctrl `.ctrl c`
![img7.png](image/img7.png)

View File

@ -180,7 +180,6 @@ func getCliFlag() {
config.inputCode = "hex" config.inputCode = "hex"
} }
v, _ = inf.NewConfirmWithSelection( v, _ = inf.NewConfirmWithSelection(
confirm.WithDefaultYes(),
confirm.WithPrompt("启用高级配置"), confirm.WithPrompt("启用高级配置"),
).Display() ).Display()
if v { if v {

BIN
image/img6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 633 KiB

BIN
image/img7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB