changeset 105:29b1aa89a34c

Disable the Start button when data acquisition thread is running This avoids the race condition encountered when data acquisition is re-started while waiting for the previous data acquisition thread to terminate.
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Mon, 08 Apr 2013 18:08:37 +0200
parents ad40873feca1
children c1a3b6ef94fe
files FXAnalyse.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/FXAnalyse.c	Mon Apr 08 18:05:53 2013 +0200
+++ b/FXAnalyse.c	Mon Apr 08 18:08:37 2013 +0200
@@ -525,6 +525,7 @@
 				break;
 			
 			logmsg("Start");
+			SetCtrlAttribute(panel, PANEL_STARTBUTTON, ATTR_DIMMED, TRUE);
 			acquiring = 1;
 			
 			// start data provider thread
@@ -555,6 +556,8 @@
 			CmtReleaseThreadPoolFunctionID(
 				DEFAULT_THREAD_POOL_HANDLE, dataProviderThread);
 			
+			SetCtrlAttribute(panel, PANEL_STARTBUTTON, ATTR_DIMMED, FALSE);
+			
 			break;
 	}
 	return 0;