CTRE Phoenix C++ 5.33.1
PigeonIMU_StickyFaults.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 }
34 /**
35 * Creates fault list with specified bit field of faults
36 *
37 * @param bits bit field of faults to update with
38 */
39 PigeonIMU_StickyFaults(uint64_t bits) {
40 Update(bits);
41 }
43 Update(0); // Default everything to false
44 }
45};
46
47} // sensors
48} // phoenix
49} // ctre
namespace ctre
Definition: paramEnum.h:5
Sticky faults available to Pigeon.
Definition: PigeonIMU_StickyFaults.h:13
void Update(uint64_t bits)
Updates current fault list with specified bit field of faults.
Definition: PigeonIMU_StickyFaults.h:32
bool HasAnyFault() const
Definition: PigeonIMU_StickyFaults.h:18
PigeonIMU_StickyFaults(uint64_t bits)
Creates fault list with specified bit field of faults.
Definition: PigeonIMU_StickyFaults.h:39
uint64_t ToBitfield() const
Definition: PigeonIMU_StickyFaults.h:24
PigeonIMU_StickyFaults()
Definition: PigeonIMU_StickyFaults.h:42