Added additional inverter definitions

This commit is contained in:
Thomas Basler 2022-06-14 21:02:51 +02:00
parent effd983e6d
commit 37dbb343a9
5 changed files with 98 additions and 1 deletions

View File

@ -0,0 +1,16 @@
#include "HM_1CH.h"
bool HM_1CH::isValidSerial(uint64_t serial)
{
return serial >= 0x112100000000 && serial <= 0x112199999999;
}
String HM_1CH::typeName()
{
return String(F("HM-300, HM-350, HM-400"));
}
const byteAssign_t* HM_1CH::getByteAssignment()
{
return byteAssignment;
}

View File

@ -0,0 +1,28 @@
#pragma once
#include "InverterAbstract.h"
class HM_1CH : public InverterAbstract {
public:
static bool isValidSerial(uint64_t serial);
String typeName();
const byteAssign_t* getByteAssignment();
private:
const byteAssign_t byteAssignment[13] = {
{ FLD_UDC, UNIT_V, CH1, 2, 2, 10 },
{ FLD_IDC, UNIT_A, CH1, 4, 2, 100 },
{ FLD_PDC, UNIT_W, CH1, 6, 2, 10 },
{ 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_UAC, UNIT_V, CH0, 14, 2, 10 },
{ FLD_IAC, UNIT_A, CH0, 22, 2, 100 },
{ FLD_PAC, UNIT_W, CH0, 18, 2, 10 },
{ FLD_F, UNIT_HZ, CH0, 16, 2, 100 },
{ FLD_T, UNIT_C, CH0, 26, 2, 10 },
{ FLD_PDC, UNIT_W, CH0, CALC_PDC_CH0, 0, CMD_CALC },
{ FLD_EFF, UNIT_PCT, CH0, CALC_EFF_CH0, 0, CMD_CALC }
};
};

View File

@ -0,0 +1,16 @@
#include "HM_2CH.h"
bool HM_2CH::isValidSerial(uint64_t serial)
{
return serial >= 0x114100000000 && serial <= 0x114199999999;
}
String HM_2CH::typeName()
{
return String(F("HM-600, HM-700, HM-800"));
}
const byteAssign_t* HM_2CH::getByteAssignment()
{
return byteAssignment;
}

View File

@ -0,0 +1,37 @@
#pragma once
#include "InverterAbstract.h"
class HM_2CH : public InverterAbstract {
public:
static bool isValidSerial(uint64_t serial);
String typeName();
const byteAssign_t* getByteAssignment();
private:
const byteAssign_t byteAssignment[21] = {
{ FLD_UDC, UNIT_V, CH1, 2, 2, 10 },
{ FLD_IDC, UNIT_A, CH1, 4, 2, 100 },
{ FLD_PDC, UNIT_W, CH1, 6, 2, 10 },
{ 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_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_UAC, UNIT_V, CH0, 26, 2, 10 },
{ FLD_IAC, UNIT_A, CH0, 34, 2, 100 },
{ FLD_PAC, UNIT_W, CH0, 30, 2, 10 },
{ FLD_F, UNIT_HZ, CH0, 28, 2, 100 },
{ FLD_T, UNIT_C, CH0, 38, 2, 10 },
{ 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 }
};
};

View File

@ -7,7 +7,7 @@ bool HM_4CH::isValidSerial(uint64_t serial)
String HM_4CH::typeName()
{
return String(F("HM-1500"));
return String(F("HM-1200, HM-1500"));
}
const byteAssign_t* HM_4CH::getByteAssignment()