aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--elegoo.pb.go30
-rw-r--r--elegoo.proto2
-rw-r--r--elegoo/elegoo.pb.c30
-rw-r--r--elegoo/elegoo.pb.h58
4 files changed, 61 insertions, 59 deletions
diff --git a/elegoo.pb.go b/elegoo.pb.go
index 3a367e0..fe63354 100644
--- a/elegoo.pb.go
+++ b/elegoo.pb.go
@@ -141,27 +141,27 @@ func (m *Events) GetTime() uint32 {
}
func init() {
- proto.RegisterType((*Command)(nil), "Command")
- proto.RegisterType((*Events)(nil), "Events")
+ proto.RegisterType((*Command)(nil), "elegoo.Command")
+ proto.RegisterType((*Events)(nil), "elegoo.Events")
}
func init() { proto.RegisterFile("elegoo.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
- // 234 bytes of a gzipped FileDescriptorProto
+ // 236 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xb1, 0x4e, 0xc3, 0x30,
0x10, 0x86, 0x65, 0x08, 0x4e, 0x39, 0xd1, 0x01, 0x0f, 0xe8, 0x84, 0x18, 0xa2, 0x4e, 0x99, 0x58,
0x78, 0x02, 0x48, 0x99, 0xc8, 0x80, 0x1c, 0x26, 0xb6, 0xd0, 0x1e, 0xc8, 0x12, 0xf1, 0x45, 0xb6,
- 0x85, 0xc4, 0x23, 0xf0, 0x56, 0x3c, 0x1a, 0xb2, 0xd3, 0x3a, 0x61, 0xbb, 0xff, 0xff, 0x2c, 0xdd,
- 0xe7, 0x83, 0x0b, 0xfa, 0xa4, 0x0f, 0xe6, 0xdb, 0xd1, 0x71, 0xe0, 0xcd, 0x8f, 0x80, 0xb2, 0xe1,
- 0x61, 0xe8, 0xed, 0x5e, 0x5d, 0x81, 0xec, 0x46, 0xa2, 0xbd, 0x46, 0x51, 0x89, 0xfa, 0x52, 0x1f,
- 0x52, 0xee, 0x5b, 0x3c, 0x59, 0xf4,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, 0xf5, 0x21, 0xe5, 0xbe, 0xc5, 0x93, 0x45, 0xdf, 0x2a, 0x05, 0x45, 0x17, 0x78, 0xc4, 0xd3,
+ 0x4a, 0xd4, 0x2b, 0x1d, 0x67, 0x75, 0x03, 0xe7, 0x5b, 0xe3, 0x68, 0x17, 0x0c, 0x5b, 0x2c, 0x2a,
+ 0x51, 0xaf, 0xf5, 0x5c, 0x4c, 0x74, 0x7a, 0x75, 0xff, 0x1e, 0xc8, 0xe1, 0x59, 0xa2, 0xb9, 0xd8,
+ 0xfc, 0x0a, 0x90, 0x8f, 0x5f, 0x64, 0x83, 0x57, 0xd7, 0xb0, 0xda, 0x1a, 0x1f, 0x7a, 0xbb, 0xa3,
+ 0x28, 0xb3, 0xd6, 0x39, 0xff, 0x5f, 0x91, 0x8c, 0x16, 0x2b, 0x10, 0xca, 0x8e, 0xac, 0x67, 0xa7,
+ 0x0f, 0x5e, 0xc7, 0x38, 0x93, 0x26, 0x8a, 0x65, 0xd2, 0xcc, 0xa4, 0x8d, 0x52, 0x99, 0xb4, 0x93,
+ 0xc7, 0x13, 0x7d, 0x3f, 0x3b, 0xf2, 0x1e, 0x65, 0xf2, 0x38, 0xe6, 0xe9, 0xfb, 0x2f, 0x66, 0x20,
+ 0x2c, 0x63, 0x1f, 0xe7, 0x07, 0xf9, 0x5a, 0x0c, 0xbd, 0xb1, 0x6f, 0x32, 0x5e, 0xf9, 0xee, 0x2f,
+ 0x00, 0x00, 0xff, 0xff, 0x84, 0x98, 0xdf, 0xe5, 0x75, 0x01, 0x00, 0x00,
}
diff --git a/elegoo.proto b/elegoo.proto
index 697b5cd..16c7c5b 100644
--- a/elegoo.proto
+++ b/elegoo.proto
@@ -1,5 +1,7 @@
syntax = "proto3";
+package elegoo;
+
option go_package = "main";
message Command {
diff --git a/elegoo/elegoo.pb.c b/elegoo/elegoo.pb.c
index 3545021..1dd40bf 100644
--- a/elegoo/elegoo.pb.c
+++ b/elegoo/elegoo.pb.c
@@ -1,5 +1,5 @@
/* Automatically generated nanopb constant definitions */
-/* Generated by nanopb-0.3.9 at Mon Dec 11 00:21:17 2017. */
+/* Generated by nanopb-0.3.9 at Mon Dec 11 01:03:09 2017. */
#include "elegoo.pb.h"
@@ -10,23 +10,23 @@
-const pb_field_t Command_fields[6] = {
- PB_FIELD( 1, SINT32 , SINGULAR, STATIC , FIRST, Command, SpeedR, SpeedR, 0),
- PB_FIELD( 2, SINT32 , SINGULAR, STATIC , OTHER, Command, SpeedL, SpeedR, 0),
- PB_FIELD( 3, BOOL , SINGULAR, STATIC , OTHER, Command, Stop, SpeedL, 0),
- PB_FIELD( 4, UINT32 , SINGULAR, STATIC , OTHER, Command, Direction, Stop, 0),
- PB_FIELD( 5, UINT32 , SINGULAR, STATIC , OTHER, Command, StopAfter, Direction, 0),
+const pb_field_t elegoo_Command_fields[6] = {
+ PB_FIELD( 1, SINT32 , SINGULAR, STATIC , FIRST, elegoo_Command, SpeedR, SpeedR, 0),
+ PB_FIELD( 2, SINT32 , SINGULAR, STATIC , OTHER, elegoo_Command, SpeedL, SpeedR, 0),
+ PB_FIELD( 3, BOOL , SINGULAR, STATIC , OTHER, elegoo_Command, Stop, SpeedL, 0),
+ PB_FIELD( 4, UINT32 , SINGULAR, STATIC , OTHER, elegoo_Command, Direction, Stop, 0),
+ PB_FIELD( 5, UINT32 , SINGULAR, STATIC , OTHER, elegoo_Command, StopAfter, Direction, 0),
PB_LAST_FIELD
};
-const pb_field_t Events_fields[8] = {
- PB_FIELD( 1, UINT32 , SINGULAR, STATIC , FIRST, Events, Distance, Distance, 0),
- PB_FIELD( 2, SINT32 , SINGULAR, STATIC , OTHER, Events, Direction, Distance, 0),
- PB_FIELD( 3, BOOL , SINGULAR, STATIC , OTHER, Events, SensorR, Direction, 0),
- PB_FIELD( 4, BOOL , SINGULAR, STATIC , OTHER, Events, SensorC, SensorR, 0),
- PB_FIELD( 5, BOOL , SINGULAR, STATIC , OTHER, Events, SensorL, SensorC, 0),
- PB_FIELD( 6, UINT32 , SINGULAR, STATIC , OTHER, Events, KeyPress, SensorL, 0),
- PB_FIELD( 7, UINT32 , SINGULAR, STATIC , OTHER, Events, Time, KeyPress, 0),
+const pb_field_t elegoo_Events_fields[8] = {
+ PB_FIELD( 1, UINT32 , SINGULAR, STATIC , FIRST, elegoo_Events, Distance, Distance, 0),
+ PB_FIELD( 2, SINT32 , SINGULAR, STATIC , OTHER, elegoo_Events, Direction, Distance, 0),
+ PB_FIELD( 3, BOOL , SINGULAR, STATIC , OTHER, elegoo_Events, SensorR, Direction, 0),
+ PB_FIELD( 4, BOOL , SINGULAR, STATIC , OTHER, elegoo_Events, SensorC, SensorR, 0),
+ PB_FIELD( 5, BOOL , SINGULAR, STATIC , OTHER, elegoo_Events, SensorL, SensorC, 0),
+ PB_FIELD( 6, UINT32 , SINGULAR, STATIC , OTHER, elegoo_Events, KeyPress, SensorL, 0),
+ PB_FIELD( 7, UINT32 , SINGULAR, STATIC , OTHER, elegoo_Events, Time, KeyPress, 0),
PB_LAST_FIELD
};
diff --git a/elegoo/elegoo.pb.h b/elegoo/elegoo.pb.h
index 05d023c..7ba34f2 100644
--- a/elegoo/elegoo.pb.h
+++ b/elegoo/elegoo.pb.h
@@ -1,8 +1,8 @@
/* Automatically generated nanopb header */
-/* Generated by nanopb-0.3.9 at Mon Dec 11 00:21:17 2017. */
+/* Generated by nanopb-0.3.9 at Mon Dec 11 01:03:09 2017. */
-#ifndef PB_ELEGOO_PB_H_INCLUDED
-#define PB_ELEGOO_PB_H_INCLUDED
+#ifndef PB_ELEGOO_ELEGOO_PB_H_INCLUDED
+#define PB_ELEGOO_ELEGOO_PB_H_INCLUDED
#include <pb.h>
/* @@protoc_insertion_point(includes) */
@@ -15,16 +15,16 @@ extern "C" {
#endif
/* Struct definitions */
-typedef struct _Command {
+typedef struct _elegoo_Command {
int32_t SpeedR;
int32_t SpeedL;
bool Stop;
uint32_t Direction;
uint32_t StopAfter;
-/* @@protoc_insertion_point(struct:Command) */
-} Command;
+/* @@protoc_insertion_point(struct:elegoo_Command) */
+} elegoo_Command;
-typedef struct _Events {
+typedef struct _elegoo_Events {
uint32_t Distance;
int32_t Direction;
bool SensorR;
@@ -32,38 +32,38 @@ typedef struct _Events {
bool SensorL;
uint32_t KeyPress;
uint32_t Time;
-/* @@protoc_insertion_point(struct:Events) */
-} Events;
+/* @@protoc_insertion_point(struct:elegoo_Events) */
+} elegoo_Events;
/* Default values for struct fields */
/* Initializer values for message structs */
-#define Command_init_default {0, 0, 0, 0, 0}
-#define Events_init_default {0, 0, 0, 0, 0, 0, 0}
-#define Command_init_zero {0, 0, 0, 0, 0}
-#define Events_init_zero {0, 0, 0, 0, 0, 0, 0}
+#define elegoo_Command_init_default {0, 0, 0, 0, 0}
+#define elegoo_Events_init_default {0, 0, 0, 0, 0, 0, 0}
+#define elegoo_Command_init_zero {0, 0, 0, 0, 0}
+#define elegoo_Events_init_zero {0, 0, 0, 0, 0, 0, 0}
/* Field tags (for use in manual encoding/decoding) */
-#define Command_SpeedR_tag 1
-#define Command_SpeedL_tag 2
-#define Command_Stop_tag 3
-#define Command_Direction_tag 4
-#define Command_StopAfter_tag 5
-#define Events_Distance_tag 1
-#define Events_Direction_tag 2
-#define Events_SensorR_tag 3
-#define Events_SensorC_tag 4
-#define Events_SensorL_tag 5
-#define Events_KeyPress_tag 6
-#define Events_Time_tag 7
+#define elegoo_Command_SpeedR_tag 1
+#define elegoo_Command_SpeedL_tag 2
+#define elegoo_Command_Stop_tag 3
+#define elegoo_Command_Direction_tag 4
+#define elegoo_Command_StopAfter_tag 5
+#define elegoo_Events_Distance_tag 1
+#define elegoo_Events_Direction_tag 2
+#define elegoo_Events_SensorR_tag 3
+#define elegoo_Events_SensorC_tag 4
+#define elegoo_Events_SensorL_tag 5
+#define elegoo_Events_KeyPress_tag 6
+#define elegoo_Events_Time_tag 7
/* Struct field encoding specification for nanopb */
-extern const pb_field_t Command_fields[6];
-extern const pb_field_t Events_fields[8];
+extern const pb_field_t elegoo_Command_fields[6];
+extern const pb_field_t elegoo_Events_fields[8];
/* Maximum encoded size of messages (where known) */
-#define Command_size 26
-#define Events_size 30
+#define elegoo_Command_size 26
+#define elegoo_Events_size 30
/* Message IDs (where set with "msgid" option) */
#ifdef PB_MSGID