Browse Source

0.7.44

* fix `last_success` transmitted to often #1124
* fix github action
pull/1118/head
lumapu 1 year ago
parent
commit
3e5fe74b38
  1. 1
      scripts/getVersion.py
  2. 3
      src/CHANGES.md
  3. 2
      src/defines.h
  4. 7
      src/publisher/pubMqttIvData.h

1
scripts/getVersion.py

@ -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/")

3
src/CHANGES.md

@ -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`

2
src/defines.h

@ -13,7 +13,7 @@
//-------------------------------------
#define VERSION_MAJOR 0
#define VERSION_MINOR 7
#define VERSION_PATCH 43
#define VERSION_PATCH 44
//-------------------------------------
typedef struct {

7
src/publisher/pubMqttIvData.h

@ -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…
Cancel
Save