mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-03 12:15:54 +02:00
0.7.44
* fix `last_success` transmitted to often #1124 * fix github action
This commit is contained in:
parent
c586af97fe
commit
3e5fe74b38
4 changed files with 10 additions and 3 deletions
|
@ -51,6 +51,7 @@ def readVersion(path, infile):
|
|||
|
||||
os.mkdir(path + "firmware/")
|
||||
os.mkdir(path + "firmware/ESP8266/")
|
||||
os.mkdir(path + "firmware/ESP8285/")
|
||||
os.mkdir(path + "firmware/ESP32/")
|
||||
os.mkdir(path + "firmware/ESP32-S2/")
|
||||
os.mkdir(path + "firmware/ESP32-S3/")
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
# Development Changes
|
||||
|
||||
## 0.7.44 - 2023-08-28
|
||||
* fix `last_success` transmitted to often #1124
|
||||
|
||||
## 0.7.43 - 2023-08-28
|
||||
* improved RSSI for NRF24, now it's read per package (and inverter) #1129
|
||||
* arranged `heap` related info together in `/system`
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
//-------------------------------------
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 7
|
||||
#define VERSION_PATCH 43
|
||||
#define VERSION_PATCH 44
|
||||
|
||||
//-------------------------------------
|
||||
typedef struct {
|
||||
|
|
|
@ -28,7 +28,8 @@ class PubMqttIvData {
|
|||
mState = IDLE;
|
||||
mZeroValues = false;
|
||||
|
||||
memset(mIvLastRTRpub, 0, MAX_NUM_INVERTERS * 4);
|
||||
memset(mIvLastRTRpub, 0, MAX_NUM_INVERTERS * sizeof(uint32_t));
|
||||
memset(mIvLastPublish, 0, MAX_NUM_INVERTERS * sizeof(uint32_t));
|
||||
mRTRDataHasBeenSent = false;
|
||||
|
||||
mTable[IDLE] = &PubMqttIvData::stateIdle;
|
||||
|
@ -102,7 +103,7 @@ class PubMqttIvData {
|
|||
mPos = 0;
|
||||
if(found) {
|
||||
record_t<> *rec = mIv->getRecordStruct(mCmd);
|
||||
if(mIv->getLastTs(rec) != mIvLastRTRpub[mIv->id]) {
|
||||
if(mIv->getLastTs(rec) != mIvLastPublish[mIv->id]) {
|
||||
snprintf(mSubTopic, 32 + MAX_NAME_LENGTH, "%s/last_success", mIv->config->name);
|
||||
snprintf(mVal, 40, "%d", mIv->getLastTs(rec));
|
||||
mPublish(mSubTopic, mVal, true, QOS_0);
|
||||
|
@ -133,6 +134,7 @@ class PubMqttIvData {
|
|||
pubData &= (lastTs != mIvLastRTRpub[mIv->id]);
|
||||
|
||||
if (pubData) {
|
||||
mIvLastPublish[mIv->id] = lastTs;
|
||||
if(mPos < rec->length) {
|
||||
bool retained = false;
|
||||
if (mCmd == RealTimeRunData_Debug) {
|
||||
|
@ -239,6 +241,7 @@ class PubMqttIvData {
|
|||
Inverter<> *mIv, *mIvSend;
|
||||
uint8_t mPos;
|
||||
uint32_t mIvLastRTRpub[MAX_NUM_INVERTERS];
|
||||
uint32_t mIvLastPublish[MAX_NUM_INVERTERS];
|
||||
bool mRTRDataHasBeenSent;
|
||||
|
||||
char mSubTopic[32 + MAX_NAME_LENGTH + 1];
|
||||
|
|
Loading…
Add table
Reference in a new issue