diff --git a/README.md b/README.md index 6befbb2..d8fb3cd 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ FPGA+Paj7620u2 通信:i2c #### 软件架构 go按键模拟 -4399黄金矿工游戏 +手势抖音 #### 使用说明 diff --git a/software/main.go b/software/main.go index b73450a..d434501 100644 --- a/software/main.go +++ b/software/main.go @@ -50,15 +50,21 @@ func main() { } if n > 0 { - log.Printf("读取到 %d 字节数据: %d\n", n, buffer[:n]) + // 这里可以添加处理数据的逻辑 - if buffer[0] == 0x02 { - robotgo.Click("left") - } + if buffer[0] == 0x01 { + robotgo.KeyPress("up") + } else if buffer[0] == 0x02 { + robotgo.KeyPress("down") + } else if buffer[0] == 0x10 { + robotgo.KeyPress("f") + } else { + log.Printf("读取到 %d 字节数据: %d\n", n, buffer[:n]) + } } else { // 当没有读取到数据时,可以根据需要处理或简单跳过 - // log.Println("没有新数据") + log.Println("没有新数据") } // 可以根据需要添加适当的延迟,避免无数据时CPU占用过高 diff --git a/software/rsrc_windows_386.syso b/software/rsrc_windows_386.syso index c74b230..b2ab92a 100644 Binary files a/software/rsrc_windows_386.syso and b/software/rsrc_windows_386.syso differ diff --git a/software/rsrc_windows_amd64.syso b/software/rsrc_windows_amd64.syso index 7a3850b..d6002a7 100644 Binary files a/software/rsrc_windows_amd64.syso and b/software/rsrc_windows_amd64.syso differ diff --git a/software/tiktok.exe b/software/tiktok.exe new file mode 100644 index 0000000..6956e19 Binary files /dev/null and b/software/tiktok.exe differ diff --git a/software/winres/tiktok.png b/software/winres/tiktok.png new file mode 100644 index 0000000..a053f30 Binary files /dev/null and b/software/winres/tiktok.png differ diff --git a/software/winres/winres.json b/software/winres/winres.json index 458c573..718dad1 100644 --- a/software/winres/winres.json +++ b/software/winres/winres.json @@ -2,7 +2,7 @@ "RT_GROUP_ICON": { "APP": { "0000": [ - "home-logo.png" + "tiktok.png" ] } }, @@ -40,8 +40,8 @@ }, "info": { "0409": { - "Comments": "", - "CompanyName": "", + "Comments": "gesture tiktok", + "CompanyName": "Stark", "FileDescription": "", "FileVersion": "", "InternalName": "",