File BoardThermal.h
File List > Firmware > Libraries > PowerMonitor > BoardThermal.h
Go to the documentation of this file
#pragma once
#include <stdint.h>
#include <NodeStatus.h>
namespace OpenSkyhawk {
class BoardThermal : public FaultSource {
public:
BoardThermal() = default;
void sample(int16_t tempDC, bool ntcFault, bool armed);
uint8_t flags() const;
int16_t tempDC() const { return _tempDC; }
NodeFaultCode faultCode() const override;
const char* faultDetail() const override;
private:
int16_t _tempDC = NTC_TEMP_UNAVAILABLE;
bool _warn = false;
bool _crit = false;
bool _ntcFault = false;
};
} // namespace OpenSkyhawk