mirror of
https://github.com/mck1117/wideband.git
synced 2026-09-30 09:57:06 -04:00
29 lines
446 B
C++
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;
|
|
}
|