Convert number to repeat to avoid confusion

This commit is contained in:
Marc Di Luzio 2020-07-26 18:02:06 +01:00
parent c0d4a809c9
commit 74e1cd4564
6 changed files with 25 additions and 30 deletions

View file

@ -641,8 +641,8 @@ type Command struct {
// The command type
Command CommandType `protobuf:"varint,1,opt,name=command,proto3,enum=roveapi.CommandType" json:"command,omitempty"`
// The number of times to execute the command (assumes 1 if not present or 0)
Number int32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"`
// The number of times to repeat the command after the first
Repeat int32 `protobuf:"varint,2,opt,name=repeat,proto3" json:"repeat,omitempty"`
// broadcast - a simple message, must be composed of up to 3 printable ASCII
// glyphs (32-126)
Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
@ -689,9 +689,9 @@ func (x *Command) GetCommand() CommandType {
return CommandType_none
}
func (x *Command) GetNumber() int32 {
func (x *Command) GetRepeat() int32 {
if x != nil {
return x.Number
return x.Repeat
}
return 0
}
@ -1427,8 +1427,8 @@ var file_roveapi_roveapi_proto_rawDesc = []byte{
0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x2e, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64,
0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69,
0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x63, 0x6f,
0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18,
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, 0x0a,
0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x18,
0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x06, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x12, 0x12, 0x0a,
0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74,
0x61, 0x12, 0x2a, 0x0a, 0x07, 0x62, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x04, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x10, 0x2e, 0x72, 0x6f, 0x76, 0x65, 0x61, 0x70, 0x69, 0x2e, 0x42, 0x65, 0x61,

View file

@ -126,8 +126,8 @@ message Command {
// The command type
CommandType command = 1;
// The number of times to execute the command (assumes 1 if not present or 0)
int32 number = 2;
// The number of times to repeat the command after the first
int32 repeat = 2;
// broadcast - a simple message, must be composed of up to 3 printable ASCII
// glyphs (32-126)