Skip to content

Commit

Permalink
Merge pull request #41 from pioneers/add-old-protos
Browse files Browse the repository at this point in the history
Add back old protos
  • Loading branch information
ewc340 authored Sep 24, 2020
2 parents 5ba741a + e37ea4c commit 076a5f8
Show file tree
Hide file tree
Showing 4 changed files with 89 additions and 2 deletions.
32 changes: 32 additions & 0 deletions old-protos/ansible.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
syntax = "proto3";

message DawnData {
enum StudentCodeStatus {
IDLE = 0;
TELEOP = 1;
AUTONOMOUS = 2;
ESTOP = 3;
}

enum TeamColor {
NONE = 0;
BLUE = 1;
GOLD = 2;
}

message Gamepad {
int32 index = 1; // Gamepad index, there may be up to 4
repeated double axes = 2;
repeated bool buttons = 3;
}

message Gamecode {
int32 code = 1;
}

StudentCodeStatus student_code_status = 1;
repeated Gamepad gamepads = 2;
repeated string peripheral_names = 3;
TeamColor team_color = 4;
Gamecode gamecode = 5;
}
25 changes: 25 additions & 0 deletions old-protos/notification.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
syntax = "proto3";

message Notification {
enum Type {
CONSOLE_LOGGING = 0;
STUDENT_SENT = 1;
STUDENT_RECEIVED = 2;
STUDENT_NOT_RECEIVED = 3;
SENSOR_MAPPING = 4;
TIMESTAMP_UP = 5;
TIMESTAMP_DOWN = 6;
GAMECODE_TRANSMISSION = 7;
}
message SensorMapping {
string device_uid = 1;
string device_student_name = 2;
}
Type header = 1;
string console_output = 2; // Console Output From Runtime to Dawn
repeated SensorMapping sensor_mapping = 3;
repeated double timestamps = 4;
repeated int32 gamecode_solutions = 5;
repeated int32 gamecodes = 6;
repeated int32 rfids = 7;
}
30 changes: 30 additions & 0 deletions old-protos/runtime.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
syntax = "proto3";
message RuntimeData {
enum State {
STUDENT_CRASHED = 0;
STUDENT_RUNNING = 1;
STUDENT_STOPPED = 2;
TELEOP = 3;
AUTO = 4;
ESTOP = 5;
}
message ParamValue {
string param = 1;
oneof kind {
float float_value = 2;
int32 int_value = 3;
bool bool_value = 4;
}
}
message SensorData {
reserved "value";
reserved 3;
string device_type = 1;
string device_name = 2;
string uid = 4;
uint32 int_device_type = 5;
repeated ParamValue param_value = 6;
}
State robot_state = 1;
repeated SensorData sensor_data = 2;
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
},
"betterScripts": {
"start": {
"command": "cp ../ansible-protos/*.proto ./build && electron build/main.js",
"command": "cp ./old-protos/*.proto ./build && electron build/main.js",
"env": {
"NODE_ENV": "development"
}
},
"build": {
"command": "mkdir -p ./build && cp ../ansible-protos/*.proto ./build && webpack --mode production --progress",
"command": "mkdir -p ./build && cp ../old-protos/*.proto ./build && webpack --mode production --progress",
"env": {
"NODE_ENV": "production"
}
Expand Down

0 comments on commit 076a5f8

Please sign in to comment.