Browse Source

修改部分bleproto utils代码

master
zhaohe 11 months ago
parent
commit
fbdab2c0a2
  1. 5
      ble_through/ble_proto_utils.c

5
ble_through/ble_proto_utils.c

@ -16,10 +16,7 @@ bool ble_through_proto_check_packet(zble_proto_packet_t *packet) {
return false; return false;
} }
uint8_t checksum = 0;
for (int i = 0; i < packet->packetlen - 2; i++) {
checksum += pu8[i];
}
uint8_t checksum = ble_through_proto_sum(packet);
if (checksum != pu8[packet->packetlen - 2]) { if (checksum != pu8[packet->packetlen - 2]) {
return false; return false;
} }

Loading…
Cancel
Save