MCU
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
SABInterface Class Reference

#include <SABInterface.h>

Collaboration diagram for SABInterface:
Collaboration graph

Public Member Functions

 SABInterface (float rlLoadCellScale, float rlLoadCellOffset, float rrLoadCellScale, float rrLoadCellOffset, float pot3Scale, float pot3Offset, float pot4Scale, float pot4Offset)
 
 SABInterface (float rlLoadCellScale, float rlLoadCellOffset, float rrLoadCellScale, float rrLoadCellOffset)
 
void retrieve_pots_and_load_cells_CAN (CAN_message_t &recvd_msg)
 

Public Attributes

AnalogChannel rlLoadCell
 
AnalogChannel rrLoadCell
 
AnalogChannel pot3
 
AnalogChannel pot4
 

Detailed Description

Definition at line 8 of file SABInterface.h.

Constructor & Destructor Documentation

◆ SABInterface() [1/2]

SABInterface::SABInterface ( float  rlLoadCellScale,
float  rlLoadCellOffset,
float  rrLoadCellScale,
float  rrLoadCellOffset,
float  pot3Scale,
float  pot3Offset,
float  pot4Scale,
float  pot4Offset 
)
inline

Definition at line 17 of file SABInterface.h.

27 {
28 rlLoadCell.scale = rlLoadCellScale;
29 rlLoadCell.offset = rlLoadCellOffset;
30
31 rrLoadCell.scale = rrLoadCellScale;
32 rrLoadCell.offset = rrLoadCellOffset;
33
34 pot3.scale = pot3Scale;
35 pot3.offset = pot3Offset;
36
37 pot4.scale = pot4Scale;
38 pot4.offset = pot4Offset;
39 };
AnalogChannel rlLoadCell
Definition: SABInterface.h:12
AnalogChannel pot4
Definition: SABInterface.h:15
AnalogChannel pot3
Definition: SABInterface.h:14
AnalogChannel rrLoadCell
Definition: SABInterface.h:13

◆ SABInterface() [2/2]

SABInterface::SABInterface ( float  rlLoadCellScale,
float  rlLoadCellOffset,
float  rrLoadCellScale,
float  rrLoadCellOffset 
)
inline

Definition at line 41 of file SABInterface.h.

46 : SABInterface (rlLoadCellScale, rlLoadCellOffset, rrLoadCellScale, rrLoadCellOffset, 1.0, 0.0, 1.0, 0.0) {};

Member Function Documentation

◆ retrieve_pots_and_load_cells_CAN()

void SABInterface::retrieve_pots_and_load_cells_CAN ( CAN_message_t &  recvd_msg)

Definition at line 3 of file SABInterface.cpp.

4{
5 SAB_SUSPENSION_t sab_data;
6 Unpack_SAB_SUSPENSION_hytech(&sab_data, recvd_msg.buf, recvd_msg.len);
7
8 rlLoadCell.lastSample = sab_data.load_cell_rl;
9 rrLoadCell.lastSample = sab_data.load_cell_rr;
10 pot3.lastSample = sab_data.potentiometer_rl;
11 pot4.lastSample = sab_data.potentiometer_rr;
12
15 pot3.convert();
16 pot4.convert();
17}
AnalogConversion_s convert()
Calculate sensor output and whether result is in sensor's defined bounds. DOES NOT SAMPLE.

Member Data Documentation

◆ pot3

AnalogChannel SABInterface::pot3

Definition at line 14 of file SABInterface.h.

◆ pot4

AnalogChannel SABInterface::pot4

Definition at line 15 of file SABInterface.h.

◆ rlLoadCell

AnalogChannel SABInterface::rlLoadCell

Definition at line 12 of file SABInterface.h.

◆ rrLoadCell

AnalogChannel SABInterface::rrLoadCell

Definition at line 13 of file SABInterface.h.


The documentation for this class was generated from the following files: