Boron Canandgyro Faults

CanandgyroFaults are a series of flags sent with the Boron’s status frame that indicate if the device is experiencing an issue. This API presents faults in two formats: active and sticky faults.

Active faults are updated every time a status frame is sent, and thus if an issue is resolved it will update the fault flag accordingly. This is useful for issues that can be transient, such as undervoltage faults (which occurs during a brownout)

Sticky faults do not automatically clear when set to true. For example, if a Boron briefly undervolts, due to a brownout, but normal power is later restored, the undervoltage fault will still be set to true. Sticky faults must be cleared by the user.

Fetching Faults

//Get a Canandgyro object with CAN ID 0
Canandgyro canandgyro = new Canandgyro(0);

//Fetch this Canandgyro's active faults
Canandgyro.Faults faults = canandgyro.getActiveFaults();

//Fetch this Canandgyro's sticky faults
Canandgyro.Faults sticky = canandgyro.getStickyFaults();
//Get a Canandgyro object with CAN ID 0
Canandgyro canandgyro{0};

//Fetch this Canandgyro's active faults
CanandgyroFaults faults = canandgyro.GetActiveFaults();

//Fetch this Canandgyro's sticky faults
CanandgyroFaults sticky = canandgyro.GetStickyFaults();
How to clear sticky faults
canandgyro.clearStickyFaults();
canandgyro.ClearStickyFaults();

Types Of Faults

Power Cycle

The Power Cycle fault is set to true when the gyro powers on. By clearing sticky faults on initialization, this flag can be used to determine if the encoder has rebooted.

CAN ID Conflict

The CAN ID Conflict flag is set to true when the device detects another device with the same CAN ID. While available in the API, you should check the physical device for the LED flashing blue (which indicates a detected CAN ID conflict). Alchemist should be used to configure the different devices to avoid CAN ID conflicts.

CAN General Error

The CAN General Error flag is set to true if the encoder detects a problem with its ability to recieve CAN packets, or other issues with the CAN bus. Generally, this indicates an issue with the CAN wiring.

Out Of Temperature Range

The Out Of Temperature Range flag is set to true if the encoder detects its temperature is outside the safe operating range.

Hardware Fault

A Hardware Fault indicates the device has detected a problem during operation. For the Boron, this generally will indicate that the device is unable to communicate with the on board magnetic field sensors.

Calibrating

The Calibrating flag is set to true if the device is currently calibrating.

Angular Velocity Saturation

This fault is flagged if the rotation of the gyro exceeded the measurable rotation rate of the sensor.

Acceleration Saturation

This fault is flagged if the acceleration experienced exceeds the measurable acceleration of the sensor.