From 58c9412590e5695e43c7eaff63933e1f59a310be Mon Sep 17 00:00:00 2001 From: Eduardo Silva Date: Wed, 31 Dec 2025 15:56:47 +0000 Subject: [PATCH] Added the create window packet command --- peripheral/devices/cdash_display.go | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/peripheral/devices/cdash_display.go b/peripheral/devices/cdash_display.go index fb839a6..c6f82dd 100644 --- a/peripheral/devices/cdash_display.go +++ b/peripheral/devices/cdash_display.go @@ -38,12 +38,11 @@ func createWindow(dCMD *DeviceCMD, args []string) (types.Command, []byte, error) // fmt.Printf("%s command called: %+v\n", dCMD.GetName(), args) type UIWindow struct { - StartMarker uint8 - X0 uint16 - Y0 uint16 - Width uint16 - Height uint16 - EndMarker uint8 + X0 uint16 + Y0 uint16 + Width uint16 + Height uint16 + Title [32]byte } if len(args) != 5 { @@ -69,17 +68,13 @@ func createWindow(dCMD *DeviceCMD, args []string) (types.Command, []byte, error) } data := UIWindow{ - StartMarker: 0x02, - X0: uint16(x0), - Y0: uint16(y0), - Width: uint16(width), - Height: uint16(height), - // Title: helper.B32(args[4]), - EndMarker: 0x03, + X0: uint16(x0), + Y0: uint16(y0), + Width: uint16(width), + Height: uint16(height), + Title: helper.B32(args[4]), } - // fmt.Printf("Data: %+v\n", data) - bytes, err := helper.StructToBytes(data) if err != nil { return 0, []byte{}, err