not{A,B,C,D} -- to be tested
This commit is contained in:
parent
3cd74c6eeb
commit
d91ab82014
|
@ -312,34 +312,35 @@ void loop()
|
|||
digitalWrite(39, (((statevalue >> 7) & B00000111) == 2) and (trafficvalue & 0x8000)); //green left arrow for fita finals
|
||||
*/
|
||||
|
||||
// Set not{A,B,C,D,(E,F)}
|
||||
/*if (cfg.abcd != 6)
|
||||
{
|
||||
uint8_t notABCD_on = 0;
|
||||
// not A is on if archer group A is not selected
|
||||
digitalWrite(notA_PIN, cfg.GroupsNumber > 1 && !(ReceivedCommand.t.ArcherGroups & _BV(0)));
|
||||
// Set not{A,B,C,D,(E,F)}; EF not implemented in this hardware
|
||||
// Note: GOLEM panel does not have not{A,B,C,D}
|
||||
#ifndef GOLEM_PANEL
|
||||
if (cfg.abcd != 6) {
|
||||
// not A is on if archer group A is not selected
|
||||
digitalWrite(notA_PIN, cfg.GroupsNumber > 1 && !(ReceivedCommand.t.ArcherGroups & _BV(0)));
|
||||
|
||||
// not B ~ not D are on if groups are effectively present and are not selected
|
||||
if (cfg.competition != 2 && cfg.competition != 4)
|
||||
{
|
||||
digitalWrite(notB_PIN, cfg.GroupsNumber > 1 && !(ReceivedCommand.t.ArcherGroups & _BV(1)));
|
||||
digitalWrite(notC_PIN, cfg.GroupsNumber > 2 && !(ReceivedCommand.t.ArcherGroups & _BV(2)));
|
||||
digitalWrite(notD_PIN, cfg.GroupsNumber > 3 && !(ReceivedCommand.t.ArcherGroups & _BV(3)));
|
||||
}
|
||||
else
|
||||
{
|
||||
digitalWrite(notB_PIN, LOW);
|
||||
digitalWrite(notC_PIN, LOW);
|
||||
digitalWrite(notD_PIN, LOW);
|
||||
}
|
||||
// not B ~ not D are on if groups are effectively present and are not selected
|
||||
if (cfg.competition != 2 && cfg.competition != 4)
|
||||
{
|
||||
digitalWrite(notB_PIN, cfg.GroupsNumber > 1 && !(ReceivedCommand.t.ArcherGroups & _BV(1)));
|
||||
digitalWrite(notC_PIN, cfg.GroupsNumber > 2 && !(ReceivedCommand.t.ArcherGroups & _BV(2)));
|
||||
digitalWrite(notD_PIN, cfg.GroupsNumber > 3 && !(ReceivedCommand.t.ArcherGroups & _BV(3)));
|
||||
}
|
||||
else
|
||||
{
|
||||
digitalWrite(notA_PIN, HIGH);
|
||||
digitalWrite(notB_PIN, HIGH);
|
||||
digitalWrite(notC_PIN, HIGH);
|
||||
digitalWrite(notD_PIN, HIGH);
|
||||
}*/
|
||||
digitalWrite(notB_PIN, LOW);
|
||||
digitalWrite(notC_PIN, LOW);
|
||||
digitalWrite(notD_PIN, LOW);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
digitalWrite(notA_PIN, HIGH);
|
||||
digitalWrite(notB_PIN, HIGH);
|
||||
digitalWrite(notC_PIN, HIGH);
|
||||
digitalWrite(notD_PIN, HIGH);
|
||||
}
|
||||
}
|
||||
// Parsing of STATE command
|
||||
else if (ReceivedCommand.s.cmd == 0b1111)
|
||||
|
|
Loading…
Reference in New Issue