ControllerInterface: DSU polish: avoid hanging host thread, add disconnection detection, ...

-Reworked thread waits to never hang the Host thread for more than a really small time
(e.g. when disabling DSU its thread now closes almost immediately)
-Improve robustness when a large amount of devices are connected
-Add devices disconnection detection (they'd stay there forever until manually refreshed)
This commit is contained in:
Filoppi
2021-05-15 12:28:52 +03:00
parent 83806462ec
commit 16e4dede72
2 changed files with 92 additions and 46 deletions

View File

@ -113,7 +113,7 @@ struct ListPorts
MessageHeader header;
u32 message_type;
u32 pad_request_count;
std::array<u8, 4> pad_id;
std::array<u8, 4> pad_ids;
};
struct PortInfo
@ -178,7 +178,7 @@ struct PadDataResponse
u8 trigger_l2;
Touch touch1;
Touch touch2;
u64 timestamp_us;
u64 accelerometer_timestamp_us;
float accelerometer_x_g;
float accelerometer_y_g;
float accelerometer_z_g;