mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 18:47:21 +08:00
Fixed PX4IO uploader debug output
This commit is contained in:
committed by
Daniel Agar
parent
65e1b702c9
commit
ee3285a34f
@@ -268,7 +268,7 @@ PX4IO_Uploader::recv_byte_with_timeout(uint8_t *c, unsigned timeout)
|
|||||||
|
|
||||||
read(_io_fd, c, 1);
|
read(_io_fd, c, 1);
|
||||||
#ifdef UDEBUG
|
#ifdef UDEBUG
|
||||||
log("recv_bytes 0x%02x", c);
|
log("recv_bytes 0x%02x", *c);
|
||||||
#endif
|
#endif
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
@@ -315,7 +315,17 @@ int
|
|||||||
PX4IO_Uploader::send(uint8_t c)
|
PX4IO_Uploader::send(uint8_t c)
|
||||||
{
|
{
|
||||||
#ifdef UDEBUG
|
#ifdef UDEBUG
|
||||||
|
static uint8_t cnt = 0;
|
||||||
|
|
||||||
|
if (c == 0) {
|
||||||
|
if (cnt == 0 || cnt == 32 || cnt == 64 || cnt == 128) { log("send+ 0x%02x", c); }
|
||||||
|
|
||||||
|
cnt++;
|
||||||
|
|
||||||
|
} else {
|
||||||
log("send 0x%02x", c);
|
log("send 0x%02x", c);
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (write(_io_fd, &c, 1) != 1) {
|
if (write(_io_fd, &c, 1) != 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user