forked from tbnobody/OpenDTU
-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'tbnobody/master' into development
- Loading branch information
Showing
27 changed files
with
538 additions
and
395 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
|
||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
/* | ||
* Copyright (C) 2022-2024 Thomas Basler and others | ||
*/ | ||
#include "HERF_1CH.h" | ||
|
||
static const byteAssign_t byteAssignment[] = { | ||
{ TYPE_DC, CH0, FLD_UDC, UNIT_V, 2, 2, 10, false, 1 }, | ||
{ TYPE_DC, CH0, FLD_IDC, UNIT_A, 6, 2, 100, false, 2 }, | ||
{ TYPE_DC, CH0, FLD_PDC, UNIT_W, 10, 2, 10, false, 1 }, | ||
{ TYPE_DC, CH0, FLD_YD, UNIT_WH, 22, 2, 1, false, 0 }, | ||
{ TYPE_DC, CH0, FLD_YT, UNIT_KWH, 14, 4, 1000, false, 3 }, | ||
{ TYPE_DC, CH0, FLD_IRR, UNIT_PCT, CALC_CH_IRR, CH0, CMD_CALC, false, 3 }, | ||
|
||
{ TYPE_AC, CH0, FLD_UAC, UNIT_V, 26, 2, 10, false, 1 }, | ||
{ TYPE_AC, CH0, FLD_IAC, UNIT_A, 34, 2, 100, false, 2 }, | ||
{ TYPE_AC, CH0, FLD_PAC, UNIT_W, 30, 2, 10, false, 1 }, | ||
{ TYPE_AC, CH0, FLD_Q, UNIT_VAR, 40, 2, 10, false, 1 }, // to be verified | ||
{ TYPE_AC, CH0, FLD_F, UNIT_HZ, 28, 2, 100, false, 2 }, | ||
{ TYPE_AC, CH0, FLD_PF, UNIT_NONE, 36, 2, 1000, false, 3 }, | ||
|
||
{ TYPE_INV, CH0, FLD_T, UNIT_C, 38, 2, 10, true, 1 }, // to be verified | ||
{ TYPE_INV, CH0, FLD_EVT_LOG, UNIT_NONE, 40, 2, 1, false, 0 }, // to be verified | ||
|
||
{ TYPE_INV, CH0, FLD_YD, UNIT_WH, CALC_TOTAL_YD, 0, CMD_CALC, false, 0 }, | ||
{ TYPE_INV, CH0, FLD_YT, UNIT_KWH, CALC_TOTAL_YT, 0, CMD_CALC, false, 3 }, | ||
{ TYPE_INV, CH0, FLD_PDC, UNIT_W, CALC_TOTAL_PDC, 0, CMD_CALC, false, 1 }, | ||
{ TYPE_INV, CH0, FLD_EFF, UNIT_PCT, CALC_TOTAL_EFF, 0, CMD_CALC, false, 3 } | ||
}; | ||
|
||
HERF_1CH::HERF_1CH(HoymilesRadio* radio, const uint64_t serial) | ||
: HM_Abstract(radio, serial) {}; | ||
|
||
bool HERF_1CH::isValidSerial(const uint64_t serial) | ||
{ | ||
// serial >= 0x284100000000 && serial <= 0x2841ffffffff | ||
uint16_t preSerial = (serial >> 32) & 0xffff; | ||
return preSerial == 0x2841; | ||
} | ||
|
||
String HERF_1CH::typeName() const | ||
{ | ||
return "HERF-300-1T"; | ||
} | ||
|
||
const byteAssign_t* HERF_1CH::getByteAssignment() const | ||
{ | ||
return byteAssignment; | ||
} | ||
|
||
uint8_t HERF_1CH::getByteAssignmentSize() const | ||
{ | ||
return sizeof(byteAssignment) / sizeof(byteAssignment[0]); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
#pragma once | ||
|
||
#include "HM_Abstract.h" | ||
|
||
class HERF_1CH : public HM_Abstract { | ||
public: | ||
explicit HERF_1CH(HoymilesRadio* radio, const uint64_t serial); | ||
static bool isValidSerial(const uint64_t serial); | ||
String typeName() const; | ||
const byteAssign_t* getByteAssignment() const; | ||
uint8_t getByteAssignmentSize() const; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
# Class overview | ||
|
||
| Class | Models | Serial range | | ||
| --------------| --------------------------- | ------------ | | ||
| HM_1CH | HM-300/350/400-1T | 1121 | | ||
| HM_2CH | HM-600/700/800-2T | 1141 | | ||
| HM_4CH | HM-1000/1200/1500-4T | 1161 | | ||
| HMS_1CH | HMS-300/350/400/450/500-1T | 1124 | | ||
| HMS_1CHv2 | HMS-500-1T v2 | 1125 | | ||
| HMS_2CH | HMS-600/700/800/900/1000-2T | 1143, 1144 | | ||
| HMS_4CH | HMS-1600/1800/2000-4T | 1164 | | ||
| HMT_4CH | HMT-1600/1800/2000-4T | 1361 | | ||
| HMT_6CH | HMT-1800/2250-6T | 1382 | | ||
| HERF_2CH | HERF 800 | 2821 | | ||
| HERF_4CH | HERF 1800 | 2801 | | ||
| Class | Models | Serial range | | ||
| --------------| --------------------------- | ------------- -- | | ||
| HM_1CH | HM-300/350/400-1T | 1121 | | ||
| HM_2CH | HM-600/700/800-2T | 1141 | | ||
| HM_4CH | HM-1000/1200/1500-4T | 1161 | | ||
| HMS_1CH | HMS-300/350/400/450/500-1T | 1124 | | ||
| HMS_1CHv2 | HMS-500-1T v2 | 1125 | | ||
| HMS_2CH | HMS-600/700/800/900/1000-2T | 1143, 1144, 1410 | | ||
| HMS_4CH | HMS-1600/1800/2000-4T | 1164 | | ||
| HMT_4CH | HMT-1600/1800/2000-4T | 1361 | | ||
| HMT_6CH | HMT-1800/2250-6T | 1382 | | ||
| HERF_1CH | HERF 300 | 2841 | | ||
| HERF_2CH | HERF 800 | 2821 | | ||
| HERF_4CH | HERF 1800 | 2801 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.