From eaa4688355c1d49a1d8430b6a2e0748ee601baee Mon Sep 17 00:00:00 2001 From: Hayley Date: Fri, 9 Aug 2019 11:24:10 -0500 Subject: [PATCH] Added comment to connect thread to explain usleep --- DSP_API/ThumbDV/thumbDV.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DSP_API/ThumbDV/thumbDV.c b/DSP_API/ThumbDV/thumbDV.c index d87807f..8f7a191 100644 --- a/DSP_API/ThumbDV/thumbDV.c +++ b/DSP_API/ThumbDV/thumbDV.c @@ -784,9 +784,10 @@ static void * _thumbDV_connectThread( void * param ) FT_HANDLE handle = *(FT_HANDLE *) param; while ( !_connectThreadAbort ) { - //TODO Handle reconnection - ret = FT_GetStatus(handle, &rx_bytes, &tx_bytes, &event_dword); + + //waits 1 second before checking status to prevent CPU hogging usleep(1000000); + ret = FT_GetStatus(handle, &rx_bytes, &tx_bytes, &event_dword); if (ret != FT_OK) {