mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-17 08:17:12 +02:00
parent
f940333cd4
commit
9601e900ac
5 changed files with 17 additions and 17 deletions
|
@ -1,5 +1,8 @@
|
|||
# Development Changes
|
||||
|
||||
## 0.8.60 - 2024-01-20
|
||||
* merge PR: non blocking nRF loop #1371
|
||||
|
||||
## 0.8.59 - 2024-01-18
|
||||
* merge PR: solve display settings dependencies #1369
|
||||
* fix language typos #1346
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//-------------------------------------
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 8
|
||||
#define VERSION_PATCH 59
|
||||
#define VERSION_PATCH 60
|
||||
|
||||
//-------------------------------------
|
||||
typedef struct {
|
||||
|
|
|
@ -96,7 +96,7 @@ class Communication : public CommQueue<> {
|
|||
|
||||
case States::START:
|
||||
setTs(mTimestamp);
|
||||
if(q->iv->ivRadioType == INV_RADIO_TYPE_CMT) {
|
||||
if(INV_RADIO_TYPE_CMT == q->iv->ivRadioType) {
|
||||
// frequency was changed during runtime
|
||||
if(q->iv->curCmtFreq != q->iv->config->frequency) {
|
||||
if(q->iv->radio->switchFrequencyCh(q->iv, q->iv->curCmtFreq, q->iv->config->frequency))
|
||||
|
@ -284,7 +284,7 @@ class Communication : public CommQueue<> {
|
|||
DBGPRINT(String(p->millis));
|
||||
DBGPRINT(F("ms | "));
|
||||
DBGPRINT(String(p->len));
|
||||
if(q->iv->ivRadioType == INV_RADIO_TYPE_NRF) {
|
||||
if(INV_RADIO_TYPE_NRF == q->iv->ivRadioType) {
|
||||
DBGPRINT(F(" CH"));
|
||||
if(3 == p->ch)
|
||||
DBGPRINT(F("0"));
|
||||
|
|
|
@ -120,21 +120,23 @@ class HmRadio : public Radio {
|
|||
|
||||
yield();
|
||||
|
||||
if (millis() - mTimeslotStart < innerLoopTimeout)
|
||||
if ((millis() - mTimeslotStart) < innerLoopTimeout)
|
||||
return; // nothing to do
|
||||
|
||||
// otherwise switch to next RX channel
|
||||
mTimeslotStart = millis();
|
||||
if(!mNRFloopChannels && (mTimeslotStart - mLastIrqTime > (DURATION_TXFRAME+DURATION_ONEFRAME)))
|
||||
if(!mNRFloopChannels && ((mTimeslotStart - mLastIrqTime) > (DURATION_TXFRAME+DURATION_ONEFRAME)))
|
||||
mNRFloopChannels = true;
|
||||
|
||||
rxPendular = !rxPendular;
|
||||
//innerLoopTimeout = (rxPendular ? 1 : 2)*DURATION_LISTEN_MIN;
|
||||
innerLoopTimeout = DURATION_LISTEN_MIN;
|
||||
|
||||
tempRxChIdx = mNRFloopChannels ?
|
||||
(tempRxChIdx + 4) % RF_CHANNELS :
|
||||
(mRxChIdx + rxPendular*4) % RF_CHANNELS;
|
||||
if(mNRFloopChannels)
|
||||
tempRxChIdx = (tempRxChIdx + 4) % RF_CHANNELS
|
||||
else
|
||||
tempRxChIdx = (mRxChIdx + rxPendular*4) % RF_CHANNELS;
|
||||
|
||||
mNrf24->setChannel(mRfChLst[tempRxChIdx]);
|
||||
isRxInit = false;
|
||||
|
||||
|
@ -172,7 +174,6 @@ class HmRadio : public Radio {
|
|||
}
|
||||
|
||||
if(rx_ready) {
|
||||
|
||||
if (getReceived()) { // check what we got, returns true for last package
|
||||
mNRFisInRX = false;
|
||||
mRadioWaitTime.startTimeMonitor(DURATION_PAUSE_LASTFR); // let the inverter first end his transmissions
|
||||
|
@ -188,7 +189,6 @@ class HmRadio : public Radio {
|
|||
mNrf24->setChannel(mRfChLst[tempRxChIdx]);
|
||||
} else
|
||||
mRxChIdx = tempRxChIdx;
|
||||
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -163,9 +163,6 @@ class CmtRadio : public Radio {
|
|||
uint8_t status = mCmt.getRx(p.packet, &p.len, 28, &p.rssi);
|
||||
if(CMT_SUCCESS == status)
|
||||
mBufCtrl.push(p);
|
||||
//if(p.packet[9] > ALL_FRAMES) // indicates last frame
|
||||
// mRadioWaitTime.stopTimeMonitor(); // we got everything we expected and can exit rx mode...
|
||||
//optionally instead: mRadioWaitTime.startTimeMonitor(DURATION_PAUSE_LASTFR); // let the inverter first get back to rx mode?
|
||||
}
|
||||
|
||||
CmtType mCmt;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue