Skip to content

Commit

Permalink
moving base messages into a separate proto description
Browse files Browse the repository at this point in the history
  • Loading branch information
RCMast3r committed Sep 19, 2024
1 parent 1ca5c66 commit 27c4106
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
hytech_msgs.pb.*
base_msgs.pb.*
./hytech_msgs.proto
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

`base_msgs.proto`: contains all base messages that can compose the top-level messages

`hytech_msgs.proto`: contains all messages that will show up on foxglove / be sent individually at any point.
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
nanopb_runner = pkgs.writeShellScriptBin "run-nanopb" ''
#!${pkgs.stdenv.shell}
export PATH="${pkgs.protobuf}/bin:$PATH"
${pkgs.nanopb}/bin/nanopb_generator.py -I=./proto hytech_msgs.proto
${pkgs.nanopb}/bin/nanopb_generator.py -I=./proto hytech_msgs.proto base_msgs.proto
'';
in
{
Expand Down
10 changes: 10 additions & 0 deletions proto/base_msgs.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
syntax = "proto3";
package hytech_msgs;

message veh_vec_float
{
float FL = 1;
float FR = 2;
float RL = 3;
float RR = 4;
}
10 changes: 3 additions & 7 deletions proto/hytech_msgs.proto
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
syntax = "proto3";
package hytech_msgs;

import "base_msgs.proto";

message SpeedControlOut {
float pos_torque_limit_nm = 1;
float neg_torque_limit_nm = 2;
Expand All @@ -12,13 +14,7 @@ message SpeedControlIn {
float brake_percent = 2;
}

message veh_vec_float
{
float FL = 1;
float FR = 2;
float RL = 3;
float RR = 4;
}


message MCUOutputData
{
Expand Down

0 comments on commit 27c4106

Please sign in to comment.