Files
wideband/firmware/status.cpp
Matthew Kennedy ca50ee30f0 format IO
2026-04-10 13:35:51 -07:00

29 lines
446 B
C++

#include "wideband_config.h"
#include "status.h"
using namespace wbo;
static Status currentStatus[AFR_CHANNELS];
void SetStatus(int ch, Status fault)
{
currentStatus[ch] = fault;
}
Status GetCurrentStatus(int ch)
{
return currentStatus[ch];
}
bool HasFault()
{
bool fault = false;
for (int ch = 0; ch < AFR_CHANNELS; ch++)
{
fault |= (GetCurrentStatus(ch) >= Status::SensorDidntHeat);
}
return fault;
}