aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--device.cc1
-rw-r--r--include/dissect.h4
2 files changed, 3 insertions, 2 deletions
diff --git a/device.cc b/device.cc
index 55ea943..90b37a7 100644
--- a/device.cc
+++ b/device.cc
@@ -48,6 +48,7 @@ CommError Device::recv(void *packet) {
int retry_count = 0;
Log::instance()(__PRETTY_FUNCTION__, Loglevel::DEBUG_L2);
+ std::this_thread::sleep_for( std::chrono::milliseconds(5000) );
if (mp_devhandle == NULL)
throw std::runtime_error("Attempted HID receive on an invalid descriptor.");
diff --git a/include/dissect.h b/include/dissect.h
index db3186b..32df78d 100644
--- a/include/dissect.h
+++ b/include/dissect.h
@@ -41,10 +41,10 @@ public:
out << "Raw HID packet:" << std::endl;
out << ::nitrokey::misc::hexdump((const char *)(&pod), sizeof pod);
- out << "Device status:\t" << pod.device_status << std::endl;
+ out << "Device status:\t" << pod.device_status + 0 << std::endl;
out << "Command ID:\t" << commandid_to_string((CommandID)(pod.command_id)) << std::endl;
out << "Last command CRC:\t" << pod.last_command_crc << std::endl;
- out << "Last command status:\t" << pod.last_command_status << std::endl;
+ out << "Last command status:\t" << pod.last_command_status + 0 << std::endl;
out << "CRC:\t" << pod.crc << std::endl;
out << "Payload:" << std::endl;