Compare commits

..

No commits in common. "16815a71b1972f5ee0392d4391dee8c6ee79375f" and "4c0bc7e6dbb68eb894c9e83e60ef45dd41a50ac1" have entirely different histories.

2 changed files with 9 additions and 1 deletions

View File

@ -113,7 +113,7 @@ func (u *UsbGadget) AbsMouseWheelReport(wheelY int8) error {
}
err := u.absMouseWriteHidFile([]byte{
2, // Report ID 2
2, // Report ID 2
byte(wheelY), // Wheel Y (signed)
})

View File

@ -7,6 +7,14 @@ import (
"path/filepath"
)
// Helper function to get absolute value of float64
func abs(x float64) float64 {
if x < 0 {
return -x
}
return x
}
func joinPath(basePath string, paths []string) string {
pathArr := append([]string{basePath}, paths...)
return filepath.Join(pathArr...)