Added existing fastclock implementation.

Added DjDebug, DjConfig.
This commit is contained in:
2019-06-06 16:40:38 +02:00
parent 362e0760db
commit 93e82c535e
13 changed files with 1087 additions and 147 deletions

View File

@@ -0,0 +1,31 @@
//
// FILE: DjFastclockScanner.h
// VERSION: 1.0
// PURPOSE: Scans the broadcasts for clocks and returns the clocknames found
//
//
#include <DjFastclockScanner.h>
String FastclockScanner::knownClocks[MAX_CLOCKS];
int FastclockScanner::numberOfKnownClocks = 0;
void FastclockScanner::addClock(String clockName) {
for (int i=0; i<numberOfKnownClocks; ++i) {
if (clockName.equals(knownClocks[i])) return;
}
if (numberOfKnownClocks < MAX_CLOCKS) {
knownClocks[numberOfKnownClocks] = String(clockName);
++numberOfKnownClocks;
debug.out(F("Added new clock with name=")); debug.outln(clockName);
}
logHeap();
}
void FastclockScanner::addClock(const char * clockName) {
addClock(String(clockName));
}