From 23eadbf9246280ce6473a4fe4d3605cd730eb8c8 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 18 Jul 2012 16:33:39 -0500 Subject: Add channel controls to scope --- servers/gpib_server_lin/src/gpib_conn.cpp | 30 ++++++++- servers/gpib_server_lin/src/scope_functions.cpp | 86 ++++++++++++++++++++++++- servers/gpib_server_lin/src/scope_functions.h | 6 +- 3 files changed, 116 insertions(+), 6 deletions(-) (limited to 'servers/gpib_server_lin') diff --git a/servers/gpib_server_lin/src/gpib_conn.cpp b/servers/gpib_server_lin/src/gpib_conn.cpp index b46f469..dc081a3 100644 --- a/servers/gpib_server_lin/src/gpib_conn.cpp +++ b/servers/gpib_server_lin/src/gpib_conn.cpp @@ -313,7 +313,7 @@ void GPIBSocket::commandLoop() { else if (m_instrumentCommand == "SETVOLTSDIV") { // Want to change volts per division TQ_INT32 value1; ds >> value1; - float value2; + double value2; ds >> value2; if (scope_set_volts_div(value1, value2, m_serverParent->m_scopeType.ascii(), m_serverParent->m_scopeDeviceSocket) == 0) { ds << TQString("ACK"); @@ -507,6 +507,34 @@ void GPIBSocket::commandLoop() { writeEndOfFrame(); } } + else if (m_instrumentCommand == "GETPERMITTEDVDIVS") { // Want to get permitted volts/div settings + double attenuation_mult; + double* permitted_array; + int permitted_count; + TQ_INT32 value; + ds >> value; + if (scope_get_probe_attenuation_multiplier(&attenuation_mult, value, m_serverParent->m_scopeType.ascii(), m_serverParent->m_scopeDeviceSocket) == 0) { + if (scope_get_permitted_volts_div_settings_at_1x(&permitted_count, &permitted_array, m_serverParent->m_scopeType.ascii(), m_serverParent->m_scopeDeviceSocket) == 0) { + long i; + TQDoubleList permittedValues; + for (i=0; i