different DOTS in panels

This commit is contained in:
giuliof 2019-04-25 11:40:30 +02:00
parent 53b4480f82
commit ec2265bbd1
1 changed files with 11 additions and 2 deletions

View File

@ -95,8 +95,11 @@ union ReceivedCommand_t {
digitsvalue_t d;
} ReceivedCommand;
#define DOTS_bm _BV(7)
#define DOTS_PIN 23
#ifndef GOLEM_PANEL
#define DOTS_bm _BV(7)
#else
#define DOTS_PIN 23
#endif
#define ABCD_PORT A
#define LEFTDIGIT_PORT K
@ -266,12 +269,18 @@ void loop()
CATPORT(MIDDIGIT_PORT) = segment[ReceivedCommand.d.mDigit];
CATPORT(RIGHTDIGIT_PORT) = segment[ReceivedCommand.d.rDigit];
// Turn on dot between minutes and seconds only if count is in minutes and its digit is a representable value (not dash)
#ifndef GOLEM_PANEL
CATPORT(LEFTDIGIT_PORT) = segment[ReceivedCommand.d.lDigit] | DOTS_bm;
#else
CATPORT(LEFTDIGIT_PORT) = segment[ReceivedCommand.d.lDigit];
#endif
#ifdef GOLEM_PANEL
if (ReceivedCommand.d.lDigit != CHAR_DASH && ReceivedCommand.d.minutes)
digitalWrite(DOTS_PIN, HIGH);
else
digitalWrite(DOTS_PIN, LOW);
#endif
}
}
// Parsing of TRAFFIC command