Add HM330x Particle Sensor Support #5
1 changed files with 1 additions and 1 deletions
|
@ -80,7 +80,7 @@ bool HM330x::sendCmd(uint8_t cmd) {
|
||||||
|
|
||||||
// Calculate CRC8
|
// Calculate CRC8
|
||||||
uint8_t HM330x::calcSum(uint8_t bytes[]) {
|
uint8_t HM330x::calcSum(uint8_t bytes[]) {
|
||||||
uint8_t crc8;
|
uint8_t crc8 = 0;
|
||||||
for (int i = 0; i < HM330x_DATA_LEN - 1; i++) {
|
for (int i = 0; i < HM330x_DATA_LEN - 1; i++) {
|
||||||
crc8 += bytes[i];
|
crc8 += bytes[i];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue