Adding LEDs selftest at start-up

This commit is contained in:
Andy CA6JAU 2017-08-28 00:43:24 -03:00
parent cce2cc3cfc
commit 70e1fd4264
5 changed files with 66 additions and 1 deletions

32
IO.cpp
View file

@ -94,6 +94,38 @@ m_lockout(false)
m_boxcarFilter.pCoeffs = BOXCAR_FILTER;
initInt();
selfTest();
}
void CIO::selfTest()
{
bool ledValue = false;
uint32_t ledCount = 0;
uint32_t blinks = 0;
while(true) {
ledCount++;
delayInt(100);
if(ledCount >= 2U) {
ledCount = 0U;
ledValue = !ledValue;
setLEDInt(ledValue);
setPTTInt(ledValue);
setDStarInt(ledValue);
setDMRInt(ledValue);
setYSFInt(ledValue);
setP25Int(ledValue);
setCOSInt(ledValue);
blinks++;
if(blinks > 5)
break;
}
}
}
void CIO::start()