aboutsummaryrefslogtreecommitdiff
path: root/elegoo.proto
blob: 9049893b8d6c52226034039d045482c1f4aaf620 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
syntax = "proto3";

package elegoo;

option go_package = "main";

message Speed {
	sint32 L = 1;		// -255 .. + 255
	sint32 R = 2;		// -255 .. + 255
	uint32 StopAfter = 3;	// milliseconds
}

message Command {
	Speed Speed = 1;
	sint32 Look = 2;	// deg: -90 right .. +90 left
}

message UltraSonic {
	uint32 Distance = 1;	// cm
	sint32 Direction = 2;	// deg
}

message InfraRed {
	bool R = 1;
	bool C = 2;
	bool L = 3;
}

message RemoteControl {
	uint32 Key = 1;
}

message Event {
	uint32 TimeStamp = 1;	// milliseconds
	UltraSonic Head = 2;
	InfraRed Sensor = 3;
	RemoteControl Remote = 4;
}