Browse Source

hide zcanreceiver log

transmit_disinfection
zhaohe 3 weeks ago
parent
commit
56543e2212
  1. 16
      zcanreceiver/zcanreceiver.cpp

16
zcanreceiver/zcanreceiver.cpp

@ -253,14 +253,14 @@ void zcanbus_reg_on_connected_listener(zcanbus_on_connected_t connectedlistener)
bool zcanbus_send_packet(uint8_t to, uint8_t *packet, size_t len) { return zcanbus_send_packet(to, packet, len, OVER_TIME_MS); }
static char *hex2str(uint8_t *data, size_t len) {
static char buf[200];
memset(buf, 0, sizeof(buf));
for (size_t i = 0; i < len; i++) {
sprintf(buf + i * 2, "%02x", data[i]);
}
return buf;
}
// static char *hex2str(uint8_t *data, size_t len) {
// static char buf[200];
// memset(buf, 0, sizeof(buf));
// for (size_t i = 0; i < len; i++) {
// sprintf(buf + i * 2, "%02x", data[i]);
// }
// return buf;
// }
bool zcanbus_send_packet(uint8_t to, uint8_t *packet, size_t len, int overtimems) {
// ZLOGI(TAG, "sendPacket to:%d, %s(%d)", to, hex2str(packet, len), len);

Loading…
Cancel
Save