Red Bird Racing VCU v2
 
Loading...
Searching...
No Matches
TelemetryFrameMotor Struct Reference

Telemetry frame structure for motor signals. More...

#include <CarState.hpp>

Collaboration diagram for TelemetryFrameMotor:

Public Member Functions

constexpr can_frame toCanFrame () const
 Converts the TelemetryFrameMotor to a CAN frame.
 

Public Attributes

int16_t torque_val
 
uint16_t motor_rpm
 
uint16_t motor_error
 
uint16_t motor_warn
 

Detailed Description

Telemetry frame structure for motor signals.

Definition at line 96 of file CarState.hpp.

Member Function Documentation

◆ toCanFrame()

constexpr can_frame TelemetryFrameMotor::toCanFrame ( ) const
inlineconstexpr

Converts the TelemetryFrameMotor to a CAN frame.

Returns
CAN frame representing the telemetry motor signals.

Definition at line 107 of file CarState.hpp.

References motor_error, motor_rpm, motor_warn, TELEMETRY_MOTOR_MSG, and torque_val.

Referenced by Telemetry::sendMotor().

Here is the caller graph for this function:

Member Data Documentation

◆ motor_error

uint16_t TelemetryFrameMotor::motor_error

Motor status byte

Definition at line 100 of file CarState.hpp.

Referenced by Pedal::readMotor(), and toCanFrame().

◆ motor_rpm

uint16_t TelemetryFrameMotor::motor_rpm

Motor RPM

Definition at line 99 of file CarState.hpp.

Referenced by Pedal::readMotor(), Pedal::sendFrame(), and toCanFrame().

◆ motor_warn

uint16_t TelemetryFrameMotor::motor_warn

Motor error/warning byte

Definition at line 101 of file CarState.hpp.

Referenced by Pedal::readMotor(), and toCanFrame().

◆ torque_val

int16_t TelemetryFrameMotor::torque_val

Torque value sent to motor controller

Definition at line 98 of file CarState.hpp.

Referenced by Pedal::sendFrame(), and toCanFrame().


The documentation for this struct was generated from the following file: