diff options
| author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2019-04-12 00:17:35 -0500 | 
|---|---|---|
| committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2019-04-12 00:17:35 -0500 | 
| commit | 6630bb1a184f075a10d2a16c45b5aaf370393056 (patch) | |
| tree | 1572233625a31e1b5fa171b25b9c27bc381a97c3 | |
| parent | c866f91716ca2c9b9acb286867651fdea0ad46a1 (diff) | |
| download | ulab-6630bb1a184f075a10d2a16c45b5aaf370393056.tar.gz ulab-6630bb1a184f075a10d2a16c45b5aaf370393056.zip  | |
Allow GPIB server to read full storage of TDS744A scopes
| -rw-r--r-- | servers/gpib_server_lin/src/scope_functions.cpp | 18 | 
1 files changed, 10 insertions, 8 deletions
diff --git a/servers/gpib_server_lin/src/scope_functions.cpp b/servers/gpib_server_lin/src/scope_functions.cpp index 6b6f61a..a60ce3f 100644 --- a/servers/gpib_server_lin/src/scope_functions.cpp +++ b/servers/gpib_server_lin/src/scope_functions.cpp @@ -36,10 +36,12 @@  #include <tqimage.h> +#define SCOPE_TRACE_MAX_POINTS 131072 +  extern char falpha[1024];  unsigned char scope_raw_screenshot_data[4194304]; -double scope_raw_trace_data[65535]; -double scope_raw_position_data[65535]; +double scope_raw_trace_data[SCOPE_TRACE_MAX_POINTS]; +double scope_raw_position_data[SCOPE_TRACE_MAX_POINTS];  char scope_segarray[4194304]; @@ -788,7 +790,7 @@ int scope_perform_initial_setup(const char * scopeType, int gpibDevice) {  				printf("[DEBG] Writing: %s\n\r", falpha);  				#endif  				if (gpib_write(gpibDevice, falpha) == 0) { -					sprintf(falpha,"DATA:STOP 65535"); +					sprintf(falpha,"DATA:STOP %d", SCOPE_TRACE_MAX_POINTS-1);  					#ifdef ENABLE_EXTRA_DEBUGGING  					printf("[DEBG] Writing: %s\n\r", falpha);  					#endif @@ -841,7 +843,7 @@ clock_gettime(CLOCK_REALTIME, &tp1);  		if (gpib_write(gpibDevice, falpha) != 0) {  			return -1;  		} -		sprintf(falpha,"DATA:STOP 65535"); +		sprintf(falpha,"DATA:STOP %d", SCOPE_TRACE_MAX_POINTS-1);  		#ifdef ENABLE_EXTRA_DEBUGGING  		printf("[DEBG] Writing: %s\n\r", falpha);  		#endif @@ -915,9 +917,9 @@ clock_gettime(CLOCK_REALTIME, &tp5);  printf("[PROFILE] %f s\n\r", ((tp5.tv_nsec+(tp5.tv_sec*1e9))-(tp4.tv_nsec+(tp4.tv_sec*1e9)))/1e9);  #endif  						#ifdef ENABLE_EXTRA_DEBUGGING -						printf("[DEBG] Trying to read %i bytes from GPIB device...\n", 65535*2); +						printf("[DEBG] Trying to read %i bytes from GPIB device...\n", (SCOPE_TRACE_MAX_POINTS-1)*2);  						#endif -						ai = gpib_read_array(gpibDevice, 65535*2, scope_segarray); +						ai = gpib_read_array(gpibDevice, (SCOPE_TRACE_MAX_POINTS-1)*2, scope_segarray);  						if (ai == -1) {  							return -1;  						} @@ -1083,7 +1085,7 @@ int scope_get_channel_seconds_div(double * retval, int desired_channel, const ch  			return 2;  		} -		sprintf(falpha,"DATA:STOP 65535"); +		sprintf(falpha,"DATA:STOP %d", SCOPE_TRACE_MAX_POINTS-1);  		#ifdef ENABLE_EXTRA_DEBUGGING  		printf("[DEBG] Writing: %s\n\r", falpha);  		#endif @@ -1177,7 +1179,7 @@ int scope_get_channel_sample_count(unsigned long * retval, int desired_channel,  			return 2;  		} -		sprintf(falpha,"DATA:STOP 65535"); +		sprintf(falpha,"DATA:STOP %d", SCOPE_TRACE_MAX_POINTS-1);  		#ifdef ENABLE_EXTRA_DEBUGGING  		printf("[DEBG] Writing: %s\n\r", falpha);  		#endif  | 
