mirror of https://github.com/g4klx/MMDVM.git
Changing LEDs sequence
This commit is contained in:
parent
a244b86f36
commit
eb4cd221b2
48
IO.cpp
48
IO.cpp
|
@ -101,15 +101,8 @@ m_lockout(false)
|
||||||
void CIO::selfTest()
|
void CIO::selfTest()
|
||||||
{
|
{
|
||||||
bool ledValue = false;
|
bool ledValue = false;
|
||||||
uint32_t ledCount = 0;
|
|
||||||
uint32_t blinks = 0;
|
|
||||||
|
|
||||||
while(true) {
|
for (uint8_t i = 0; i < 6; i++) {
|
||||||
ledCount++;
|
|
||||||
delayInt(100);
|
|
||||||
|
|
||||||
if(ledCount >= 2U) {
|
|
||||||
ledCount = 0U;
|
|
||||||
ledValue = !ledValue;
|
ledValue = !ledValue;
|
||||||
|
|
||||||
// We exclude PTT to avoid trigger the transmitter
|
// We exclude PTT to avoid trigger the transmitter
|
||||||
|
@ -120,12 +113,41 @@ void CIO::selfTest()
|
||||||
setP25Int(ledValue);
|
setP25Int(ledValue);
|
||||||
setCOSInt(ledValue);
|
setCOSInt(ledValue);
|
||||||
|
|
||||||
blinks++;
|
delayInt(250);
|
||||||
|
}
|
||||||
|
|
||||||
if(blinks > 5)
|
setDStarInt(true);
|
||||||
break;
|
setDMRInt(false);
|
||||||
}
|
setYSFInt(false);
|
||||||
}
|
setP25Int(false);
|
||||||
|
|
||||||
|
delayInt(500);
|
||||||
|
|
||||||
|
setDStarInt(false);
|
||||||
|
setDMRInt(true);
|
||||||
|
setYSFInt(false);
|
||||||
|
setP25Int(false);
|
||||||
|
|
||||||
|
delayInt(500);
|
||||||
|
|
||||||
|
setDStarInt(false);
|
||||||
|
setDMRInt(false);
|
||||||
|
setYSFInt(true);
|
||||||
|
setP25Int(false);
|
||||||
|
|
||||||
|
delayInt(500);
|
||||||
|
|
||||||
|
setDStarInt(false);
|
||||||
|
setDMRInt(false);
|
||||||
|
setYSFInt(false);
|
||||||
|
setP25Int(true);
|
||||||
|
|
||||||
|
delayInt(500);
|
||||||
|
|
||||||
|
setDStarInt(false);
|
||||||
|
setDMRInt(false);
|
||||||
|
setYSFInt(false);
|
||||||
|
setP25Int(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CIO::start()
|
void CIO::start()
|
||||||
|
|
Loading…
Reference in New Issue