Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move MotorFaultState to EoMotionControl #94

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions eth/embobj/plus/comm-v2/icub/EoMotionControl.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,57 @@ extern "C" {

// - declaration of public user-defined types -------------------------------------------------------------------------

typedef union
{
struct
{
//B0 L
unsigned ExternalFaultAsserted :1;
unsigned UnderVoltageFailure :1;
unsigned OverVoltageFailure :1;
unsigned OverCurrentFailure :1;
//B0 H
unsigned DHESInvalidValue :1;
unsigned AS5045CSumError :1;
unsigned DHESInvalidSequence :1;
unsigned CANInvalidProtocol :1;
//B1 L
unsigned CAN_BufferOverRun :1;
unsigned SetpointExpired :1;
unsigned CAN_TXIsPasv :1;
unsigned CAN_RXIsPasv :1;
//B1 H
unsigned CAN_IsWarnTX :1;
unsigned CAN_IsWarnRX :1;
unsigned OverHeatingFailure :1;
unsigned unused :1;
//B2 L
unsigned ADCCalFailure :1;
unsigned I2TFailure :1;
unsigned EMUROMFault :1;
unsigned EMUROMCRCFault :1;
//B2 H
unsigned EncoderFault :1;
unsigned FirmwareSPITimingError :1;
unsigned AS5045CalcError :1;
unsigned FirmwarePWMFatalError :1;
//B3 L
unsigned CAN_TXWasPasv :1;
unsigned CAN_RXWasPasv :1;
unsigned CAN_RTRFlagActive :1;
unsigned CAN_WasWarn :1;
//B3 H
unsigned CAN_DLCError :1;
unsigned SiliconRevisionFault :1;
unsigned PositionLimitUpper :1;
unsigned PositionLimitLower :1;
} bits;

uint32_t bitmask;

} eOmc_motorFaultState_t;

enum {eOmc_motorFaultState_numberof = 32};

/** @typedef typedef enum eOmc_entity_t;
@brief It contains all the possible entities managed by motion control.
Expand Down