diff --git a/tools/esp8266/hmDefines.h b/tools/esp8266/hmDefines.h index 08e0996b..9aae0905 100644 --- a/tools/esp8266/hmDefines.h +++ b/tools/esp8266/hmDefines.h @@ -23,7 +23,7 @@ const char* const units[] = {"V", "A", "W", "Wh", "kWh", "Hz", "°C", "%", "var" // field types enum {FLD_UDC = 0, FLD_IDC, FLD_PDC, FLD_YD, FLD_YW, FLD_YT, FLD_UAC, FLD_IAC, FLD_PAC, FLD_F, FLD_T, FLD_PF, FLD_EFF, - FLD_IRR, FLD_Q,FLD_ALARM_MES_CNT,FLD_FW_VERSION,FLD_FW_BUILD_YEAR, + FLD_IRR, FLD_Q,FLD_ALARM_MES_ID,FLD_FW_VERSION,FLD_FW_BUILD_YEAR, FLD_FW_BUILD_MONTH_DAY,FLD_HW_ID,FLD_ACT_PWR_LIMIT,FLD_LAST_ALARM_CODE}; const char* const fields[] = {"U_DC", "I_DC", "P_DC", "YieldDay", "YieldWeek", "YieldTotal", @@ -126,7 +126,7 @@ const byteAssign_t hm1chAssignment[] = { { FLD_F, UNIT_HZ, CH0, 16, 2, 100 }, { FLD_PF, UNIT_NONE,CH0, 24, 2, 1000 }, { FLD_T, UNIT_C, CH0, 26, 2, 10 }, - { FLD_ALARM_MES_CNT, UNIT_NONE, CH0, 28, 2, 1 }, + { FLD_ALARM_MES_ID, 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 }, @@ -160,7 +160,7 @@ const byteAssign_t hm2chAssignment[] = { { FLD_F, UNIT_HZ, CH0, 28, 2, 100 }, { FLD_PF, UNIT_NONE,CH0, 36, 2, 1000 }, { FLD_T, UNIT_C, CH0, 38, 2, 10 }, - { FLD_ALARM_MES_CNT, UNIT_NONE, CH0, 40, 2, 1 }, + { FLD_ALARM_MES_ID, 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 }, @@ -208,7 +208,7 @@ const byteAssign_t hm4chAssignment[] = { { FLD_F, UNIT_HZ, CH0, 48, 2, 100 }, { FLD_PF, UNIT_NONE, CH0, 56, 2, 1000 }, { FLD_T, UNIT_C, CH0, 58, 2, 10 }, - { FLD_ALARM_MES_CNT, UNIT_NONE, CH0, 60, 2, 1 }, + { FLD_ALARM_MES_ID, 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 }, diff --git a/tools/esp8266/hmInverter.h b/tools/esp8266/hmInverter.h index 8d26838e..08b13c80 100644 --- a/tools/esp8266/hmInverter.h +++ b/tools/esp8266/hmInverter.h @@ -253,7 +253,7 @@ class Inverter { DPRINTLN(DBG_VERBOSE, "add real time"); // get last alarm message index and save it in the inverter object - if (getPosByChFld(0, FLD_ALARM_MES_CNT, rec) == pos){ + if (getPosByChFld(0, FLD_ALARM_MES_ID, rec) == pos){ if (alarmMesIndex < rec->record[pos]){ alarmMesIndex = rec->record[pos]; //enqueCommand(AlarmUpdate); // What is the function of AlarmUpdate?