ahoy/tools/HoyDtuSim/Debug.h
Marcus c0140f9fc1 Neue Version von Hubi vom 28.04.2022 - siehe:
https://www.mikrocontroller.net/topic/525778?page=4#7048605

ersetzt NRF24_SendRcv

Kommentare dazu:
- Projekt jetzt umgenannt in HoyDtuSim (Hoymiles DTU Simulation)
-Läuft auf Arduino (bei mir auf Pro Mini) und ESP (Wemos D1 mini), je
nachdem wie man kompiliert
- Channel hopping für senden und Empfangen (poor man's ...) ist
eingebaut und bringt konstante Antworten; obige Erkenntnisse über Kanäle
abwärts sind noch nicht eingebaut
- da manchmal ein Abbruch der RF-Verbindung vorkam (auch schon oben
erwähnt)  wird jetzt nach ca 50 Sekunden ohne Empfang das RF-Modul neu
initialisiert und es geht problemlos weiter
- Definitionen für HM-600 und HM-1200 sind implementiert, andere können
anhand der beiden Beispiele sicher leicht impl. werden
- Anpassungen sind in der Settings.h zu machen
2022-04-28 13:25:04 +02:00

23 lines
452 B
C

#ifndef __DEBUG_H
#define __DEBUG_H
#ifdef DEBUG
#define DEBUG_OUT Serial
#else
//---
// disable Serial DEBUG output
#define DEBUG_OUT DummySerial
static class {
public:
void begin(...) {}
void print(...) {}
void println(...) {}
void flush() {}
bool available() { return false;}
int readBytes(...) { return 0;}
int printf (...) {return 0;}
} DummySerial;
#endif
#endif