mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-08 20:17:16 +02:00
parent
349184a113
commit
f89fd66dbf
4 changed files with 34 additions and 46 deletions
|
@ -1,5 +1,8 @@
|
||||||
# Development Changes
|
# Development Changes
|
||||||
|
|
||||||
|
## 0.8.69 - 2024-01-31
|
||||||
|
* merge PR: Dynamic retries, pendular first rx chan #1394
|
||||||
|
|
||||||
## 0.8.68 - 2024-01-29
|
## 0.8.68 - 2024-01-29
|
||||||
* fix HMS / HMT startup
|
* fix HMS / HMT startup
|
||||||
* added `flush_rx` to NRF on TX
|
* added `flush_rx` to NRF on TX
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
#define VERSION_MAJOR 0
|
#define VERSION_MAJOR 0
|
||||||
#define VERSION_MINOR 8
|
#define VERSION_MINOR 8
|
||||||
#define VERSION_PATCH 68
|
#define VERSION_PATCH 69
|
||||||
|
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -22,8 +22,6 @@ typedef struct {
|
||||||
int8_t rssi;
|
int8_t rssi;
|
||||||
uint8_t packet[MAX_RF_PAYLOAD_SIZE];
|
uint8_t packet[MAX_RF_PAYLOAD_SIZE];
|
||||||
uint16_t millis;
|
uint16_t millis;
|
||||||
uint8_t arc;
|
|
||||||
uint8_t plos;
|
|
||||||
} packet_t;
|
} packet_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
|
|
@ -190,9 +190,6 @@ class Inverter {
|
||||||
mDevControlRequest = false;
|
mDevControlRequest = false;
|
||||||
} else if (IV_MI != ivGen) { // HM / HMS / HMT
|
} else if (IV_MI != ivGen) { // HM / HMS / HMT
|
||||||
mGetLossInterval++;
|
mGetLossInterval++;
|
||||||
if(mNextLive)
|
|
||||||
cb(RealTimeRunData_Debug, false); // get live data
|
|
||||||
else {
|
|
||||||
if(INV_RADIO_TYPE_NRF == ivRadioType) {
|
if(INV_RADIO_TYPE_NRF == ivRadioType) {
|
||||||
// get live data until quality reaches maximum
|
// get live data until quality reaches maximum
|
||||||
if(!heuristics.isTxAtMax()) {
|
if(!heuristics.isTxAtMax()) {
|
||||||
|
@ -203,31 +200,27 @@ class Inverter {
|
||||||
|
|
||||||
if(actPowerLimit == 0xffff) {
|
if(actPowerLimit == 0xffff) {
|
||||||
cb(SystemConfigPara, false); // power limit info
|
cb(SystemConfigPara, false); // power limit info
|
||||||
cb(RealTimeRunData_Debug, false);
|
|
||||||
} else if(InitDataState != devControlCmd) {
|
} else if(InitDataState != devControlCmd) {
|
||||||
cb(devControlCmd, false); // custom command which was received by API
|
cb(devControlCmd, false); // custom command which was received by API
|
||||||
devControlCmd = InitDataState;
|
devControlCmd = InitDataState;
|
||||||
mGetLossInterval = 1;
|
mGetLossInterval = 1;
|
||||||
|
return;
|
||||||
} else if(0 == getFwVersion()) {
|
} else if(0 == getFwVersion()) {
|
||||||
cb(InverterDevInform_All, false); // get firmware version
|
cb(InverterDevInform_All, false); // get firmware version
|
||||||
cb(RealTimeRunData_Debug, false); // get live data
|
} else if(0 == getHwVersion()) {
|
||||||
}
|
|
||||||
else if(0 == getHwVersion()) {
|
|
||||||
cb(InverterDevInform_Simple, false); // get hardware version
|
cb(InverterDevInform_Simple, false); // get hardware version
|
||||||
cb(RealTimeRunData_Debug, false); // get live data
|
|
||||||
} else if((alarmLastId != alarmMesIndex) && (alarmMesIndex != 0)) {
|
} else if((alarmLastId != alarmMesIndex) && (alarmMesIndex != 0)) {
|
||||||
cb(AlarmData, false); // get last alarms
|
cb(AlarmData, false); // get last alarms
|
||||||
cb(RealTimeRunData_Debug, false); // get live data
|
|
||||||
} else if((0 == mGridLen) && generalConfig->readGrid) { // read grid profile
|
} else if((0 == mGridLen) && generalConfig->readGrid) { // read grid profile
|
||||||
cb(GridOnProFilePara, false);
|
cb(GridOnProFilePara, false);
|
||||||
cb(RealTimeRunData_Debug, false); // get live data
|
|
||||||
} 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(RealTimeRunData_Debug, false); // get live data
|
||||||
cb(GetLossRate, false);
|
cb(GetLossRate, false);
|
||||||
} else
|
return;
|
||||||
cb(RealTimeRunData_Debug, false); // get live data
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cb(RealTimeRunData_Debug, false); // get live data
|
||||||
} else { // MI
|
} else { // MI
|
||||||
cb(((type == INV_TYPE_4CH) ? MI_REQ_4CH : MI_REQ_CH1), false);
|
cb(((type == INV_TYPE_4CH) ? MI_REQ_4CH : MI_REQ_CH1), false);
|
||||||
mGetLossInterval++;
|
mGetLossInterval++;
|
||||||
|
@ -279,21 +272,18 @@ class Inverter {
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getFieldName(uint8_t pos, record_t<> *rec) {
|
const char *getFieldName(uint8_t pos, record_t<> *rec) {
|
||||||
DPRINTLN(DBG_VERBOSE, F("hmInverter.h:getFieldName"));
|
|
||||||
if(NULL != rec)
|
if(NULL != rec)
|
||||||
return fields[rec->assign[pos].fieldId];
|
return fields[rec->assign[pos].fieldId];
|
||||||
return notAvail;
|
return notAvail;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *getUnit(uint8_t pos, record_t<> *rec) {
|
const char *getUnit(uint8_t pos, record_t<> *rec) {
|
||||||
DPRINTLN(DBG_VERBOSE, F("hmInverter.h:getUnit"));
|
|
||||||
if(NULL != rec)
|
if(NULL != rec)
|
||||||
return units[rec->assign[pos].unitId];
|
return units[rec->assign[pos].unitId];
|
||||||
return notAvail;
|
return notAvail;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t getChannel(uint8_t pos, record_t<> *rec) {
|
uint8_t getChannel(uint8_t pos, record_t<> *rec) {
|
||||||
DPRINTLN(DBG_VERBOSE, F("hmInverter.h:getChannel"));
|
|
||||||
if(NULL != rec)
|
if(NULL != rec)
|
||||||
return rec->assign[pos].ch;
|
return rec->assign[pos].ch;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -350,7 +340,6 @@ class Inverter {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(rec == &recordMeas) {
|
if(rec == &recordMeas) {
|
||||||
mNextLive = false; // live data received
|
|
||||||
DPRINTLN(DBG_VERBOSE, "add real time");
|
DPRINTLN(DBG_VERBOSE, "add real time");
|
||||||
// get last alarm message index and save it in the inverter object
|
// get last alarm message index and save it in the inverter object
|
||||||
if (getPosByChFld(0, FLD_EVT, rec) == pos) {
|
if (getPosByChFld(0, FLD_EVT, rec) == pos) {
|
||||||
|
@ -363,7 +352,6 @@ class Inverter {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
mNextLive = true;
|
|
||||||
if (rec->assign == InfoAssignment) {
|
if (rec->assign == InfoAssignment) {
|
||||||
DPRINTLN(DBG_DEBUG, "add info");
|
DPRINTLN(DBG_DEBUG, "add info");
|
||||||
// eg. fw version ...
|
// eg. fw version ...
|
||||||
|
@ -868,7 +856,6 @@ class Inverter {
|
||||||
uint8_t mGridLen = 0;
|
uint8_t mGridLen = 0;
|
||||||
uint8_t mGridProfile[MAX_GRID_LENGTH];
|
uint8_t mGridProfile[MAX_GRID_LENGTH];
|
||||||
uint8_t mAlarmNxtWrPos = 0; // indicates the position in array (rolling buffer)
|
uint8_t mAlarmNxtWrPos = 0; // indicates the position in array (rolling buffer)
|
||||||
bool mNextLive = true; // first read live data after booting up then version etc.
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
uint16_t mDtuRxCnt = 0;
|
uint16_t mDtuRxCnt = 0;
|
||||||
|
|
|
@ -1396,7 +1396,7 @@
|
||||||
{
|
{
|
||||||
"token": "CMD_RECEIVED_WAIT_ACK",
|
"token": "CMD_RECEIVED_WAIT_ACK",
|
||||||
"en": "received command, waiting for inverter acknowledge ...",
|
"en": "received command, waiting for inverter acknowledge ...",
|
||||||
"de": "Befehl erhalten, warte auf Bestäigung von Wechselrichter ..."
|
"de": "Befehl erhalten, warte auf Bestäigung vom Wechselrichter ..."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"token": "COMMAND_RECEIVED",
|
"token": "COMMAND_RECEIVED",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue