mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-02 18:51:38 +02:00
0.8.64
add ARC to timeout
This commit is contained in:
parent
66117e545b
commit
8c2b37ed9e
3 changed files with 12 additions and 2 deletions
|
@ -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 {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue