ReduxLib C++ 2025.0.0-beta2
Loading...
Searching...
No Matches
CanandgyroStatus.h
1// Copyright (c) Redux Robotics and other contributors.
2// This is open source and can be modified and shared under the 3-clause BSD license.
3
4#pragma once
5#include <units/temperature.h>
6#include "redux/sensors/canandgyro/CanandgyroFaults.h"
7
9
10/**
11 * Struct class representing a Canandgyro's status.
12*/
14 /**
15 * Constructor for CanandgyroStatus
16 * @param activeFaultsRaw raw uint8_t field
17 * @param stickyFaultsRaw raw uint8_t field
18 * @param faultsValid whether the faults fields have valid data
19 * @param temp MCU temp
20 */
21 constexpr CanandgyroStatus(uint8_t activeFaultsRaw, uint8_t stickyFaultsRaw, bool faultsValid, units::celsius_t temp): \
22 activeFaults{activeFaultsRaw, faultsValid}, stickyFaults{stickyFaultsRaw, faultsValid}, temperature{temp} {};
23 public:
24 /** Active faults. */
26 /** Sticky faults. */
28 /** Device MCU temperature (celsius). */
29 units::celsius_t temperature;
30};
31}
Definition: CanandgyroFaults.h:13
Definition: Canandgyro.h:32
Definition: CanandgyroStatus.h:13
units::celsius_t temperature
Definition: CanandgyroStatus.h:29
constexpr CanandgyroStatus(uint8_t activeFaultsRaw, uint8_t stickyFaultsRaw, bool faultsValid, units::celsius_t temp)
Definition: CanandgyroStatus.h:21
CanandgyroFaults stickyFaults
Definition: CanandgyroStatus.h:27
CanandgyroFaults activeFaults
Definition: CanandgyroStatus.h:25