syntax = "proto3"; package elegoo; option go_package = "main"; message Speed { sint32 L = 1; // -255 .. + 255 sint32 R = 2; // -255 .. + 255 } message Command { Speed Speed = 1; bool Stop = 3; uint32 Direction = 4; // deg: 0 right .. 180 left uint32 StopAfter = 5; // milliseconds } 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 { UltraSonic Head = 1; InfraRed Sensor = 2; RemoteControl Remote = 3; uint32 TimeStamp = 4; // milliseconds }