mirror of
https://github.com/g4klx/MMDVM.git
synced 2026-10-23 11:05:00 +02:00
Adding LEDs selftest at start-up
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user