Remove move and recharge commands in favor of toggle command for the sails

This commit is contained in:
Marc Di Luzio 2020-07-21 22:48:16 +01:00
parent 89123394cd
commit 6c75f07aff
8 changed files with 169 additions and 280 deletions

View file

@ -83,10 +83,6 @@ func (s *Server) Status(ctx context.Context, req *roveapi.StatusRequest) (respon
Command: i.Command,
}
switch i.Command {
case roveapi.CommandType_move:
c.Data = &roveapi.Command_Bearing{
Bearing: i.Bearing,
}
case roveapi.CommandType_broadcast:
c.Data = &roveapi.Command_Message{
Message: i.Message,
@ -99,10 +95,6 @@ func (s *Server) Status(ctx context.Context, req *roveapi.StatusRequest) (respon
Command: q.Command,
}
switch q.Command {
case roveapi.CommandType_move:
c.Data = &roveapi.Command_Bearing{
Bearing: q.Bearing,
}
case roveapi.CommandType_broadcast:
c.Data = &roveapi.Command_Message{
Message: q.Message,
@ -193,8 +185,6 @@ func (s *Server) Command(ctx context.Context, req *roveapi.CommandRequest) (*rov
Command: c.Command,
}
switch c.Command {
case roveapi.CommandType_move:
n.Bearing = c.GetBearing()
case roveapi.CommandType_broadcast:
n.Message = c.GetMessage()
}