Yeah, I kinda gave up, i will fix it later or something I recon

This commit is contained in:
2026-02-09 23:23:45 +00:00
parent 2952ec7085
commit 97caeafd58
16 changed files with 464 additions and 103 deletions
+10 -5
View File
@@ -18,9 +18,10 @@ var DeviceMap = map[int]Device{
}
type Device struct {
ID uint8
Name [32]byte
API map[string]DeviceCMD
ID uint8
Name [32]byte
API map[string]DeviceCMD
State any
}
func (dev *Device) HasFunction(f string) *DeviceCMD {
@@ -52,8 +53,6 @@ type DeviceCMD struct {
Identifier types.Command
Name string
Desc string
Header DeviceCMDHeader
Data DeviceCMDPayload
ArgCheck ArgCheckFn
Fn DeviceCMDFn
}
@@ -80,3 +79,9 @@ func (dCMD *DeviceCMD) GetName() string {
func (dCMD *DeviceCMD) GetDesc() string {
return dCMD.Desc
}
type DeviceInstance[T any] struct {
Def *Device
ID uint8
State T
}