From 16ebef12d25b8174d387f6c4f7cfa97eb2b26089 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Sun, 20 Aug 2017 22:44:22 +0200 Subject: Add KeyPress --- car/elegoo/elegoo.pb.go | 31 ++++++++++++++++++++----------- car/elegoo/elegoo.proto | 1 + 2 files changed, 21 insertions(+), 11 deletions(-) (limited to 'car/elegoo') diff --git a/car/elegoo/elegoo.pb.go b/car/elegoo/elegoo.pb.go index 01de1cf..e07627e 100644 --- a/car/elegoo/elegoo.pb.go +++ b/car/elegoo/elegoo.pb.go @@ -61,10 +61,11 @@ func (m *Command) GetTurnHead() int32 { } type Event struct { - Distance int32 `protobuf:"varint,1,opt,name=Distance" json:"Distance,omitempty"` - SensorA bool `protobuf:"varint,2,opt,name=SensorA" json:"SensorA,omitempty"` - SensorB bool `protobuf:"varint,3,opt,name=SensorB" json:"SensorB,omitempty"` - SensorC bool `protobuf:"varint,4,opt,name=SensorC" json:"SensorC,omitempty"` + Distance int32 `protobuf:"varint,1,opt,name=Distance" json:"Distance,omitempty"` + SensorA bool `protobuf:"varint,2,opt,name=SensorA" json:"SensorA,omitempty"` + SensorB bool `protobuf:"varint,3,opt,name=SensorB" json:"SensorB,omitempty"` + SensorC bool `protobuf:"varint,4,opt,name=SensorC" json:"SensorC,omitempty"` + KeyPress uint32 `protobuf:"varint,5,opt,name=KeyPress" json:"KeyPress,omitempty"` } func (m *Event) Reset() { *m = Event{} } @@ -100,6 +101,13 @@ func (m *Event) GetSensorC() bool { return false } +func (m *Event) GetKeyPress() uint32 { + if m != nil { + return m.KeyPress + } + return 0 +} + func init() { proto.RegisterType((*Command)(nil), "Command") proto.RegisterType((*Event)(nil), "Event") @@ -108,16 +116,17 @@ func init() { func init() { proto.RegisterFile("elegoo.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 172 bytes of a gzipped FileDescriptorProto + // 192 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0xcd, 0x49, 0x4d, 0xcf, 0xcf, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x57, 0x4a, 0xe6, 0x62, 0x77, 0xce, 0xcf, 0xcd, 0x4d, 0xcc, 0x4b, 0x11, 0x92, 0xe1, 0xe2, 0xf4, 0x49, 0x4d, 0x2b, 0x09, 0x2e, 0x48, 0x4d, 0x4d, 0x91, 0x60, 0x54, 0x60, 0xd4, 0x60, 0x0d, 0x42, 0x08, 0x08, 0xc9, 0x71, 0x71, 0x05, 0x65, 0xa6, 0x67, 0x40, 0xa5, 0x99, 0xc0, 0xd2, 0x48, 0x22, 0x42, 0x52, 0x5c, 0x1c, 0x21, 0xa5, 0x45, 0x79, - 0x1e, 0xa9, 0x89, 0x29, 0x12, 0xcc, 0x60, 0x59, 0x38, 0x5f, 0xa9, 0x90, 0x8b, 0xd5, 0xb5, 0x2c, - 0x35, 0xaf, 0x04, 0xa4, 0xc8, 0x25, 0xb3, 0xb8, 0x24, 0x31, 0x2f, 0x39, 0x15, 0x6a, 0x03, 0x9c, - 0x2f, 0x24, 0xc1, 0xc5, 0x1e, 0x9c, 0x9a, 0x57, 0x9c, 0x5f, 0xe4, 0x08, 0x36, 0x9d, 0x23, 0x08, - 0xc6, 0x45, 0xc8, 0x38, 0x81, 0x4d, 0x86, 0xcb, 0x38, 0x21, 0x64, 0x9c, 0x25, 0x58, 0x90, 0x65, - 0x9c, 0x9d, 0xd8, 0xa2, 0x58, 0x72, 0x13, 0x33, 0xf3, 0x92, 0xd8, 0xc0, 0xde, 0x34, 0x06, 0x04, - 0x00, 0x00, 0xff, 0xff, 0xdc, 0x14, 0x3e, 0x06, 0xf6, 0x00, 0x00, 0x00, + 0x1e, 0xa9, 0x89, 0x29, 0x12, 0xcc, 0x60, 0x59, 0x38, 0x5f, 0xa9, 0x97, 0x91, 0x8b, 0xd5, 0xb5, + 0x2c, 0x35, 0xaf, 0x04, 0xa4, 0xca, 0x25, 0xb3, 0xb8, 0x24, 0x31, 0x2f, 0x39, 0x15, 0x6a, 0x05, + 0x9c, 0x2f, 0x24, 0xc1, 0xc5, 0x1e, 0x9c, 0x9a, 0x57, 0x9c, 0x5f, 0xe4, 0x08, 0x36, 0x9e, 0x23, + 0x08, 0xc6, 0x45, 0xc8, 0x38, 0x81, 0x8d, 0x86, 0xcb, 0x38, 0x21, 0x64, 0x9c, 0x25, 0x58, 0x90, + 0x65, 0x9c, 0x41, 0x36, 0x79, 0xa7, 0x56, 0x06, 0x14, 0xa5, 0x16, 0x17, 0x4b, 0xb0, 0x2a, 0x30, + 0x6a, 0xf0, 0x06, 0xc1, 0xf9, 0x4e, 0x6c, 0x51, 0x2c, 0xb9, 0x89, 0x99, 0x79, 0x49, 0x6c, 0xe0, + 0x30, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb3, 0x2f, 0x3b, 0x79, 0x13, 0x01, 0x00, 0x00, } diff --git a/car/elegoo/elegoo.proto b/car/elegoo/elegoo.proto index 703ac71..2915a11 100644 --- a/car/elegoo/elegoo.proto +++ b/car/elegoo/elegoo.proto @@ -13,4 +13,5 @@ message Event { bool SensorA = 2; bool SensorB = 3; bool SensorC = 4; + uint32 KeyPress = 5; } -- cgit v1.2.3