Browse Source

Move some fix texts to debug.h

Add 
* DBGPRINT_TXT
* DBGPRINTLN_TXT
pull/778/head
rejoe2 2 years ago
committed by GitHub
parent
commit
a2f4807f5a
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 32
      src/utils/dbg.h

32
src/utils/dbg.h

@ -159,6 +159,38 @@
default: PVERBLN(str); break; \
}\
})
// available text variables
#define TXT_NOPYLD 1
#define TXT_INVSERNO 2
#define TXT_GDEVINF 3
#define TXT_DEVCTRL 4
#define TXT_INCRALM 5
#define DBGPRINT_TXT(text) ({\
switch(text) {\
case TXT_NOPYLD: DBGPRINT(F("no Payload received! (retransmits: ")); break; \
case TXT_INVSERNO: DBGPRINT(F("Requesting Inv SN ")); break; \
case TXT_GDEVINF: DBGPRINT(F("prepareDevInformCmd 0x")); break; \
case TXT_DEVCTRL: DBGPRINT(F("Devcontrol request 0x")); break; \
case TXT_INCRALM: DBGPRINT(F("alarm ID incremented to ")); break; \
default: ; break; \
}\
})
// available text variables w. lf
#define TXT_TIMEOUT 1
#define TXT_NOPYLD2 2
#define DBGPRINTLN_TXT(text) ({\
switch(text) {\
case TXT_TIMEOUT: DBGPRINT(F("enqueued cmd failed/timeout\r\n")); break; \
case TXT_NOPYLD2: DBGPRINT(F("nothing received\r\n")); break; \
default: ; break; \
}\
})
/*class ahoyLog {
public:
ahoyLog() {}

Loading…
Cancel
Save