Skip to content

Commit

Permalink
0.8.64
Browse files Browse the repository at this point in the history
add ARC to timeout
  • Loading branch information
lumapu committed Jan 22, 2024
1 parent 66117e5 commit 8c2b37e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/hm/Communication.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,15 @@ class Communication : public CommQueue<> {
DPRINT_IVID(DBG_INFO, q->iv->id);
DBGPRINT(F("request timeout: "));
DBGPRINT(String(q->iv->radio->mRadioWaitTime.getRunTime()));
DBGPRINTLN(F("ms"));
DBGPRINT(F("ms"));
if(INV_RADIO_TYPE_NRF == q->iv->ivRadioType) {
DBGPRINT(F(", ARC "));
DBGPRINTLN(String(q->iv->radio->getARC()));
} else
DBGPRINTLN("");
}
if(!q->iv->mGotFragment) {
if(q->iv->ivRadioType == INV_RADIO_TYPE_CMT) {
if(INV_RADIO_TYPE_CMT == q->iv->ivRadioType) {
q->iv->radio->switchFrequency(q->iv, HOY_BOOT_FREQ_KHZ, (q->iv->config->frequency*FREQ_STEP_KHZ + HOY_BASE_FREQ_KHZ));
mWaitTime.startTimeMonitor(1000);
} else {
Expand Down
4 changes: 4 additions & 0 deletions src/hm/hmRadio.h
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ class HmRadio : public Radio {
return mNrf24->isPVariant();
}

uint8_t getARC(void) {
return mNrf24->getARC();
}

private:
inline bool getReceived(void) {
bool isLastPackage = false;
Expand Down
1 change: 1 addition & 0 deletions src/hm/radio.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class Radio {
virtual bool switchFrequencyCh(Inverter<> *iv, uint8_t fromCh, uint8_t toCh) { return true; }
virtual bool isChipConnected(void) { return false; }
virtual bool loop(void) = 0;
virtual uint8_t getARC(void) { return 0xff; }

void handleIntr(void) {
mIrqRcvd = true;
Expand Down

0 comments on commit 8c2b37e

Please sign in to comment.