Added a wrapper function to execute the Fn of a device. Runs the ArgCheck too

This commit is contained in:
2026-01-01 18:11:05 +00:00
parent d4f89dd6f9
commit f3eaeb06c5
3 changed files with 12 additions and 11 deletions
-10
View File
@@ -56,11 +56,6 @@ func createWindow(dCMD *DeviceCMD, args []string) (types.Command, []byte, error)
Title [32]byte
}
err := dCMD.ArgCheck(args)
if err != nil {
return 0, []byte{}, err
}
x0, err := strconv.ParseInt(args[0], 10, 0)
if err != nil {
return 0, []byte{}, err
@@ -111,11 +106,6 @@ func destroyWindow(dCMD *DeviceCMD, args []string) (types.Command, []byte, error
WinID int16
}
err := dCMD.ArgCheck(args)
if err != nil {
return 0, []byte{}, err
}
id, err := strconv.ParseInt(args[0], 10, 0)
if err != nil {
return 0, []byte{}, err