Skip to content

Commit

Permalink
0.7.31
Browse files Browse the repository at this point in the history
* fixed docu #1085
* changed active power limit MqTT messages to QOS2 #1072
* improved alarm messages, added alarm-id to log #1089
* trigger power limit read on next day (if inverter was offline meanwhile)
* disabled improv implementation to check if it is related to 'Schwuppdizitaet'
* changed live view to gray once inverter isn't available
* added inverter status to API
* changed sum of totals on WebGui depending on inverter status #1084
* merge maximum power (AC and DC) from PR #1080
  • Loading branch information
lumapu committed Aug 13, 2023
1 parent 995c7ea commit 5576410
Show file tree
Hide file tree
Showing 20 changed files with 225 additions and 114 deletions.
2 changes: 1 addition & 1 deletion User_Manual.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ This feature was removed. The persisten limit should not be modified cyclic by a

### Generic Information

The rest API works with *JSON* POST requests. All the following instructions must be sent to the `/api` endpoint of the AhoyDTU.
The rest API works with *JSON* POST requests. All the following instructions must be sent to the `/api/ctrl` endpoint of the AhoyDTU.

👆 `<INVERTER_ID>` is the number of the specific inverter in the setup page.

Expand Down
11 changes: 11 additions & 0 deletions src/CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Development Changes

## 0.7.31 - 2023-08-13
* fixed docu #1085
* changed active power limit MqTT messages to QOS2 #1072
* improved alarm messages, added alarm-id to log #1089
* trigger power limit read on next day (if inverter was offline meanwhile)
* disabled improv implementation to check if it is related to 'Schwuppdizitaet'
* changed live view to gray once inverter isn't available
* added inverter status to API
* changed sum of totals on WebGui depending on inverter status #1084
* merge maximum power (AC and DC) from PR #1080

## 0.7.30 - 2023-08-10
* attempt to improve speed / repsonse times (Schwuppdizitaet) #1075

Expand Down
4 changes: 2 additions & 2 deletions src/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void app::setup() {
mPubSerial.setup(mConfig, &mSys, &mTimestamp);

#if !defined(ETHERNET)
mImprov.setup(this, mConfig->sys.deviceName, mVersion);
//mImprov.setup(this, mConfig->sys.deviceName, mVersion);
#endif

regularTickers();
Expand Down Expand Up @@ -248,7 +248,7 @@ void app::regularTickers(void) {
everySec(std::bind(&DisplayType::tickerSecond, &mDisplay), "disp");
every(std::bind(&PubSerialType::tick, &mPubSerial), mConfig->serial.interval, "uart");
#if !defined(ETHERNET)
everySec([this]() { mImprov.tickSerial(); }, "impro");
//everySec([this]() { mImprov.tickSerial(); }, "impro");
#endif
// every([this]() { mPayload.simulation();}, 15, "simul");
}
Expand Down
2 changes: 1 addition & 1 deletion src/app.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ class app : public IApp, public ah::Scheduler {
MiPayloadType mMiPayload;
PubSerialType mPubSerial;
#if !defined(ETHERNET)
Improv mImprov;
//Improv mImprov;
#endif
#ifdef ESP32
CmtRadioType mCmtRadio;
Expand Down
2 changes: 1 addition & 1 deletion src/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
//-------------------------------------
#define VERSION_MAJOR 0
#define VERSION_MINOR 7
#define VERSION_PATCH 30
#define VERSION_PATCH 31

//-------------------------------------
typedef struct {
Expand Down
42 changes: 26 additions & 16 deletions src/hm/hmDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ enum {FLD_UDC = 0, FLD_IDC, FLD_PDC, FLD_YD, FLD_YW, FLD_YT,
FLD_IAC_1, FLD_IAC_2, FLD_IAC_3, FLD_PAC, FLD_F, FLD_T, FLD_PF, FLD_EFF,
FLD_IRR, FLD_Q, FLD_EVT, FLD_FW_VERSION, FLD_FW_BUILD_YEAR,
FLD_FW_BUILD_MONTH_DAY, FLD_FW_BUILD_HOUR_MINUTE, FLD_HW_ID,
FLD_ACT_ACTIVE_PWR_LIMIT, /*FLD_ACT_REACTIVE_PWR_LIMIT, FLD_ACT_PF,*/ FLD_LAST_ALARM_CODE};
FLD_ACT_ACTIVE_PWR_LIMIT, /*FLD_ACT_REACTIVE_PWR_LIMIT, FLD_ACT_PF,*/ FLD_LAST_ALARM_CODE, FLD_MP};

const char* const fields[] = {"U_DC", "I_DC", "P_DC", "YieldDay", "YieldWeek", "YieldTotal",
"U_AC", "U_AC_1N", "U_AC_2N", "U_AC_3N", "UAC_12", "UAC_23", "UAC_31", "I_AC",
"IAC_1", "I_AC_2", "I_AC_3", "P_AC", "F_AC", "Temp", "PF_AC", "Efficiency", "Irradiation","Q_AC",
"ALARM_MES_ID","FWVersion","FWBuildYear","FWBuildMonthDay","FWBuildHourMinute","HWPartId",
"active_PowerLimit", /*"reactivePowerLimit","Powerfactor",*/ "LastAlarmCode"};
"active_PowerLimit", /*"reactivePowerLimit","Powerfactor",*/ "LastAlarmCode", "MaxPower"};
const char* const notAvail = "n/a";

const uint8_t fieldUnits[] = {UNIT_V, UNIT_A, UNIT_W, UNIT_WH, UNIT_KWH, UNIT_KWH,
UNIT_V, UNIT_V, UNIT_V, UNIT_V, UNIT_V, UNIT_V, UNIT_V, UNIT_A, UNIT_A, UNIT_A, UNIT_A,
UNIT_W, UNIT_HZ, UNIT_C, UNIT_NONE, UNIT_PCT, UNIT_PCT, UNIT_VAR,
UNIT_NONE, UNIT_NONE, UNIT_NONE, UNIT_NONE, UNIT_NONE, UNIT_NONE, UNIT_PCT, UNIT_NONE};
UNIT_NONE, UNIT_NONE, UNIT_NONE, UNIT_NONE, UNIT_NONE, UNIT_NONE, UNIT_PCT, UNIT_NONE, UNIT_W};

// mqtt discovery device classes
enum {DEVICE_CLS_NONE = 0, DEVICE_CLS_CURRENT, DEVICE_CLS_ENERGY, DEVICE_CLS_PWR, DEVICE_CLS_VOLTAGE, DEVICE_CLS_FREQ, DEVICE_CLS_TEMP};
Expand Down Expand Up @@ -65,7 +65,7 @@ const byteAssign_fieldDeviceClass deviceFieldAssignment[] = {
#define DEVICE_CLS_ASSIGN_LIST_LEN (sizeof(deviceFieldAssignment) / sizeof(byteAssign_fieldDeviceClass))

// indices to calculation functions, defined in hmInverter.h
enum {CALC_YT_CH0 = 0, CALC_YD_CH0, CALC_UDC_CH, CALC_PDC_CH0, CALC_EFF_CH0, CALC_IRR_CH};
enum {CALC_YT_CH0 = 0, CALC_YD_CH0, CALC_UDC_CH, CALC_PDC_CH0, CALC_EFF_CH0, CALC_IRR_CH, CALC_MPAC_CH0, CALC_MPDC_CH};
enum {CMD_CALC = 0xffff};


Expand Down Expand Up @@ -129,6 +129,7 @@ const byteAssign_t hm1chAssignment[] = {
{ FLD_YD, UNIT_WH, CH1, 12, 2, 1 },
{ FLD_YT, UNIT_KWH, CH1, 8, 4, 1000 },
{ FLD_IRR, UNIT_PCT, CH1, CALC_IRR_CH, CH1, CMD_CALC },
{ FLD_MP, UNIT_W, CH1, CALC_MPDC_CH, CH1, CMD_CALC },

{ FLD_UAC, UNIT_V, CH0, 14, 2, 10 },
{ FLD_IAC, UNIT_A, CH0, 22, 2, 100 },
Expand All @@ -138,10 +139,11 @@ const byteAssign_t hm1chAssignment[] = {
{ FLD_PF, UNIT_NONE, CH0, 24, 2, 1000 },
{ FLD_T, UNIT_C, CH0, 26, 2, 10 },
{ FLD_EVT, UNIT_NONE, CH0, 28, 2, 1 },
{ FLD_YD, UNIT_WH, CH0, CALC_YD_CH0, 0, CMD_CALC },
{ FLD_YT, UNIT_KWH, CH0, CALC_YT_CH0, 0, CMD_CALC },
{ FLD_PDC, UNIT_W, CH0, CALC_PDC_CH0, 0, CMD_CALC },
{ FLD_EFF, UNIT_PCT, CH0, CALC_EFF_CH0, 0, CMD_CALC }
{ FLD_YD, UNIT_WH, CH0, CALC_YD_CH0, 0, CMD_CALC },
{ FLD_YT, UNIT_KWH, CH0, CALC_YT_CH0, 0, CMD_CALC },
{ FLD_PDC, UNIT_W, CH0, CALC_PDC_CH0, 0, CMD_CALC },
{ FLD_EFF, UNIT_PCT, CH0, CALC_EFF_CH0, 0, CMD_CALC },
{ FLD_MP, UNIT_W, CH0, CALC_MPAC_CH0, 0, CMD_CALC }
};
#define HM1CH_LIST_LEN (sizeof(hm1chAssignment) / sizeof(byteAssign_t))
#define HM1CH_PAYLOAD_LEN 30
Expand All @@ -157,13 +159,15 @@ const byteAssign_t hm2chAssignment[] = {
{ FLD_YD, UNIT_WH, CH1, 22, 2, 1 },
{ FLD_YT, UNIT_KWH, CH1, 14, 4, 1000 },
{ FLD_IRR, UNIT_PCT, CH1, CALC_IRR_CH, CH1, CMD_CALC },
{ FLD_MP, UNIT_W, CH1, CALC_MPDC_CH, CH1, CMD_CALC },

{ FLD_UDC, UNIT_V, CH2, 8, 2, 10 },
{ FLD_IDC, UNIT_A, CH2, 10, 2, 100 },
{ FLD_PDC, UNIT_W, CH2, 12, 2, 10 },
{ FLD_YD, UNIT_WH, CH2, 24, 2, 1 },
{ FLD_YT, UNIT_KWH, CH2, 18, 4, 1000 },
{ FLD_IRR, UNIT_PCT, CH2, CALC_IRR_CH, CH2, CMD_CALC },
{ FLD_MP, UNIT_W, CH2, CALC_MPDC_CH, CH2, CMD_CALC },

{ FLD_UAC, UNIT_V, CH0, 26, 2, 10 },
{ FLD_IAC, UNIT_A, CH0, 34, 2, 100 },
Expand All @@ -173,10 +177,11 @@ const byteAssign_t hm2chAssignment[] = {
{ FLD_PF, UNIT_NONE, CH0, 36, 2, 1000 },
{ FLD_T, UNIT_C, CH0, 38, 2, 10 },
{ FLD_EVT, UNIT_NONE, CH0, 40, 2, 1 },
{ FLD_YD, UNIT_WH, CH0, CALC_YD_CH0, 0, CMD_CALC },
{ FLD_YT, UNIT_KWH, CH0, CALC_YT_CH0, 0, CMD_CALC },
{ FLD_PDC, UNIT_W, CH0, CALC_PDC_CH0, 0, CMD_CALC },
{ FLD_EFF, UNIT_PCT, CH0, CALC_EFF_CH0, 0, CMD_CALC }
{ FLD_YD, UNIT_WH, CH0, CALC_YD_CH0, 0, CMD_CALC },
{ FLD_YT, UNIT_KWH, CH0, CALC_YT_CH0, 0, CMD_CALC },
{ FLD_PDC, UNIT_W, CH0, CALC_PDC_CH0, 0, CMD_CALC },
{ FLD_EFF, UNIT_PCT, CH0, CALC_EFF_CH0, 0, CMD_CALC },
{ FLD_MP, UNIT_W, CH0, CALC_MPAC_CH0, 0, CMD_CALC }

};
#define HM2CH_LIST_LEN (sizeof(hm2chAssignment) / sizeof(byteAssign_t))
Expand All @@ -193,27 +198,31 @@ const byteAssign_t hm4chAssignment[] = {
{ FLD_YD, UNIT_WH, CH1, 20, 2, 1 },
{ FLD_YT, UNIT_KWH, CH1, 12, 4, 1000 },
{ FLD_IRR, UNIT_PCT, CH1, CALC_IRR_CH, CH1, CMD_CALC },
{ FLD_MP, UNIT_W, CH1, CALC_MPDC_CH, CH1, CMD_CALC },

{ FLD_UDC, UNIT_V, CH2, CALC_UDC_CH, CH1, CMD_CALC },
{ FLD_IDC, UNIT_A, CH2, 6, 2, 100 },
{ FLD_PDC, UNIT_W, CH2, 10, 2, 10 },
{ FLD_YD, UNIT_WH, CH2, 22, 2, 1 },
{ FLD_YT, UNIT_KWH, CH2, 16, 4, 1000 },
{ FLD_IRR, UNIT_PCT, CH2, CALC_IRR_CH, CH2, CMD_CALC },
{ FLD_MP, UNIT_W, CH2, CALC_MPDC_CH, CH2, CMD_CALC },

{ FLD_UDC, UNIT_V, CH3, 24, 2, 10 },
{ FLD_IDC, UNIT_A, CH3, 26, 2, 100 },
{ FLD_PDC, UNIT_W, CH3, 30, 2, 10 },
{ FLD_YD, UNIT_WH, CH3, 42, 2, 1 },
{ FLD_YT, UNIT_KWH, CH3, 34, 4, 1000 },
{ FLD_IRR, UNIT_PCT, CH3, CALC_IRR_CH, CH3, CMD_CALC },
{ FLD_MP, UNIT_W, CH3, CALC_MPDC_CH, CH3, CMD_CALC },

{ FLD_UDC, UNIT_V, CH4, CALC_UDC_CH, CH3, CMD_CALC },
{ FLD_IDC, UNIT_A, CH4, 28, 2, 100 },
{ FLD_PDC, UNIT_W, CH4, 32, 2, 10 },
{ FLD_YD, UNIT_WH, CH4, 44, 2, 1 },
{ FLD_YT, UNIT_KWH, CH4, 38, 4, 1000 },
{ FLD_IRR, UNIT_PCT, CH4, CALC_IRR_CH, CH4, CMD_CALC },
{ FLD_MP, UNIT_W, CH4, CALC_MPDC_CH, CH4, CMD_CALC },

{ FLD_UAC, UNIT_V, CH0, 46, 2, 10 },
{ FLD_IAC, UNIT_A, CH0, 54, 2, 100 },
Expand All @@ -223,10 +232,11 @@ const byteAssign_t hm4chAssignment[] = {
{ FLD_PF, UNIT_NONE, CH0, 56, 2, 1000 },
{ FLD_T, UNIT_C, CH0, 58, 2, 10 },
{ FLD_EVT, UNIT_NONE, CH0, 60, 2, 1 },
{ FLD_YD, UNIT_WH, CH0, CALC_YD_CH0, 0, CMD_CALC },
{ FLD_YT, UNIT_KWH, CH0, CALC_YT_CH0, 0, CMD_CALC },
{ FLD_PDC, UNIT_W, CH0, CALC_PDC_CH0, 0, CMD_CALC },
{ FLD_EFF, UNIT_PCT, CH0, CALC_EFF_CH0, 0, CMD_CALC }
{ FLD_YD, UNIT_WH, CH0, CALC_YD_CH0, 0, CMD_CALC },
{ FLD_YT, UNIT_KWH, CH0, CALC_YT_CH0, 0, CMD_CALC },
{ FLD_PDC, UNIT_W, CH0, CALC_PDC_CH0, 0, CMD_CALC },
{ FLD_EFF, UNIT_PCT, CH0, CALC_EFF_CH0, 0, CMD_CALC },
{ FLD_MP, UNIT_W, CH0, CALC_MPAC_CH0, 0, CMD_CALC }
};
#define HM4CH_LIST_LEN (sizeof(hm4chAssignment) / sizeof(byteAssign_t))
#define HM4CH_PAYLOAD_LEN 62
Expand Down
85 changes: 64 additions & 21 deletions src/hm/hmInverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ static T calcEffiencyCh0(Inverter<> *iv, uint8_t arg0);
template<class T=float>
static T calcIrradiation(Inverter<> *iv, uint8_t arg0);

template<class T=float>
static T calcMaxPowerAcCh0(Inverter<> *iv, uint8_t arg0);

template<class T=float>
static T calcMaxPowerDc(Inverter<> *iv, uint8_t arg0);

template<class T=float>
using func_t = T (Inverter<> *, uint8_t);

Expand Down Expand Up @@ -102,12 +108,14 @@ class InfoCommand : public CommandAbstract {
// list of all available functions, mapped in hmDefines.h
template<class T=float>
const calcFunc_t<T> calcFunctions[] = {
{ CALC_YT_CH0, &calcYieldTotalCh0 },
{ CALC_YD_CH0, &calcYieldDayCh0 },
{ CALC_UDC_CH, &calcUdcCh },
{ CALC_PDC_CH0, &calcPowerDcCh0 },
{ CALC_EFF_CH0, &calcEffiencyCh0 },
{ CALC_IRR_CH, &calcIrradiation }
{ CALC_YT_CH0, &calcYieldTotalCh0 },
{ CALC_YD_CH0, &calcYieldDayCh0 },
{ CALC_UDC_CH, &calcUdcCh },
{ CALC_PDC_CH0, &calcPowerDcCh0 },
{ CALC_EFF_CH0, &calcEffiencyCh0 },
{ CALC_IRR_CH, &calcIrradiation },
{ CALC_MPAC_CH0, &calcMaxPowerAcCh0 },
{ CALC_MPDC_CH, &calcMaxPowerDc }
};

enum class InverterStatus : uint8_t {
Expand Down Expand Up @@ -314,8 +322,8 @@ class Inverter {
DPRINTLN(DBG_VERBOSE, "add real time");

// get last alarm message index and save it in the inverter object
if (getPosByChFld(0, FLD_EVT, rec) == pos){
if (alarmMesIndex < rec->record[pos]){
if (getPosByChFld(0, FLD_EVT, rec) == pos) {
if (alarmMesIndex < rec->record[pos]) {
alarmMesIndex = rec->record[pos];
//enqueCommand<InfoCommand>(AlarmUpdate); // What is the function of AlarmUpdate?

Expand Down Expand Up @@ -415,8 +423,10 @@ class Inverter {
if(status < InverterStatus::PRODUCING)
status = InverterStatus::STARTING;
} else {
if((*timestamp - recordMeas.ts) > INVERTER_OFF_THRES_SEC)
if((*timestamp - recordMeas.ts) > INVERTER_OFF_THRES_SEC) {
status = InverterStatus::OFF;
actPowerLimit = 0xffff; // power limit will be read once inverter becomes available
}
else
status = InverterStatus::WAS_ON;
}
Expand Down Expand Up @@ -680,8 +690,7 @@ static T calcYieldTotalCh0(Inverter<> *iv, uint8_t arg0) {
record_t<> *rec = iv->getRecordStruct(RealTimeRunData_Debug);
T yield = 0;
for(uint8_t i = 1; i <= iv->channels; i++) {
uint8_t pos = iv->getPosByChFld(i, FLD_YT, rec);
yield += iv->getValue(pos, rec);
yield += iv->getChannelFieldValue(i, FLD_YT, rec);
}
return yield;
}
Expand All @@ -695,8 +704,7 @@ static T calcYieldDayCh0(Inverter<> *iv, uint8_t arg0) {
record_t<> *rec = iv->getRecordStruct(RealTimeRunData_Debug);
T yield = 0;
for(uint8_t i = 1; i <= iv->channels; i++) {
uint8_t pos = iv->getPosByChFld(i, FLD_YD, rec);
yield += iv->getValue(pos, rec);
yield += iv->getChannelFieldValue(i, FLD_YD, rec);
}
return yield;
}
Expand Down Expand Up @@ -724,8 +732,7 @@ static T calcPowerDcCh0(Inverter<> *iv, uint8_t arg0) {
record_t<> *rec = iv->getRecordStruct(RealTimeRunData_Debug);
T dcPower = 0;
for(uint8_t i = 1; i <= iv->channels; i++) {
uint8_t pos = iv->getPosByChFld(i, FLD_PDC, rec);
dcPower += iv->getValue(pos, rec);
dcPower += iv->getChannelFieldValue(i, FLD_PDC, rec);
}
return dcPower;
}
Expand All @@ -737,12 +744,10 @@ static T calcEffiencyCh0(Inverter<> *iv, uint8_t arg0) {
DPRINTLN(DBG_VERBOSE, F("hmInverter.h:calcEfficiencyCh0"));
if(NULL != iv) {
record_t<> *rec = iv->getRecordStruct(RealTimeRunData_Debug);
uint8_t pos = iv->getPosByChFld(CH0, FLD_PAC, rec);
T acPower = iv->getValue(pos, rec);
T acPower = iv->getChannelFieldValue(CH0, FLD_PAC, rec);
T dcPower = 0;
for(uint8_t i = 1; i <= iv->channels; i++) {
pos = iv->getPosByChFld(i, FLD_PDC, rec);
dcPower += iv->getValue(pos, rec);
dcPower += iv->getChannelFieldValue(i, FLD_PDC, rec);
}
if(dcPower > 0)
return acPower / dcPower * 100.0f;
Expand All @@ -756,11 +761,49 @@ static T calcIrradiation(Inverter<> *iv, uint8_t arg0) {
// arg0 = channel
if(NULL != iv) {
record_t<> *rec = iv->getRecordStruct(RealTimeRunData_Debug);
uint8_t pos = iv->getPosByChFld(arg0, FLD_PDC, rec);
if(iv->config->chMaxPwr[arg0-1] > 0)
return iv->getValue(pos, rec) / iv->config->chMaxPwr[arg0-1] * 100.0f;
return iv->getChannelFieldValue(arg0, FLD_PDC, rec) / iv->config->chMaxPwr[arg0-1] * 100.0f;
}
return 0.0;
}

template<class T=float>
static T calcMaxPowerAcCh0(Inverter<> *iv, uint8_t arg0) {
DPRINTLN(DBG_VERBOSE, F("hmInverter.h:calcMaxPowerAcCh0"));
T acMaxPower = 0.0;
if(NULL != iv) {
record_t<> *rec = iv->getRecordStruct(RealTimeRunData_Debug);
T acPower = iv->getChannelFieldValue(arg0, FLD_PAC, rec);

for(uint8_t i = 0; i < rec->length; i++) {
if((FLD_MP == rec->assign[i].fieldId) && (0 == rec->assign[i].ch)) {
acMaxPower = iv->getValue(i, rec);
}
}
if(acPower > acMaxPower)
return acPower;
}
return acMaxPower;
}

template<class T=float>
static T calcMaxPowerDc(Inverter<> *iv, uint8_t arg0) {
DPRINTLN(DBG_VERBOSE, F("hmInverter.h:calcMaxPowerDc"));
// arg0 = channel
T dcMaxPower = 0.0;
if(NULL != iv) {
record_t<> *rec = iv->getRecordStruct(RealTimeRunData_Debug);
T dcPower = iv->getChannelFieldValue(arg0, FLD_PDC, rec);

for(uint8_t i = 0; i < rec->length; i++) {
if((FLD_MP == rec->assign[i].fieldId) && (arg0 == rec->assign[i].ch)) {
dcMaxPower = iv->getValue(i, rec);
}
}
if(dcPower > dcMaxPower)
return dcPower;
}
return dcMaxPower;
}

#endif /*__HM_INVERTER_H__*/
1 change: 0 additions & 1 deletion src/hm/hmPayload.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,6 @@ class HmPayload {

if(AlarmData == mPayload[iv->id].txCmd) {
uint8_t i = 0;
uint32_t start, end;
while(1) {
if(0 == iv->parseAlarmLog(i++, payload, payloadLen))
break;
Expand Down
2 changes: 1 addition & 1 deletion src/hm/hmRadio.h
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class HmRadio {
mTxBuf[10] = cmd; // cid
mTxBuf[11] = 0x00;
CP_U32_LittleEndian(&mTxBuf[12], ts);
if (cmd == RealTimeRunData_Debug || cmd == AlarmData ) {
if (cmd == AlarmData ) { //cmd == RealTimeRunData_Debug ||
mTxBuf[18] = (alarmMesId >> 8) & 0xff;
mTxBuf[19] = (alarmMesId ) & 0xff;
}
Expand Down
Loading

0 comments on commit 5576410

Please sign in to comment.