chore: move sensor definition to sensor.go
This commit is contained in:
parent
b530d63237
commit
ce63b28e24
@ -11,18 +11,6 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// 传感器数据结构体
|
||||
type SensorData struct {
|
||||
Interface string `json:"interface"`
|
||||
Thumb int `json:"thumb"`
|
||||
Index int `json:"index"`
|
||||
Middle int `json:"middle"`
|
||||
Ring int `json:"ring"`
|
||||
Pinky int `json:"pinky"`
|
||||
PalmPosition []byte `json:"palmPosition"`
|
||||
LastUpdate time.Time `json:"lastUpdate"`
|
||||
}
|
||||
|
||||
// 手型配置结构体
|
||||
type HandConfig struct {
|
||||
HandType string `json:"handType"`
|
||||
|
@ -7,6 +7,18 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// 传感器数据结构体
|
||||
type SensorData struct {
|
||||
Interface string `json:"interface"`
|
||||
Thumb int `json:"thumb"`
|
||||
Index int `json:"index"`
|
||||
Middle int `json:"middle"`
|
||||
Ring int `json:"ring"`
|
||||
Pinky int `json:"pinky"`
|
||||
PalmPosition []byte `json:"palmPosition"`
|
||||
LastUpdate time.Time `json:"lastUpdate"`
|
||||
}
|
||||
|
||||
var (
|
||||
SensorDataMap map[string]*SensorData // 每个接口的传感器数据
|
||||
SensorMutex sync.RWMutex
|
||||
|
Loading…
x
Reference in New Issue
Block a user