aboutsummaryrefslogtreecommitdiff
path: root/elegoo.proto
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2018-09-09 11:28:22 +0200
committerDimitri Sokolyuk <demon@dim13.org>2018-09-09 11:28:22 +0200
commitd2437aed7ec36d893cc13b9c04969e7dedc5f1c3 (patch)
treeb8302f2793aa2d86062d9928a8e3acd006a2eb49 /elegoo.proto
parentd7ab5c68da66458284695706f50943d155d49ceb (diff)
annotate protobuf
Diffstat (limited to 'elegoo.proto')
-rw-r--r--elegoo.proto47
1 files changed, 31 insertions, 16 deletions
diff --git a/elegoo.proto b/elegoo.proto
index 858c79e..c34fbc0 100644
--- a/elegoo.proto
+++ b/elegoo.proto
@@ -2,37 +2,52 @@ syntax = "proto3";
package elegoo;
-option go_package = "elegoo";
+// Command send to car
+message Command {
+ // Set speed
+ Speed Speed = 1;
+ // Rotate sonar head degree: -90 right .. +90 left
+ sint32 Look = 2;
+}
+// Speed command
message Speed {
- sint32 L = 1; // -255 .. + 255
- sint32 R = 2; // -255 .. + 255
- uint32 StopAfter = 3; // milliseconds
+ // Left motor speed: -255 .. +255
+ sint32 L = 1;
+ // Right motor speed: -255 .. +255
+ sint32 R = 2;
+ // Stop after milliseconds, ignored if set to 0
+ uint32 StopAfter = 3;
}
-message Command {
- Speed Speed = 1;
- sint32 Look = 2; // deg: -90 right .. +90 left
+// Event recieved from car
+message Event {
+ // TimeStamp in milliseconds
+ uint32 TimeStamp = 1;
+ // Sonar sensor head
+ Sonar Head = 2;
+ // Infrared sensors
+ Sensor Sensor = 3;
+ // Remote control
+ Remote Remote = 4;
}
+// Sonar event
message Sonar {
- uint32 Distance = 1; // cm
- sint32 Direction = 2; // deg
+ // Distance in centimeter
+ uint32 Distance = 1;
+ // Head Direction in degree
+ sint32 Direction = 2;
}
+// Infrared sensors event
message Sensor {
bool R = 1;
bool C = 2;
bool L = 3;
}
+// Remote control event
message Remote {
uint32 Key = 1;
}
-
-message Event {
- uint32 TimeStamp = 1; // milliseconds
- Sonar Head = 2;
- Sensor Sensor = 3;
- Remote Remote = 4;
-}