mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-25 13:56:59 +02:00
* V0.4.15
* reduced debug messages * fixes after merge
This commit is contained in:
parent
44b31f765c
commit
2d37b2657d
7 changed files with 43 additions and 44 deletions
|
@ -141,7 +141,7 @@ class HmRadio {
|
|||
}
|
||||
|
||||
void handleIntr(void) {
|
||||
DPRINTLN(F("hmRadio.h:handleIntr"));
|
||||
//DPRINTLN(F("hmRadio.h:handleIntr"));
|
||||
mIrqRcvd = true;
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ class HmRadio {
|
|||
}*/
|
||||
|
||||
void sendTimePacket(uint64_t invId, uint32_t ts) {
|
||||
DPRINTLN(F("hmRadio.h:sendTimePacket"));
|
||||
//DPRINTLN(F("hmRadio.h:sendTimePacket"));
|
||||
sendCmdPacket(invId, 0x15, 0x80, false);
|
||||
mTxBuf[10] = 0x0b; // cid
|
||||
mTxBuf[11] = 0x00;
|
||||
|
@ -176,7 +176,7 @@ class HmRadio {
|
|||
}
|
||||
|
||||
void sendCmdPacket(uint64_t invId, uint8_t mid, uint8_t pid, bool calcCrc = true) {
|
||||
DPRINTLN(F("hmRadio.h:sendCmdPacket"));
|
||||
//DPRINTLN(F("hmRadio.h:sendCmdPacket"));
|
||||
memset(mTxBuf, 0, MAX_RF_PAYLOAD_SIZE);
|
||||
mTxBuf[0] = mid; // message id
|
||||
CP_U32_BigEndian(&mTxBuf[1], (invId >> 8));
|
||||
|
@ -189,7 +189,7 @@ class HmRadio {
|
|||
}
|
||||
|
||||
bool checkPaketCrc(uint8_t buf[], uint8_t *len, uint8_t rxCh) {
|
||||
DPRINTLN(F("hmRadio.h:checkPaketCrc"));
|
||||
//DPRINTLN(F("hmRadio.h:checkPaketCrc"));
|
||||
*len = (buf[0] >> 2);
|
||||
if(*len > (MAX_RF_PAYLOAD_SIZE - 2))
|
||||
*len = MAX_RF_PAYLOAD_SIZE - 2;
|
||||
|
@ -203,7 +203,7 @@ class HmRadio {
|
|||
return valid;
|
||||
}
|
||||
|
||||
bool switchRxCh(uint8_t addLoop = 0) {
|
||||
bool switchRxCh(uint16_t addLoop = 0) {
|
||||
//DPRINTLN(F("hmRadio.h:switchRxCh"));
|
||||
//DPRINT(F("R"));
|
||||
|
||||
|
@ -231,7 +231,7 @@ class HmRadio {
|
|||
}
|
||||
|
||||
bool isChipConnected(void) {
|
||||
DPRINTLN(F("hmRadio.h:isChipConnected"));
|
||||
//DPRINTLN(F("hmRadio.h:isChipConnected"));
|
||||
return mNrf24.isChipConnected();
|
||||
}
|
||||
|
||||
|
@ -246,7 +246,7 @@ class HmRadio {
|
|||
|
||||
private:
|
||||
void sendPacket(uint64_t invId, uint8_t buf[], uint8_t len, bool clear=false) {
|
||||
DPRINTLN(F("hmRadio.h:sendPacket"));
|
||||
//DPRINTLN(F("hmRadio.h:sendPacket"));
|
||||
//DPRINTLN("sent packet: #" + String(mSendCnt));
|
||||
//dumpBuf("SEN ", buf, len);
|
||||
if(mSerialDebug) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue