Skip to content

Commit

Permalink
fix: Updated LapCounter, Can and Configs packages
Browse files Browse the repository at this point in the history
  • Loading branch information
guglielmo-boi committed Oct 31, 2023
1 parent 36bacad commit 45bc694
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 45 deletions.
2 changes: 1 addition & 1 deletion proto/app/user_data.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ message UserData
{
string username = 1;
string token = 2;
string refresh_token = 3;
string refreshToken = 3;
double expiry = 4;
uint64 role = 5;
}
19 changes: 0 additions & 19 deletions proto/can/can_frequencies.proto

This file was deleted.

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

package Can;

message CanMessage
{
uint64 id = 1;
string name = 2;
uint64 data = 3;
uint64 timestamp = 4;
uint64 frequency = 5;
}

message CanNetwork
{
string name = 1;
repeated CanMessage canMessages = 2;
}

message CanNetworks
{
uint64 timestamp = 1;
repeated CanNetwork networks = 2;
}
15 changes: 4 additions & 11 deletions proto/configs/car_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,15 @@ message Damper
double preload = 3;
}

message Driver
{
string name = 1;
double weight = 2;
}

message CarConfig
{
Aero aero = 1;
Wheel wheelFront = 2;
Wheel wheelRear = 3;
Damper damperFront = 4;
Damper damperRear = 5;
Driver driver = 6;
string wheelCompound = 7;
double rideHeight = 8;
string balancing = 9;
string notes = 10;
string wheelCompound = 6;
double rideHeight = 7;
string balancing = 8;
string notes = 9;
}
8 changes: 4 additions & 4 deletions proto/configs/session_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ message Weather

message SessionConfig
{
string circuit = 1;
string driver = 2;
string race = 3;
string test = 4;
string circuitId = 1;
string raceId = 2;
string test = 3;
string driverId = 4;
string date = 5;
string time = 6;
Weather weather = 7;
Expand Down
13 changes: 9 additions & 4 deletions proto/lapcounter/circuit.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ message Vector
double y = 2;
}

message Line
{
Vector position = 1;
Vector direction = 2;
}

message Circuit
{
Vector startPosition = 1;
Vector startDirection = 2;
repeated Vector sectorsPositions = 3;
repeated Vector sectorsDirections = 4;
string circuitId = 1;
repeated Line checksLines = 2;
repeated Line sectorsLines = 3;
}
14 changes: 8 additions & 6 deletions proto/lapcounter/race.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@ package LapCounter;

message Lap
{
uint64 timestamp = 1;
int32 number = 2;
double time = 3;
repeated double sectorTimes = 4;
int32 number = 1;
uint64 startTimestamp = 2;
uint64 endTimestamp = 3;
repeated uint64 sectorsTimestamps = 4;
}

message Race
{
Lap bestLap = 1;
repeated Lap laps = 2;
string raceId = 1;
string circuitId = 2;
string driverId = 3;
repeated Lap laps = 4;
}

0 comments on commit 45bc694

Please sign in to comment.