MCU
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations
SharedDataTypes.h File Reference
#include <stdint.h>
#include "Utility.h"
#include "SysClock.h"
#include "SharedFirmwareTypes.h"
#include "DrivebrainData.h"
Include dependency graph for SharedDataTypes.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PedalsSystemData_s
 
struct  DrivetrainDynamicReport_s
 
struct  DrivetrainCommand_s
 Stores setpoints for a command to the Drivetrain, containing speed and torque setpoints for each motor. These setpoints are defined in the torque controllers cycled by the TC Muxer. The Speeds unit is rpm and are the targeted speeds for each wheel of the car. The torques unit is nm and is the max torque requested from the inverter to reach such speeds. One can use the arrays with FR(Front Left), FL(Front Left), RL(Rear Left), RR(Rear Right) to access or modify the respective set points. eg. speeds_rpm[FR] = 0.0; Their indexes are defined in utility.h as follows: FL = 0, FR = 1, RL = 2, RR = 3. More...
 
struct  TorqueControllerOutput_s
 Packages drivetrain command with ready boolean to give feedback on controller successfully evaluating. More...
 
struct  VectornavData_s
 
struct  TorqueControllerMuxStatus
 packages TC Mux indicators: errors, mode, torque limit, bypass More...
 
struct  LoadCellInterfaceOutput_s
 
struct  LoadCellInterfaceRawOutput_s
 
struct  SteeringSystemData_s
 
struct  SharedCarState_s
 car state struct that contains state of everything about the car including More...
 

Typedefs

using speed_rpm = float
 
using torque_nm = float
 

Enumerations

enum class  TorqueLimit_e { TCMUX_FULL_TORQUE = 0 , TCMUX_MID_TORQUE = 1 , TCMUX_LOW_TORQUE = 2 , TCMUX_NUM_TORQUE_LIMITS = 3 }
 Defines modes of torque limit to be processed in torque limit map for exact values. More...
 
enum class  ControllerMode_e {
  MODE_0 , MODE_1 , MODE_2 , MODE_3 ,
  MODE_4 , MODE_5
}
 
enum class  TorqueControllerMuxError {
  NO_ERROR = 0 , ERROR_SPEED_DIFF_TOO_HIGH = 1 , ERROR_TORQUE_DIFF_TOO_HIGH = 2 , ERROR_CONTROLLER_INDEX_OUT_OF_BOUNDS =3 ,
  ERROR_CONTROLLER_NULL_POINTER =4
}
 Defines errors for TC Mux to use to maintain system safety. More...
 
enum class  SteeringSystemStatus_e { STEERING_SYSTEM_NOMINAL = 0 , STEERING_SYSTEM_MARGINAL = 1 , STEERING_SYSTEM_DEGRADED = 2 , STEERING_SYSTEM_ERROR = 3 }
 

Typedef Documentation

◆ speed_rpm

using speed_rpm = float

Definition at line 9 of file SharedDataTypes.h.

◆ torque_nm

using torque_nm = float

Definition at line 10 of file SharedDataTypes.h.

Enumeration Type Documentation

◆ ControllerMode_e

enum class ControllerMode_e
strong
Enumerator
MODE_0 
MODE_1 
MODE_2 
MODE_3 
MODE_4 
MODE_5 

Definition at line 22 of file SharedDataTypes.h.

23{
24 /* No torque vectoring */
25 MODE_0,
26 /* Normal force torque vectoring */
27 MODE_1,
28 /* PID torque vectoring */
29 MODE_2,
30 /* Launch Ctrl */
31 MODE_3,
32 MODE_4,
33 MODE_5,
34};

◆ SteeringSystemStatus_e

enum class SteeringSystemStatus_e
strong
Enumerator
STEERING_SYSTEM_NOMINAL 
STEERING_SYSTEM_MARGINAL 
STEERING_SYSTEM_DEGRADED 
STEERING_SYSTEM_ERROR 

Definition at line 129 of file SharedDataTypes.h.

◆ TorqueControllerMuxError

enum class TorqueControllerMuxError
strong

Defines errors for TC Mux to use to maintain system safety.

Enumerator
NO_ERROR 
ERROR_SPEED_DIFF_TOO_HIGH 
ERROR_TORQUE_DIFF_TOO_HIGH 
ERROR_CONTROLLER_INDEX_OUT_OF_BOUNDS 
ERROR_CONTROLLER_NULL_POINTER 

Definition at line 97 of file SharedDataTypes.h.

◆ TorqueLimit_e

enum class TorqueLimit_e
strong

Defines modes of torque limit to be processed in torque limit map for exact values.

Enumerator
TCMUX_FULL_TORQUE 
TCMUX_MID_TORQUE 
TCMUX_LOW_TORQUE 
TCMUX_NUM_TORQUE_LIMITS 

Definition at line 13 of file SharedDataTypes.h.