Add salvage command

Slight refactor to re-use command variables

	Also fixes the cmdline client turn command
This commit is contained in:
Marc Di Luzio 2020-07-23 19:01:16 +01:00
parent 41cd93e986
commit 2c1bb80779
5 changed files with 306 additions and 225 deletions
cmd/rove

View file

@ -243,8 +243,8 @@ func InnerMain(command string, args ...string) error {
}
commands = append(commands,
&roveapi.Command{
Command: roveapi.CommandType_broadcast,
Broadcast: []byte(args[i]),
Command: roveapi.CommandType_turn,
Bearing: b,
},
)
case "broadcast":
@ -256,8 +256,8 @@ func InnerMain(command string, args ...string) error {
}
commands = append(commands,
&roveapi.Command{
Command: roveapi.CommandType_broadcast,
Broadcast: []byte(args[i]),
Command: roveapi.CommandType_broadcast,
Data: []byte(args[i]),
},
)
default: