mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-12 16:36:38 +02:00
0.8.62
* updated version in footer #1381 * repaired radio statistics #1382
This commit is contained in:
parent
7e81709eb8
commit
e039820dba
6 changed files with 16 additions and 29 deletions
|
@ -1,5 +1,9 @@
|
||||||
# Development Changes
|
# Development Changes
|
||||||
|
|
||||||
|
## 0.8.62 - 2024-01-21
|
||||||
|
* updated version in footer #1381
|
||||||
|
* repaired radio statistics #1382
|
||||||
|
|
||||||
## 0.8.61 - 2024-01-21
|
## 0.8.61 - 2024-01-21
|
||||||
* add favicon to header
|
* add favicon to header
|
||||||
* improved NRF communication
|
* improved NRF communication
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 0
|
||||||
#define VERSION_MINOR 8
|
#define VERSION_MINOR 8
|
||||||
#define VERSION_PATCH 61
|
#define VERSION_PATCH 62
|
||||||
|
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
|
|
@ -143,16 +143,17 @@ class Communication : public CommQueue<> {
|
||||||
} else {
|
} else {
|
||||||
if(IV_MI == q->iv->ivGen)
|
if(IV_MI == q->iv->ivGen)
|
||||||
q->iv->mIvTxCnt++;
|
q->iv->mIvTxCnt++;
|
||||||
|
|
||||||
if(mFirstTry) {
|
if(mFirstTry) {
|
||||||
mFirstTry = false;
|
mFirstTry = false;
|
||||||
setAttempt();
|
setAttempt();
|
||||||
mHeu.evalTxChQuality(q->iv, false, 0, 0);
|
mHeu.evalTxChQuality(q->iv, false, 0, 0);
|
||||||
//q->iv->radioStatistics.rxFailNoAnser++;
|
q->iv->radioStatistics.rxFailNoAnser++;
|
||||||
q->iv->radioStatistics.retransmits++;
|
q->iv->radioStatistics.retransmits++;
|
||||||
q->iv->radio->mRadioWaitTime.stopTimeMonitor();
|
q->iv->radio->mRadioWaitTime.stopTimeMonitor();
|
||||||
mState = States::START;
|
mState = States::START;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,9 +210,10 @@ class Inverter {
|
||||||
cb(GridOnProFilePara, false);
|
cb(GridOnProFilePara, false);
|
||||||
} else if (mGetLossInterval > AHOY_GET_LOSS_INTERVAL) { // get loss rate
|
} else if (mGetLossInterval > AHOY_GET_LOSS_INTERVAL) { // get loss rate
|
||||||
mGetLossInterval = 1;
|
mGetLossInterval = 1;
|
||||||
|
cb(RealTimeRunData_Debug, false); // get live data
|
||||||
cb(GetLossRate, false);
|
cb(GetLossRate, false);
|
||||||
} else
|
} else
|
||||||
cb(RealTimeRunData_Debug, false); // get live data
|
cb(RealTimeRunData_Debug, false); // get live data
|
||||||
}
|
}
|
||||||
} else { // MI
|
} else { // MI
|
||||||
if(0 == getFwVersion()) {
|
if(0 == getFwVersion()) {
|
||||||
|
|
|
@ -78,13 +78,11 @@ class HmRadio : public Radio {
|
||||||
#else
|
#else
|
||||||
mNrf24->begin(mSpi.get(), ce, cs);
|
mNrf24->begin(mSpi.get(), ce, cs);
|
||||||
#endif
|
#endif
|
||||||
mNrf24->setRetries(3, 15); // 3*250us + 250us and 16 loops -> 15.25ms
|
mNrf24->setRetries(3, 15); // wait 3*250 = 750us, 16 * 250us -> 4000us = 4ms
|
||||||
|
|
||||||
mNrf24->setChannel(mRfChLst[mRxChIdx]);
|
|
||||||
mNrf24->startListening();
|
|
||||||
mNrf24->setDataRate(RF24_250KBPS);
|
mNrf24->setDataRate(RF24_250KBPS);
|
||||||
mNrf24->setAutoAck(true);
|
//mNrf24->setAutoAck(true); // enabled by default
|
||||||
mNrf24->enableDynamicAck();
|
//mNrf24->enableDynamicAck();
|
||||||
mNrf24->enableDynamicPayloads();
|
mNrf24->enableDynamicPayloads();
|
||||||
mNrf24->setCRCLength(RF24_CRC_16);
|
mNrf24->setCRCLength(RF24_CRC_16);
|
||||||
mNrf24->setAddressWidth(5);
|
mNrf24->setAddressWidth(5);
|
||||||
|
@ -155,21 +153,6 @@ class HmRadio : public Radio {
|
||||||
if(tx_ok)
|
if(tx_ok)
|
||||||
mLastIv->mAckCount++;
|
mLastIv->mAckCount++;
|
||||||
|
|
||||||
// start listening
|
|
||||||
if(!mIsRetransmit) {
|
|
||||||
if(mTxSetupTime < 30) {
|
|
||||||
mRxChIdx = (mTxChIdx + 4) % RF_CHANNELS;
|
|
||||||
mNrf24->setChannel(mRfChLst[mRxChIdx]);
|
|
||||||
mNrf24->startListening();
|
|
||||||
|
|
||||||
do {
|
|
||||||
yield();
|
|
||||||
} while((millis() - mMillis) < 37);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mIsRetransmit = false;
|
|
||||||
|
|
||||||
|
|
||||||
mRxChIdx = (mTxChIdx + 2) % RF_CHANNELS;
|
mRxChIdx = (mTxChIdx + 2) % RF_CHANNELS;
|
||||||
mNrf24->setChannel(mRfChLst[mRxChIdx]);
|
mNrf24->setChannel(mRfChLst[mRxChIdx]);
|
||||||
mNrf24->startListening();
|
mNrf24->startListening();
|
||||||
|
@ -185,7 +168,7 @@ class HmRadio : public Radio {
|
||||||
if (getReceived()) { // check what we got, returns true for last package
|
if (getReceived()) { // check what we got, returns true for last package
|
||||||
mNRFisInRX = false;
|
mNRFisInRX = false;
|
||||||
mRadioWaitTime.startTimeMonitor(DURATION_PAUSE_LASTFR); // let the inverter first end his transmissions
|
mRadioWaitTime.startTimeMonitor(DURATION_PAUSE_LASTFR); // let the inverter first end his transmissions
|
||||||
// add stop listening?
|
mNrf24->stopListening();
|
||||||
} else {
|
} else {
|
||||||
innerLoopTimeout = DURATION_LISTEN_MIN;
|
innerLoopTimeout = DURATION_LISTEN_MIN;
|
||||||
mTimeslotStart = millis();
|
mTimeslotStart = millis();
|
||||||
|
@ -398,7 +381,6 @@ class HmRadio : public Radio {
|
||||||
mLastIv = iv;
|
mLastIv = iv;
|
||||||
iv->mDtuTxCnt++;
|
iv->mDtuTxCnt++;
|
||||||
mNRFisInRX = false;
|
mNRFisInRX = false;
|
||||||
mIsRetransmit = isRetransmit;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t getIvId(Inverter<> *iv) {
|
uint64_t getIvId(Inverter<> *iv) {
|
||||||
|
@ -433,7 +415,6 @@ class HmRadio : public Radio {
|
||||||
bool rxPendular = false;
|
bool rxPendular = false;
|
||||||
uint32_t innerLoopTimeout = DURATION_LISTEN_MIN;
|
uint32_t innerLoopTimeout = DURATION_LISTEN_MIN;
|
||||||
uint8_t mTxSetupTime = 0;
|
uint8_t mTxSetupTime = 0;
|
||||||
bool mIsRetransmit = false;
|
|
||||||
|
|
||||||
std::unique_ptr<SPIClass> mSpi;
|
std::unique_ptr<SPIClass> mSpi;
|
||||||
std::unique_ptr<RF24> mNrf24;
|
std::unique_ptr<RF24> mNrf24;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div id="footer">
|
<div id="footer">
|
||||||
<div class="left">
|
<div class="left">
|
||||||
<a href="https://ahoydtu.de" target="_blank">AhoyDTU © 2023</a>
|
<a href="https://ahoydtu.de" target="_blank">AhoyDTU © 2024</a>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="https://discord.gg/WzhxEY62mB" target="_blank">Discord</a></li>
|
<li><a href="https://discord.gg/WzhxEY62mB" target="_blank">Discord</a></li>
|
||||||
<li><a href="https://github.com/lumapu/ahoy" target="_blank">Github</a></li>
|
<li><a href="https://github.com/lumapu/ahoy" target="_blank">Github</a></li>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue