|
@ -20,9 +20,9 @@ const char* const fields[] = {"U_DC", "I_DC", "P_DC", "YieldDay", "YieldWeek", " |
|
|
enum {CH0 = 0, CH1, CH2, CH3, CH4}; |
|
|
enum {CH0 = 0, CH1, CH2, CH3, CH4}; |
|
|
enum {CMD01 = 0x01, CMD02, CMD03, CMD82 = 0x82, CMD83, CMD84}; |
|
|
enum {CMD01 = 0x01, CMD02, CMD03, CMD82 = 0x82, CMD83, CMD84}; |
|
|
|
|
|
|
|
|
enum {INV_TYPE_HM600 = 0, INV_TYPE_HM1200, INV_TYPE_HM400}; |
|
|
enum {INV_TYPE_HM600 = 0, INV_TYPE_HM1200, INV_TYPE_HM400, INV_TYPE_HM800}; |
|
|
const char* const invTypes[] = {"HM600", "HM1200 / HM1500", "HM400"}; |
|
|
const char* const invTypes[] = {"HM600", "HM1200 / HM1500", "HM400", "HM800"}; |
|
|
#define NUM_INVERTER_TYPES 3 |
|
|
#define NUM_INVERTER_TYPES 4 |
|
|
|
|
|
|
|
|
typedef struct { |
|
|
typedef struct { |
|
|
uint8_t fieldId; // field id
|
|
|
uint8_t fieldId; // field id
|
|
@ -96,6 +96,30 @@ const byteAssign_t hm600assignment[] = { |
|
|
#define HM600_LIST_LEN (sizeof(hm600assignment) / sizeof(byteAssign_t)) |
|
|
#define HM600_LIST_LEN (sizeof(hm600assignment) / sizeof(byteAssign_t)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//-------------------------------------
|
|
|
|
|
|
// HM800
|
|
|
|
|
|
//-------------------------------------
|
|
|
|
|
|
const byteAssign_t hm800assignment[] = { |
|
|
|
|
|
|
|
|
|
|
|
{ FLD_UDC, UNIT_V, CH1, CMD01, 3, 2, 10 }, |
|
|
|
|
|
{ FLD_IDC, UNIT_A, CH1, CMD01, 5, 2, 100 }, |
|
|
|
|
|
{ FLD_PDC, UNIT_W, CH1, CMD01, 7, 2, 10 }, |
|
|
|
|
|
{ FLD_UDC, UNIT_V, CH2, CMD01, 9, 2, 10 }, |
|
|
|
|
|
{ FLD_IDC, UNIT_A, CH2, CMD01, 11, 2, 100 }, |
|
|
|
|
|
{ FLD_PDC, UNIT_W, CH2, CMD01, 13, 2, 10 }, |
|
|
|
|
|
{ FLD_YW, UNIT_WH, CH0, CMD02, 1, 2, 1 }, |
|
|
|
|
|
{ FLD_YT, UNIT_KWH, CH0, CMD02, 3, 4, 1000 }, |
|
|
|
|
|
{ FLD_YD, UNIT_WH, CH1, CMD02, 7, 2, 1 }, |
|
|
|
|
|
{ FLD_YD, UNIT_WH, CH2, CMD02, 9, 2, 1 }, |
|
|
|
|
|
{ FLD_UAC, UNIT_V, CH0, CMD02, 11, 2, 10 }, |
|
|
|
|
|
{ FLD_F, UNIT_HZ, CH0, CMD02, 13, 2, 100 }, |
|
|
|
|
|
{ FLD_PAC, UNIT_W, CH0, CMD02, 15, 2, 10 }, |
|
|
|
|
|
{ FLD_IAC, UNIT_A, CH0, CMD83, 3, 2, 100 }, |
|
|
|
|
|
{ FLD_T, UNIT_C, CH0, CMD83, 7, 2, 10 } |
|
|
|
|
|
}; |
|
|
|
|
|
#define HM800_LIST_LEN (sizeof(hm800assignment) / sizeof(byteAssign_t)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//-------------------------------------
|
|
|
//-------------------------------------
|
|
|
// HM1200, HM1500
|
|
|
// HM1200, HM1500
|
|
|
//-------------------------------------
|
|
|
//-------------------------------------
|
|
|