mirror of
https://github.com/lumapu/ahoy.git
synced 2025-06-03 11:11:38 +02:00
0.7.62
fix compile (prometheus)
This commit is contained in:
parent
41ade24538
commit
169eea73e6
4 changed files with 14 additions and 16 deletions
|
@ -248,8 +248,10 @@ class HmPayload {
|
|||
continue; // skip to next inverter
|
||||
}
|
||||
|
||||
if((mPayload[iv->id].sendMillis + 500) > millis())
|
||||
return; // to fast, wait until packets are received!
|
||||
if((IV_HMS == iv->ivGen) || (IV_HMT == iv->ivGen)) {
|
||||
if((mPayload[iv->id].sendMillis + 500) > millis())
|
||||
return; // to fast, wait until packets are received!
|
||||
}
|
||||
|
||||
if (!mPayload[iv->id].complete) {
|
||||
bool crcPass, pyldComplete, fastNext;
|
||||
|
|
|
@ -202,7 +202,7 @@ class HmRadio : public Radio {
|
|||
std::queue<packet_t> mBufCtrl;
|
||||
|
||||
private:
|
||||
bool getReceived(void) {
|
||||
bool getReceived(void) {
|
||||
bool tx_ok, tx_fail, rx_ready;
|
||||
mNrf24.whatHappened(tx_ok, tx_fail, rx_ready); // resets the IRQ pin to HIGH
|
||||
|
||||
|
@ -219,10 +219,10 @@ class HmRadio : public Radio {
|
|||
if (p.packet[0] != 0x00) {
|
||||
mBufCtrl.push(p);
|
||||
if (p.packet[0] == (TX_REQ_INFO + ALL_FRAMES)) // response from get information command
|
||||
isLastPackage = (p.packet[9] > ALL_FRAMES); // > ALL_FRAMES indicates last packet received
|
||||
isLastPackage = (p.packet[9] > ALL_FRAMES); // > ALL_FRAMES indicates last packet received
|
||||
else if (p.packet[0] == ( 0x0f + ALL_FRAMES) ) // response from MI get information command
|
||||
isLastPackage = (p.packet[9] > 0x10); // > 0x10 indicates last packet received
|
||||
else if ((p.packet[0] != 0x88) && (p.packet[0] != 0x92)) // ignore fragment number zero and MI status messages //#0 was p.packet[0] != 0x00 &&
|
||||
isLastPackage = (p.packet[9] > 0x10); // > 0x10 indicates last packet received
|
||||
else if ((p.packet[0] != 0x88) && (p.packet[0] != 0x92)) // ignore fragment number zero and MI status messages //#0 was p.packet[0] != 0x00 &&
|
||||
isLastPackage = true; // response from dev control command
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,10 +36,9 @@ class RestApi {
|
|||
public:
|
||||
RestApi() {
|
||||
mTimezoneOffset = 0;
|
||||
mHeapFree = 0;
|
||||
mHeapFreeBlk = 0;
|
||||
mHeapFrag = 0;
|
||||
nr = 0;
|
||||
mHeapFree = 0;
|
||||
mHeapFreeBlk = 0;
|
||||
mHeapFrag = 0;
|
||||
}
|
||||
|
||||
void setup(IApp *app, HMSYSTEM *sys, AsyncWebServer *srv, settings_t *config) {
|
||||
|
@ -63,9 +62,6 @@ class RestApi {
|
|||
}
|
||||
|
||||
void ctrlRequest(JsonObject obj) {
|
||||
/*char out[128];
|
||||
serializeJson(obj, out, 128);
|
||||
DPRINTLN(DBG_INFO, "RestApi: " + String(out));*/
|
||||
DynamicJsonDocument json(128);
|
||||
JsonObject dummy = json.as<JsonObject>();
|
||||
if(obj[F("path")] == "ctrl")
|
||||
|
@ -726,7 +722,6 @@ class RestApi {
|
|||
uint32_t mTimezoneOffset;
|
||||
uint32_t mHeapFree, mHeapFreeBlk;
|
||||
uint8_t mHeapFrag;
|
||||
uint16_t nr;
|
||||
};
|
||||
|
||||
#endif /*__WEB_API_H__*/
|
||||
|
|
|
@ -715,13 +715,14 @@ class Web {
|
|||
metrics += String(type) + String(topic);
|
||||
|
||||
// NRF Statistics
|
||||
stat = mApp->getNrfStatistics();
|
||||
// @TODO 2023-10-01: the statistic data is now available per inverter
|
||||
/*stat = mApp->getNrfStatistics();
|
||||
metrics += radioStatistic(F("rx_success"), stat->rxSuccess);
|
||||
metrics += radioStatistic(F("rx_fail"), stat->rxFail);
|
||||
metrics += radioStatistic(F("rx_fail_answer"), stat->rxFailNoAnser);
|
||||
metrics += radioStatistic(F("frame_cnt"), stat->frmCnt);
|
||||
metrics += radioStatistic(F("tx_cnt"), stat->txCnt);
|
||||
metrics += radioStatistic(F("retrans_cnt"), stat->retransmits);
|
||||
metrics += radioStatistic(F("retrans_cnt"), stat->retransmits);*/
|
||||
|
||||
len = snprintf((char *)buffer,maxLen,"%s",metrics.c_str());
|
||||
// Next is Inverter information
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue