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