mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-11-18 12:42:15 -05:00
cleanupses
This commit is contained in:
@@ -35,7 +35,6 @@ type managementCommand struct {
|
||||
Reboot *rebootPayload `json:"reboot"`
|
||||
Category string `json:"category"`
|
||||
Profile *MediaProfile `json:"profile"`
|
||||
Media *mediaCommand `json:"media"`
|
||||
}
|
||||
|
||||
func NewManagementClient(cfg *Config, path string, events chan RoverEvent, logger *log.Logger, restart func()) *ManagementClient {
|
||||
@@ -163,12 +162,6 @@ func (m *ManagementClient) execute(ctx context.Context, command managementComman
|
||||
}
|
||||
return m.restart, nil
|
||||
}
|
||||
if command.Type == "media" {
|
||||
if m.media == nil || command.Media == nil {
|
||||
return nil, fmt.Errorf("media supervisor unavailable")
|
||||
}
|
||||
return nil, m.media.HandleAction(ctx, command.Media.Action)
|
||||
}
|
||||
var config *Config
|
||||
var err error
|
||||
switch command.Type {
|
||||
|
||||
Reference in New Issue
Block a user