Skip to content

Commit

Permalink
Add relays.proto and update core.proto to include Relays as a Device (#…
Browse files Browse the repository at this point in the history
…26)

I created relays.proto with RelaysCommand and Data message types. I also
updated core.proto to include RELAYS as a device type.

---------

Co-authored-by: Levi Lesches <[email protected]>
  • Loading branch information
ruari-r and Levi-Lesches authored Jan 24, 2025
1 parent 386dd7e commit ae2275f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
10 changes: 5 additions & 5 deletions core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
syntax = "proto3";

// Used for a simple handshake between devices.
message Connect {
message Connect {
Device sender = 1;
Device receiver = 2;
}

// Notifies the recipient that the sender will no longer be connected.
message Disconnect {
message Disconnect {
Device sender = 1;
}

Expand All @@ -24,7 +24,7 @@ enum Device {
GRIPPER = 7;
SCIENCE = 8;
DRIVE = 9;
BASE_STATION = 10;
ANTENNA = 11;
RELAY = 10;
BASE_STATION = 11;
ANTENNA = 12;
}

32 changes: 32 additions & 0 deletions relays.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
syntax = "proto3";

import "utils.proto";

message RelaysCommand {
// Turn the following devices on or off
BoolState backLeftMotor = 1;
BoolState backRightMotor = 2;
BoolState frontLeftMotor = 3;
BoolState frontRightMotor = 4;
BoolState arm = 5;
BoolState science = 6;
BoolState drive = 7;

// Special commands
BoolState bypass = 8;
}

message RelaysData {
// Whether the following devices are on or off
BoolState backLeftMotor = 1;
BoolState backRightMotor = 2;
BoolState frontLeftMotor = 3;
BoolState frontRightMotor = 4;
BoolState arm = 5;
BoolState science = 6;
BoolState drive = 7;

// Special data
BoolState bypass = 8;
BoolState mechanicalOverride = 9;
}

0 comments on commit ae2275f

Please sign in to comment.