Skip to content

Commit

Permalink
Fix: Updated source comments to also match hex numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
tbnobody committed Mar 15, 2024
1 parent dc04a63 commit 77b38df
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lib/Hoymiles/src/inverters/HERF_2CH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ HERF_2CH::HERF_2CH(HoymilesRadio* radio, const uint64_t serial)

bool HERF_2CH::isValidSerial(const uint64_t serial)
{
// serial >= 0x282100000000 && serial <= 0x282199999999
// serial >= 0x282100000000 && serial <= 0x2821ffffffff
uint16_t preSerial = (serial >> 32) & 0xffff;
return preSerial == 0x2821;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Hoymiles/src/inverters/HERF_4CH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ HERF_4CH::HERF_4CH(HoymilesRadio* radio, const uint64_t serial)

bool HERF_4CH::isValidSerial(const uint64_t serial)
{
// serial >= 0x280100000000 && serial <= 0x280199999999
// serial >= 0x280100000000 && serial <= 0x2801ffffffff
uint16_t preSerial = (serial >> 32) & 0xffff;
return preSerial == 0x2801;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Hoymiles/src/inverters/HMS_1CH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ HMS_1CH::HMS_1CH(HoymilesRadio* radio, const uint64_t serial)

bool HMS_1CH::isValidSerial(const uint64_t serial)
{
// serial >= 0x112400000000 && serial <= 0x112499999999
// serial >= 0x112400000000 && serial <= 0x1124ffffffff
uint16_t preSerial = (serial >> 32) & 0xffff;
return preSerial == 0x1124;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Hoymiles/src/inverters/HMS_1CHv2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ HMS_1CHv2::HMS_1CHv2(HoymilesRadio* radio, const uint64_t serial)

bool HMS_1CHv2::isValidSerial(const uint64_t serial)
{
// serial >= 0x112500000000 && serial <= 0x112599999999
// serial >= 0x112500000000 && serial <= 0x1125ffffffff
uint16_t preSerial = (serial >> 32) & 0xffff;
return preSerial == 0x1125;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Hoymiles/src/inverters/HMS_2CH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ HMS_2CH::HMS_2CH(HoymilesRadio* radio, const uint64_t serial)

bool HMS_2CH::isValidSerial(const uint64_t serial)
{
// serial >= 0x114400000000 && serial <= 0x114499999999
// serial >= 0x114400000000 && serial <= 0x1144ffffffff
uint16_t preSerial = (serial >> 32) & 0xffff;
return preSerial == 0x1144;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Hoymiles/src/inverters/HMS_4CH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ HMS_4CH::HMS_4CH(HoymilesRadio* radio, const uint64_t serial)

bool HMS_4CH::isValidSerial(const uint64_t serial)
{
// serial >= 0x116400000000 && serial <= 0x116499999999
// serial >= 0x116400000000 && serial <= 0x1164ffffffff
uint16_t preSerial = (serial >> 32) & 0xffff;
return preSerial == 0x1164;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Hoymiles/src/inverters/HMT_4CH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ HMT_4CH::HMT_4CH(HoymilesRadio* radio, const uint64_t serial)

bool HMT_4CH::isValidSerial(const uint64_t serial)
{
// serial >= 0x136100000000 && serial <= 0x136199999999
// serial >= 0x136100000000 && serial <= 0x1361ffffffff
uint16_t preSerial = (serial >> 32) & 0xffff;
return preSerial == 0x1361;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Hoymiles/src/inverters/HMT_6CH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ HMT_6CH::HMT_6CH(HoymilesRadio* radio, const uint64_t serial)

bool HMT_6CH::isValidSerial(const uint64_t serial)
{
// serial >= 0x138200000000 && serial <= 0x138299999999
// serial >= 0x138200000000 && serial <= 0x1382ffffffff
uint16_t preSerial = (serial >> 32) & 0xffff;
return preSerial == 0x1382;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Hoymiles/src/inverters/HM_1CH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ HM_1CH::HM_1CH(HoymilesRadio* radio, const uint64_t serial)

bool HM_1CH::isValidSerial(const uint64_t serial)
{
// serial >= 0x112100000000 && serial <= 0x112199999999
// serial >= 0x112100000000 && serial <= 0x1121ffffffff

uint8_t preId[2];
preId[0] = (uint8_t)(serial >> 40);
Expand Down
2 changes: 1 addition & 1 deletion lib/Hoymiles/src/inverters/HM_2CH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ HM_2CH::HM_2CH(HoymilesRadio* radio, const uint64_t serial)

bool HM_2CH::isValidSerial(const uint64_t serial)
{
// serial >= 0x114100000000 && serial <= 0x114199999999
// serial >= 0x114100000000 && serial <= 0x1141ffffffff

uint8_t preId[2];
preId[0] = (uint8_t)(serial >> 40);
Expand Down
2 changes: 1 addition & 1 deletion lib/Hoymiles/src/inverters/HM_4CH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ HM_4CH::HM_4CH(HoymilesRadio* radio, const uint64_t serial)

bool HM_4CH::isValidSerial(const uint64_t serial)
{
// serial >= 0x116100000000 && serial <= 0x116199999999
// serial >= 0x116100000000 && serial <= 0x1161ffffffff

uint8_t preId[2];
preId[0] = (uint8_t)(serial >> 40);
Expand Down

0 comments on commit 77b38df

Please sign in to comment.