#include <SteeringSystem.h>
|
| | SteeringSystem (SteeringEncoderInterface *primarySensor, TelemetryInterface *telemInterface) |
| |
| | SteeringSystem (SteeringEncoderInterface *primarySensor, TelemetryInterface *telemInterface, float filterAlpha) |
| |
| | SteeringSystem (SteeringEncoderInterface *primarySensor, TelemetryInterface *telemInterface, float filterAlphaPrimary, float filterAlphaSecondary) |
| |
| void | tick (const SteeringSystemTick_s &intake) |
| | Computes steering angle and status of the steering system. More...
|
| |
| const SteeringSystemData_s & | getSteeringSystemData () |
| | Get a reference to the steering system's data. More...
|
| |
| void | reportSteeringStatus (const float angle, const float filteredAngleEncoder, const float filteredAngleAnalog, const uint8_t systemStatus, const uint8_t encoderStatus, const uint8_t analogSensorStatus) |
| |
Definition at line 30 of file SteeringSystem.h.
◆ SteeringSystem() [1/3]
◆ SteeringSystem() [2/3]
◆ SteeringSystem() [3/3]
Definition at line 56 of file SteeringSystem.h.
59 {
62
63 }
SteeringEncoderInterface * primarySensor_
TelemetryInterface * telemHandle_
Filter_IIR< float > steeringFilters_[NUM_SENSORS]
◆ getSteeringSystemData()
◆ reportSteeringStatus()
| void SteeringSystem::reportSteeringStatus |
( |
const float |
angle, |
|
|
const float |
filteredAngleEncoder, |
|
|
const float |
filteredAngleAnalog, |
|
|
const uint8_t |
systemStatus, |
|
|
const uint8_t |
encoderStatus, |
|
|
const uint8_t |
analogSensorStatus |
|
) |
| |
Definition at line 32 of file SteeringSystem.cpp.
38{
40 angle,
41 filteredAngleEncoder,
42 filteredAngleAnalog,
43 systemStatus,
44 encoderStatus,
45 analogSensorStatus);
46}
void update_steering_status_CAN_msg(const float steering_system_angle, const float filtered_angle_encoder, const float filtered_angle_analog, const uint8_t steering_system_status, const uint8_t steering_encoder_status, const uint8_t steering_analog_status)
◆ tick()
Computes steering angle and status of the steering system.
- Parameters
-
| secondaryAngle | The computed steering angle as reported by the secondary steering sensor. |
- Returns
- SteeringSystemOutput_s contains steering angle and SteeringSystemStatus_e
Definition at line 4 of file SteeringSystem.cpp.
5{
6
7
8
9 if (intake.
tick.triggers.trigger100)
10 {
16 .status = SteeringSystemStatus_e::STEERING_SYSTEM_DEGRADED};
17 }
18
19
20 if (intake.
tick.triggers.trigger50)
21 {
24 0,
29 }
30}
dataType filtered_result(dataType new_val)
void reportSteeringStatus(const float angle, const float filteredAngleEncoder, const float filteredAngleAnalog, const uint8_t systemStatus, const uint8_t encoderStatus, const uint8_t analogSensorStatus)
SteeringEncoderConversion_s primaryConversion_
float filteredAngleSecondary_
SteeringEncoderStatus_e status
SteeringSystemStatus_e status
const AnalogConversion_s & secondaryConversion
◆ filteredAnglePrimary_
| float SteeringSystem::filteredAnglePrimary_ |
|
private |
◆ filteredAngleSecondary_
| float SteeringSystem::filteredAngleSecondary_ |
|
private |
◆ primaryConversion_
◆ primarySensor_
◆ steeringData_
◆ steeringFilters_
Utility digital IIR filters 0 : primary sensor filter 1 : secondary sensor filter
Definition at line 42 of file SteeringSystem.h.
◆ telemHandle_
The documentation for this class was generated from the following files: