This commit is contained in:
2026-01-10 03:26:17 +01:00
parent bceac40518
commit 8de9a0dd87
20 changed files with 179 additions and 1636 deletions

View File

@@ -8,8 +8,6 @@ import (
"strings"
"sync"
"time"
. "git.rouggy.com/rouggy/ShackMaster/internal/devices"
)
type Client struct {
@@ -151,18 +149,7 @@ func (c *Client) sendCommand(cmd string) error {
return fmt.Errorf("not connected")
}
<<<<<<< HEAD
_, err := c.conn.Write([]byte(cmd))
=======
// Get next command ID from global counter
cmdID := GetGlobalCommandID().GetNextID()
// Format command with ID: C<id>|<command>
fullCmd := fmt.Sprintf("C%d%s", cmdID, cmd)
// Send command
_, err := c.conn.Write([]byte(fullCmd))
>>>>>>> 4ab192418e21065c68d59777493ea03b76c061e7
if err != nil {
c.conn = nil
c.reader = nil