Bugs-evident cleanup: cable-measure failure is fatal with its reason (failed/fail pretend-path and dead relinked plumbing deleted), bcm.command refuses partial SETs (0 or 5 params, stale-DATA trap made structural), BOOT gains a patched-ixgbe check naming stock-driver boots, panel fault rows matched by label and console rows strict on column count, phy.go split into sff/bcm/rollball and main.go's direction machinery into direction.go (pure moves), input events decoded via encoding/binary, gofmt; verified on hardware (20.00G, zero errors, ECD 41m)
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@@ -127,9 +128,9 @@ func watchTouch(w, h int) (*touchState, error) {
|
||||
panic(fmt.Sprintf("reading touchscreen events: %v", err))
|
||||
}
|
||||
for o := 0; o+sizeofInputEvent <= n; o += sizeofInputEvent {
|
||||
typ := *(*uint16)(unsafe.Pointer(&buf[o+16]))
|
||||
code := *(*uint16)(unsafe.Pointer(&buf[o+18]))
|
||||
val := *(*int32)(unsafe.Pointer(&buf[o+20]))
|
||||
typ := binary.NativeEndian.Uint16(buf[o+16:])
|
||||
code := binary.NativeEndian.Uint16(buf[o+18:])
|
||||
val := int32(binary.NativeEndian.Uint32(buf[o+20:]))
|
||||
switch typ {
|
||||
case evAbs:
|
||||
switch code {
|
||||
|
||||
Reference in New Issue
Block a user