[XBee] Fixed CodeQL alerts
This commit is contained in:
parent
f17b1d413a
commit
ffe1c38c1f
1 changed files with 2 additions and 2 deletions
|
@ -374,13 +374,13 @@ void XBee::sendApiFrame(uint8_t type, uint8_t id, uint8_t* data, uint16_t length
|
||||||
|
|
||||||
// calculate the checksum
|
// calculate the checksum
|
||||||
uint8_t checksum = 0;
|
uint8_t checksum = 0;
|
||||||
for(uint16_t i = 3; i < frameLength - 1; i++) {
|
for(size_t i = 3; i < frameLength - 1; i++) {
|
||||||
checksum += frame[i];
|
checksum += frame[i];
|
||||||
}
|
}
|
||||||
frame[5 + length] = 0xFF - checksum;
|
frame[5 + length] = 0xFF - checksum;
|
||||||
|
|
||||||
// send the frame
|
// send the frame
|
||||||
for(uint16_t i = 0; i < frameLength; i++) {
|
for(size_t i = 0; i < frameLength; i++) {
|
||||||
_mod->ModuleSerial->write(frame[i]);
|
_mod->ModuleSerial->write(frame[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue