From 323a6066884f4c3c2fda942f47d1bb54fd67fd6b Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 15 Jun 2017 07:01:51 +0900 Subject: [PATCH] Scubapro G2: add missed command packet logging I did the packet logging for the received data side, but forgot to do the same thing on the command transfer side, which makes the debug logs a bit less useful. Of course, it turns out that a bug in subsurface means that the logging never gets enabled anyway even when you ask for it, so right now this particular misfeature didn't matter. I'm hoping Tomaz/Dirk can fix the UI widget problem. Signed-off-by: Linus Torvalds --- src/scubapro_g2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/scubapro_g2.c b/src/scubapro_g2.c index 9ac100e..9282f87 100644 --- a/src/scubapro_g2.c +++ b/src/scubapro_g2.c @@ -105,6 +105,8 @@ scubapro_g2_transfer(scubapro_g2_device_t *g2, const unsigned char command[], un return DC_STATUS_INVALIDARGS; } + HEXDUMP (g2->base.context, DC_LOGLEVEL_DEBUG, "cmd", command, csize); + buf[0] = csize; memcpy(buf+1, command, csize); status = dc_usbhid_write(g2->usbhid, buf, csize+1, &transferred);