mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-11 07:56:39 +02:00
added DEBUG_FLAGs to config.h
This commit is contained in:
parent
e05d2220cb
commit
20c145013e
7 changed files with 161 additions and 0 deletions
|
@ -24,12 +24,16 @@ class HmSystem {
|
|||
}
|
||||
|
||||
void setup() {
|
||||
#ifdef DEBUG_HMSYSTEM
|
||||
DPRINTLN(F("hmSystem.h:setup"));
|
||||
#endif
|
||||
Radio.setup(&BufCtrl);
|
||||
}
|
||||
|
||||
INVERTERTYPE *addInverter(const char *name, uint64_t serial, uint16_t chMaxPwr[]) {
|
||||
#ifdef DEBUG_HMSYSTEM
|
||||
DPRINTLN(F("hmSystem.h:addInverter"));
|
||||
#endif
|
||||
if(MAX_INVERTER <= mNumInv) {
|
||||
DPRINT(F("max number of inverters reached!"));
|
||||
return NULL;
|
||||
|
@ -66,7 +70,9 @@ class HmSystem {
|
|||
}
|
||||
|
||||
INVERTERTYPE *findInverter(uint8_t buf[]) {
|
||||
#ifdef DEBUG_HMSYSTEM
|
||||
//DPRINTLN(F("hmSystem.h:findInverter"));
|
||||
#endif
|
||||
INVERTERTYPE *p;
|
||||
for(uint8_t i = 0; i < mNumInv; i++) {
|
||||
p = &mInverter[i];
|
||||
|
@ -80,7 +86,9 @@ class HmSystem {
|
|||
}
|
||||
|
||||
INVERTERTYPE *getInverterByPos(uint8_t pos) {
|
||||
#ifdef DEBUG_HMSYSTEM
|
||||
//DPRINTLN(F("hmSystem.h:getInverterByPos"));
|
||||
#endif
|
||||
if(mInverter[pos].serial.u64 != 0ULL)
|
||||
return &mInverter[pos];
|
||||
else
|
||||
|
@ -88,7 +96,9 @@ class HmSystem {
|
|||
}
|
||||
|
||||
uint8_t getNumInverters(void) {
|
||||
#ifdef DEBUG_HMSYSTEM
|
||||
//DPRINTLN(F("hmSystem.h:getNumInverters"));
|
||||
#endif
|
||||
return mNumInv;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue