CTRE Phoenix C++ 5.33.1
PigeonIMU_Faults.h
Go to the documentation of this file.
1/* Copyright (C) Cross The Road Electronics 2024 */
2#pragma once
3
4#include <cstdint>
5
6namespace ctre {
7namespace phoenix {
8namespace sensors {
9
10/**
11 * Sticky faults available to Pigeon
12 */
14
15 /**
16 * @return true if any faults are tripped
17 */
18 bool HasAnyFault() const {
19 return false;
20 }
21 /**
22 * @return Current fault list as a bit field
23 */
24 uint64_t ToBitfield() const {
25 return 0;
26 }
27 /**
28 * Updates current fault list with specified bit field of faults
29 *
30 * @param bits bit field of faults to update with
31 */
32 void Update(uint64_t bits) {
33 (void)bits;
34 }
35 /**
36 * Creates fault list with specified bit field of faults
37 *
38 * @param bits bit field of faults to update with
39 */
40 PigeonIMU_Faults(uint64_t bits) {
41 Update(bits);
42 }
44 Update(0); // Default everything to false
45 }
46};
47
48} // sensors
49} // phoenix
50} // ctre
namespace ctre
Definition: paramEnum.h:5
Sticky faults available to Pigeon.
Definition: PigeonIMU_Faults.h:13
PigeonIMU_Faults()
Definition: PigeonIMU_Faults.h:43
uint64_t ToBitfield() const
Definition: PigeonIMU_Faults.h:24
bool HasAnyFault() const
Definition: PigeonIMU_Faults.h:18
void Update(uint64_t bits)
Updates current fault list with specified bit field of faults.
Definition: PigeonIMU_Faults.h:32
PigeonIMU_Faults(uint64_t bits)
Creates fault list with specified bit field of faults.
Definition: PigeonIMU_Faults.h:40