diff --git a/src/Arduino_MCHPTouch.cpp b/src/Arduino_MCHPTouch.cpp index 5addc90..10ebaa5 100644 --- a/src/Arduino_MCHPTouch.cpp +++ b/src/Arduino_MCHPTouch.cpp @@ -32,6 +32,9 @@ bool QtouchClass::begin() // set starting measure time to 0 and change the analog resolution to 10 touch_time.current_time_ms = 0; analogReadResolution(10); + if (DEF_TOUCH_DATA_STREAMER_ENABLE == 1) { + Serial1.begin(115200); + } return true; } @@ -61,7 +64,7 @@ void QtouchClass::poll() { // set time flag to 1 and starting time millis() touch_time.time_to_measure_touch = 1; - touch_time.current_time_ms = touch_time.current_time_ms + millis(); + touch_time.current_time_ms = millis();// touch_time.current_time_ms + millis(); // trigger a new measure touch_sensors_measure(); diff --git a/src/Arduino_MCHPTouch.h b/src/Arduino_MCHPTouch.h index 0607b11..1090f54 100644 --- a/src/Arduino_MCHPTouch.h +++ b/src/Arduino_MCHPTouch.h @@ -11,7 +11,7 @@ #include #include "touch_api_SAMD.h" - +#include "DataStreamer.h" class QtouchClass { diff --git a/src/DataStreamer.cpp b/src/DataStreamer.cpp new file mode 100644 index 0000000..064549e --- /dev/null +++ b/src/DataStreamer.cpp @@ -0,0 +1,135 @@ +/* This source file is part of the ATMEL QTouch Library 5.0.1 */ +/* Software provided by Microchip under the license agreement + “Microchip Touch Library License Agreement - Arduino 082420 + (part of this downloaded package) */ + +/** + * + * \file + * + * \brief This file contains the SAMD QTouch library initialization, + * sensor configuration and measurement routines. + * + * - Userguide: QTouch Library Peripheral Touch Controller User Guide. + * - Support: https://www.microchip.com/support/ + * + * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries. + * + * \asf_license_start + * + * \page License + * + * Subject to your compliance with these terms, you may use Microchip + * software and any derivatives exclusively with Microchip products. + * It is your responsibility to comply with third party license terms applicable + * to your use of third party software (including open source software) that + * may accompany Microchip software. + * + * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, + * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, + * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, + * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE + * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL + * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE + * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE + * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT + * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY + * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + * \asf_license_stop + * + */ + +/*---------------------------------------------------------------------------- + include files +----------------------------------------------------------------------------*/ +#include +#include "DataStreamer.h" +#include "touch_api_SAMD.h" + +#if (DEF_TOUCH_DATA_STREAMER_ENABLE == 1u) + +/*---------------------------------------------------------------------------- + * defines + *----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- + global variables +----------------------------------------------------------------------------*/ +extern qtm_acquisition_control_t qtlib_acq_set1; +extern qtm_touch_key_control_t qtlib_key_set1; +extern qtm_touch_key_config_t qtlib_key_configs_set1[DEF_SELFCAP_NUM_SENSORS]; + +extern uint8_t module_error_code; + +/*---------------------------------------------------------------------------- + prototypes +----------------------------------------------------------------------------*/ + + +/*============================================================================ +void datastreamer_output(void) +------------------------------------------------------------------------------ +Purpose: Forms the datastreamer frame based on the configured modules, Tranmits + the frame as single packet through UART port. +Input : none +Output : none +Notes : +============================================================================*/ +void DataStreamer::datastreamerOutput(void) +{ + touch_time.time_to_measure_touch = 1; + touch_time.current_time_ms = millis();// touch_time.current_time_ms + millis(); + + // trigger a new measure + touch_sensors_measure(); + + // check if a measure is done + if ((p_selfcap_measure_data->measurement_done_touch == 1u)) + { + p_selfcap_measure_data->measurement_done_touch == 0u; + } + + int16_t temp_int_calc; + uint16_t u16temp_output; + uint8_t u8temp_output; + volatile uint16_t count_bytes_out; + + + // Frame Start + for (count_bytes_out = 0u; count_bytes_out < 5; count_bytes_out++) { + /* Signals */ + u16temp_output = get_sensor_node_signal(count_bytes_out); + + + /* Reference */ + u16temp_output = get_sensor_node_reference(count_bytes_out); + + + /* Touch delta */ + temp_int_calc = get_sensor_node_signal(count_bytes_out); + temp_int_calc -= get_sensor_node_reference(count_bytes_out); + u16temp_output = (uint16_t)(temp_int_calc); + + Serial.print("touch_"+String(count_bytes_out) + "_delta:"); + Serial.print(temp_int_calc); + Serial.print(" "); + /* Comp Caps */ + u16temp_output = get_sensor_cc_val(count_bytes_out); + + + + /* State */ + u8temp_output = get_sensor_state(count_bytes_out); + /* Threshold */ + + + Serial.print("threshold:"); + Serial.print(p_selfcap_measure_data->p_sensors[count_bytes_out].threshold); + Serial.print(" "); + } + Serial.println(); +} + +#endif diff --git a/src/DataStreamer.h b/src/DataStreamer.h new file mode 100644 index 0000000..fbb707f --- /dev/null +++ b/src/DataStreamer.h @@ -0,0 +1,72 @@ +/* This source file is part of the ATMEL QTouch Library 5.0.1 */ +/* Software provided by Microchip under the license agreement + “Microchip Touch Library License Agreement - Arduino 082420 + (part of this downloaded package) */ + +/** + * + * \file + * + * \brief This file contains the SAMD QTouch library initialization, + * sensor configuration and measurement routines. + * + * - Userguide: QTouch Library Peripheral Touch Controller User Guide. + * - Support: https://www.microchip.com/support/ + * + * Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries. + * + * \asf_license_start + * + * \page License + * + * Subject to your compliance with these terms, you may use Microchip + * software and any derivatives exclusively with Microchip products. + * It is your responsibility to comply with third party license terms applicable + * to your use of third party software (including open source software) that + * may accompany Microchip software. + * + * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, + * WHETHER EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, + * INCLUDING ANY IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, + * AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL MICROCHIP BE + * LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, INCIDENTAL OR CONSEQUENTIAL + * LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND WHATSOEVER RELATED TO THE + * SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS BEEN ADVISED OF THE + * POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE FULLEST EXTENT + * ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS IN ANY WAY + * RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF ANY, + * THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE. + * + * \asf_license_stop + * + */ + +#ifndef __DATASTREAMER_H_ +#define __DATASTREAMER_H_ + +/*---------------------------------------------------------------------------- + * include files + *----------------------------------------------------------------------------*/ +#include "Arduino.h" +#include "touch_config_samd.h" + + + +//#if (DEF_TOUCH_DATA_STREAMER_ENABLE == 1u) + +/*---------------------------------------------------------------------------- + * defines + *----------------------------------------------------------------------------*/ + +/*---------------------------------------------------------------------------- + * prototypes + *----------------------------------------------------------------------------*/ + +class DataStreamer { + public: + void datastreamerOutput(void); +}; +//extern +//#endif + +#endif diff --git a/src/datastreamer/03EB00000000000000AA5501.db b/src/datastreamer/03EB00000000000000AA5501.db new file mode 100644 index 0000000..f845abb --- /dev/null +++ b/src/datastreamer/03EB00000000000000AA5501.db @@ -0,0 +1,1449 @@ + + + +5,5,0,0,Prescaler,0,[[0], [0], [' ']],[],[] + + + + + + + + + + + +{ +0, +'Q', 'T', 'o', 'u', 'c', 'h', ' ', 'D', 'a', 't', 'a', ' ','V', 'i', 's', 'u', 'a', 'l', 'i', 'z', 'e', 'r','\0', +0, 255, 255, 255, +200, 6, +}; + +{ +0, // Dashboard ID +0, // Element ID +DB_TYPE_TAB, // Element Type +1-BasicData,2-Graph,3-AdvanceData,4-AllData, +1800 +}; + + + + + + + + + + + + + + + + + + + + + +{ +0:0:4, // Dashboard ID +25, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +0, 0, // Y-coordinate +1200, 0, // Width +30, 0, // Height +14, // Font Size +3, +0, // Horizontal Alignment +1, // Vertical Alignment +126, 255, 255, 255, // Background Color +255, 0, 0, 255, // Foreground Color +'Q','T','o','u','c','h',' ','M','o','d','u','l','a','r',' ','L','i','b','r','a','r','y',' ','U','s','e','r',' ','G','u','i','d','e',':',' ','w','w','w','.','m','i','c','r','o','c','h','i','p','.','c','o','m','\0', // Text +}; + + + +{ +0:0:4, // Dashboard ID +26, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +35, 0, // Y-coordinate +1200, 0, // Width +30, 0, // Height +14, // Font Size +3, +0, // Horizontal Alignment +1, // Vertical Alignment +126, 255, 255, 255, // Background Color +255, 0, 0, 255, // Foreground Color +'G','l','o','s','s','a','r','y',':',' ','w','w','w','.','m','i','c','r','o','c','h','i','p','.','c','o','m','\0', // Text +}; + + + + + +{ +0:0:1, // Dashboard ID +27, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +0, 0, // Y-coordinate +625, 0, // Width +30, 0, // Height +14, // Font Size +3, +1, // Horizontal Alignment +1, // Vertical Alignment +77, 77, 77, 77, // Background Color +255, 0, 0, 0, // Foreground Color +'B','u','t','t','o','n',' ','D','a','t','a','\0', // Text +}; + +{ +0:0:4, // Dashboard ID +28, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +70, 0, // Y-coordinate +625, 0, // Width +30, 0, // Height +14, // Font Size +3, +1, // Horizontal Alignment +1, // Vertical Alignment +77, 77, 77, 77, // Background Color +255, 0, 0, 0, // Foreground Color +'B','u','t','t','o','n',' ','D','a','t','a','\0', // Text +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [] + + { +0:0:1, // Dashboard ID +29, // Element ID +DB_TYPE_TABLE, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +35, 0, // Y-coordinate +250, 0, // Width +150, 0, // Height +12, // Data Font Size +12, // Label Font Size +125,0, // Data Column Width +125,0, // Label Column Width +30,0, // Row Height +1, // Number of Rows +2, // Number of Columns +0, // AutoLabels +'0',':','0',':','C','h','a','n','n','e','l',' ','I','D',';','1',':','0',':','S','e','n','s','o','r',' ','T','y','p','e',';','\0', // Text +4, +0, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +1, // Label Horizontal Alignment +1, // Data Horizontal Alignment +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + { +0:0:1, // Dashboard ID +30, // Element ID +DB_TYPE_TABLE, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +65, 0, // Y-coordinate +250, 0, // Width +150, 0, // Height +12, // Data Font Size +12, // Label Font Size +125,0, // Data Column Width +125,0, // Label Column Width +30,0, // Row Height +5, // Number of Rows +2, // Number of Columns +0, // AutoLabels +'0',':','0',':','0',';','1',':','0',':','B','u','t','t','o','n',' ','0',';','0',':','1',':','1',';','1',':','1',':','B','u','t','t','o','n',' ','1',';','0',':','2',':','2',';','1',':','2',':','B','u','t','t','o','n',' ','2',';','0',':','3',':','3',';','1',':','3',':','B','u','t','t','o','n',' ','3',';','0',':','4',':','4',';','1',':','4',':','B','u','t','t','o','n',' ','4',';','\0', // Text +4, +0, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +1, // Label Horizontal Alignment +1, // Data Horizontal Alignment +}; + + + + + + + + + + + + + + + + + + + + + + + + + [] + + { +0:0:4, // Dashboard ID +31, // Element ID +DB_TYPE_TABLE, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +105, 0, // Y-coordinate +250, 0, // Width +150, 0, // Height +12, // Data Font Size +12, // Label Font Size +125,0, // Data Column Width +125,0, // Label Column Width +30,0, // Row Height +1, // Number of Rows +2, // Number of Columns +0, // AutoLabels +'0',':','0',':','C','h','a','n','n','e','l',' ','I','D',';','1',':','0',':','S','e','n','s','o','r',' ','T','y','p','e',';','\0', // Text +4, +0, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +1, // Label Horizontal Alignment +1, // Data Horizontal Alignment +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + { +0:0:4, // Dashboard ID +32, // Element ID +DB_TYPE_TABLE, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +135, 0, // Y-coordinate +250, 0, // Width +150, 0, // Height +12, // Data Font Size +12, // Label Font Size +125,0, // Data Column Width +125,0, // Label Column Width +30,0, // Row Height +5, // Number of Rows +2, // Number of Columns +0, // AutoLabels +'0',':','0',':','0',';','1',':','0',':','B','u','t','t','o','n',' ','0',';','0',':','1',':','1',';','1',':','1',':','B','u','t','t','o','n',' ','1',';','0',':','2',':','2',';','1',':','2',':','B','u','t','t','o','n',' ','2',';','0',':','3',':','3',';','1',':','3',':','B','u','t','t','o','n',' ','3',';','0',':','4',':','4',';','1',':','4',':','B','u','t','t','o','n',' ','4',';','\0', // Text +4, +0, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +1, // Label Horizontal Alignment +1, // Data Horizontal Alignment +}; + + + + + + + + + + + + +{ +0:0:1, // Dashboard ID +33, // Element ID +DB_TYPE_TABLE, // Element Type +0, // Z-Index (GUI stack order) +250, 0, // X-coordinate +35, 0, // Y-coordinate +375, 0, // Width +30, 0, // Height +12, // Data Font Size +12, // Label Font Size +125,0, // Data Column Width +125,0, // Label Column Width +30,0, // Row Height +1, // Number of Rows +3, // Number of Columns +0, // AutoLabels +'0',':','0',':','S','t','a','t','e',';','1',':','0',':','D','e','l','t','a',';','2',':','0',':','T','h','r','e','s','h','o','l','d',';','\0', // Text +4, +0, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +1, // Label Horizontal Alignment +1, // Data Horizontal Alignment +}; + + + + + + + + + + +{ +0:0:4, // Dashboard ID +34, // Element ID +DB_TYPE_TABLE, // Element Type +0, // Z-Index (GUI stack order) +250, 0, // X-coordinate +105, 0, // Y-coordinate +375, 0, // Width +30, 0, // Height +12, // Data Font Size +12, // Label Font Size +125,0, // Data Column Width +125,0, // Label Column Width +30,0, // Row Height +1, // Number of Rows +3, // Number of Columns +0, // AutoLabels +'0',':','0',':','S','t','a','t','e',';','1',':','0',':','D','e','l','t','a',';','2',':','0',':','T','h','r','e','s','h','o','l','d',';','\0', // Text +4, +0, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +1, // Label Horizontal Alignment +1, // Data Horizontal Alignment +}; + + + + + +{ +0:0:1, // Dashboard ID +0, // Element ID +DB_TYPE_TABLE, // Element Type +0, // Z-Index (GUI stack order) +250, 0, // X-coordinate +65, 0, // Y-coordinate +375, 0, // Width +150, 0, // Height +12, // Data Font Size +12, // Label Font Size +125,0, // Data Column Width +125,0, // Label Column Width +30,0, // Row Height +5, // Number of Rows +3, // Number of Columns +0, // AutoLabels +'\0', // Text +4, +0, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +1, // Label Horizontal Alignment +1, // Data Horizontal Alignment +}; + +{ +0:0:4, // Dashboard ID +1, // Element ID +DB_TYPE_TABLE, // Element Type +0, // Z-Index (GUI stack order) +250, 0, // X-coordinate +135, 0, // Y-coordinate +375, 0, // Width +150, 0, // Height +12, // Data Font Size +12, // Label Font Size +125,0, // Data Column Width +125,0, // Label Column Width +30,0, // Row Height +5, // Number of Rows +3, // Number of Columns +0, // AutoLabels +'\0', // Text +4, +0, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +1, // Label Horizontal Alignment +1, // Data Horizontal Alignment +}; + + + + + + + + + + + +{ +0:0:1, // Dashboard ID +2, // Element ID +DB_TYPE_SIGNAL, // Element Type +0, // Z-Index (GUI stack order) +250, 0, // X-coordinate +65, 0, // Y-coordinate +125, 0, // Width +30, 0, // Height +128, 0, 255, 0, // Color On +128, 255, 0, 0, // Color Off +}; + +{ +0:0:1, // Dashboard ID +3, // Element ID +DB_TYPE_SIGNAL, // Element Type +0, // Z-Index (GUI stack order) +250, 0, // X-coordinate +95, 0, // Y-coordinate +125, 0, // Width +30, 0, // Height +128, 0, 255, 0, // Color On +128, 255, 0, 0, // Color Off +}; + +{ +0:0:1, // Dashboard ID +4, // Element ID +DB_TYPE_SIGNAL, // Element Type +0, // Z-Index (GUI stack order) +250, 0, // X-coordinate +125, 0, // Y-coordinate +125, 0, // Width +30, 0, // Height +128, 0, 255, 0, // Color On +128, 255, 0, 0, // Color Off +}; + +{ +0:0:1, // Dashboard ID +5, // Element ID +DB_TYPE_SIGNAL, // Element Type +0, // Z-Index (GUI stack order) +250, 0, // X-coordinate +155, 0, // Y-coordinate +125, 0, // Width +30, 0, // Height +128, 0, 255, 0, // Color On +128, 255, 0, 0, // Color Off +}; + +{ +0:0:1, // Dashboard ID +6, // Element ID +DB_TYPE_SIGNAL, // Element Type +0, // Z-Index (GUI stack order) +250, 0, // X-coordinate +185, 0, // Y-coordinate +125, 0, // Width +30, 0, // Height +128, 0, 255, 0, // Color On +128, 255, 0, 0, // Color Off +}; + + + +{ +0:0:4, // Dashboard ID +7, // Element ID +DB_TYPE_SIGNAL, // Element Type +0, // Z-Index (GUI stack order) +250, 0, // X-coordinate +135, 0, // Y-coordinate +125, 0, // Width +30, 0, // Height +128, 0, 255, 0, // Color On +128, 255, 0, 0, // Color Off +}; + +{ +0:0:4, // Dashboard ID +8, // Element ID +DB_TYPE_SIGNAL, // Element Type +0, // Z-Index (GUI stack order) +250, 0, // X-coordinate +165, 0, // Y-coordinate +125, 0, // Width +30, 0, // Height +128, 0, 255, 0, // Color On +128, 255, 0, 0, // Color Off +}; + +{ +0:0:4, // Dashboard ID +9, // Element ID +DB_TYPE_SIGNAL, // Element Type +0, // Z-Index (GUI stack order) +250, 0, // X-coordinate +195, 0, // Y-coordinate +125, 0, // Width +30, 0, // Height +128, 0, 255, 0, // Color On +128, 255, 0, 0, // Color Off +}; + +{ +0:0:4, // Dashboard ID +10, // Element ID +DB_TYPE_SIGNAL, // Element Type +0, // Z-Index (GUI stack order) +250, 0, // X-coordinate +225, 0, // Y-coordinate +125, 0, // Width +30, 0, // Height +128, 0, 255, 0, // Color On +128, 255, 0, 0, // Color Off +}; + +{ +0:0:4, // Dashboard ID +11, // Element ID +DB_TYPE_SIGNAL, // Element Type +0, // Z-Index (GUI stack order) +250, 0, // X-coordinate +255, 0, // Y-coordinate +125, 0, // Width +30, 0, // Height +128, 0, 255, 0, // Color On +128, 255, 0, 0, // Color Off +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +{ +0:0:2, // Dashboard ID +12, // Element ID +DB_TYPE_GRAPH, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +0, 0, // Y-coordinate +1200, 0, // Width +500, 0, // Height +255, 255, 255, // Title color +0, 0, 0, // Background color +20, 20, 20, // Graph background color +'Q', 'T', 'o', 'u', 'c', 'h', ' ', 'G', 'r', 'a', 'p', 'h','\0', // Title +20, // Number of plots +0,0,0,0, // X Minimum +0,0,32,65, // X Maximum +0,0,0,0, // Y Minimum +0,0,32,65, // Y Maximum +5, +1, +}; + +{ +0:0:4, // Dashboard ID +13, // Element ID +DB_TYPE_GRAPH, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +325, 0, // Y-coordinate +1200, 0, // Width +500, 0, // Height +255, 255, 255, // Title color +0, 0, 0, // Background color +20, 20, 20, // Graph background color +'Q', 'T', 'o', 'u', 'c', 'h', ' ', 'G', 'r', 'a', 'p', 'h','\0', // Title +20, // Number of plots +0,0,0,0, // X Minimum +0,0,32,65, // X Maximum +0,0,0,0, // Y Minimum +0,0,32,65, // Y Maximum +5, +1, +}; + + + + + + + + + +{ +0:0:2, // Dashboard ID +35, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +575, 0, // Y-coordinate +500, 0, // Width +30, 0, // Height +12, // Font Size +3, +0, // Horizontal Alignment +1, // Vertical Alignment +126, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +'*',' ','V','e','r','t','i','a','l',' ','Z','o','o','m',':',' ','C','t','r','l',' ','K','e','y',' ','+',' ','M','o','u','s','e',' ','S','c','r','o','l','l',' ','(','u','n','c','h','e','c','k',' ','"','A','u','t','o','m','a','t','i','c','a','l','l','y',' ','f','i','t',' ','Y','"',' ','o','p','t','i','o','n',')','.','\0', // Text +}; + +{ +0:0:4, // Dashboard ID +36, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +900, 0, // Y-coordinate +500, 0, // Width +30, 0, // Height +12, // Font Size +3, +0, // Horizontal Alignment +1, // Vertical Alignment +126, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +'*',' ','V','e','r','t','i','a','l',' ','Z','o','o','m',':',' ','C','t','r','l',' ','K','e','y',' ','+',' ','M','o','u','s','e',' ','S','c','r','o','l','l',' ','(','u','n','c','h','e','c','k',' ','"','A','u','t','o','m','a','t','i','c','a','l','l','y',' ','f','i','t',' ','Y','"',' ','o','p','t','i','o','n',')','.','\0', // Text +}; + + + +{ +0:0:2, // Dashboard ID +37, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +500, 0, // X-coordinate +575, 0, // Y-coordinate +300, 0, // Width +30, 0, // Height +12, // Font Size +3, +0, // Horizontal Alignment +1, // Vertical Alignment +126, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +'*',' ','H','o','r','i','z','o','n','t','a','l',' ','Z','o','o','m',':',' ','L','e','f','t','-','S','h','i','f','t',' ','K','e','y',' ','+',' ','M','o','u','s','e',' ','S','c','r','o','l','l','.','\0', // Text +}; + +{ +0:0:4, // Dashboard ID +38, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +500, 0, // X-coordinate +900, 0, // Y-coordinate +300, 0, // Width +30, 0, // Height +12, // Font Size +3, +0, // Horizontal Alignment +1, // Vertical Alignment +126, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +'*',' ','H','o','r','i','z','o','n','t','a','l',' ','Z','o','o','m',':',' ','L','e','f','t','-','S','h','i','f','t',' ','K','e','y',' ','+',' ','M','o','u','s','e',' ','S','c','r','o','l','l','.','\0', // Text +}; + + + +{ +0:0:2, // Dashboard ID +39, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +800, 0, // X-coordinate +575, 0, // Y-coordinate +300, 0, // Width +30, 0, // Height +12, // Font Size +3, +0, // Horizontal Alignment +1, // Vertical Alignment +126, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +'*',' ','C','l','i','c','k',' ','o','n',' ','"','L','e','g','e','n','d','"',' ','t','o',' ','e','n','a','b','l','e',' ','o','r',' ','d','i','s','a','b','l','e',' ','p','l','o','t','.','\0', // Text +}; + +{ +0:0:4, // Dashboard ID +40, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +800, 0, // X-coordinate +900, 0, // Y-coordinate +300, 0, // Width +30, 0, // Height +12, // Font Size +3, +0, // Horizontal Alignment +1, // Vertical Alignment +126, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +'*',' ','C','l','i','c','k',' ','o','n',' ','"','L','e','g','e','n','d','"',' ','t','o',' ','e','n','a','b','l','e',' ','o','r',' ','d','i','s','a','b','l','e',' ','p','l','o','t','.','\0', // Text +}; + + + + + + + + + + + + +{ +0:0:3, // Dashboard ID +41, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +0, 0, // Y-coordinate +750, 0, // Width +30, 0, // Height +14, // Font Size +3, +1, // Horizontal Alignment +1, // Vertical Alignment +77, 77, 77, 77, // Background Color +255, 0, 0, 0, // Foreground Color +'S','e','n','s','o','r',' ','D','a','t','a','\0', // Text +}; + + +{ +0:0:4, // Dashboard ID +42, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +960, 0, // Y-coordinate +750, 0, // Width +30, 0, // Height +14, // Font Size +3, +1, // Horizontal Alignment +1, // Vertical Alignment +77, 77, 77, 77, // Background Color +255, 0, 0, 0, // Foreground Color +'S','e','n','s','o','r',' ','D','a','t','a','\0', // Text +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + [] + + { +0:0:3, // Dashboard ID +43, // Element ID +DB_TYPE_TABLE, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +35, 0, // Y-coordinate +250, 0, // Width +150, 0, // Height +12, // Data Font Size +12, // Label Font Size +125,0, // Data Column Width +125,0, // Label Column Width +30,0, // Row Height +1, // Number of Rows +2, // Number of Columns +0, // AutoLabels +'0',':','0',':','C','h','a','n','n','e','l',' ','I','D',';','1',':','0',':','S','e','n','s','o','r',' ','T','y','p','e',';','\0', // Text +4, +0, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +1, // Label Horizontal Alignment +1, // Data Horizontal Alignment +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + { +0:0:3, // Dashboard ID +44, // Element ID +DB_TYPE_TABLE, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +65, 0, // Y-coordinate +250, 0, // Width +150, 0, // Height +12, // Data Font Size +12, // Label Font Size +125,0, // Data Column Width +125,0, // Label Column Width +30,0, // Row Height +5, // Number of Rows +2, // Number of Columns +0, // AutoLabels +'0',':','0',':','0',';','1',':','0',':','B','u','t','t','o','n',' ','0',';','0',':','1',':','1',';','1',':','1',':','B','u','t','t','o','n',' ','1',';','0',':','2',':','2',';','1',':','2',':','B','u','t','t','o','n',' ','2',';','0',':','3',':','3',';','1',':','3',':','B','u','t','t','o','n',' ','3',';','0',':','4',':','4',';','1',':','4',':','B','u','t','t','o','n',' ','4',';','\0', // Text +4, +0, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +1, // Label Horizontal Alignment +1, // Data Horizontal Alignment +}; + + + + + + + + + + + + + + + + + + + + + + + + + [] + + { +0:0:4, // Dashboard ID +45, // Element ID +DB_TYPE_TABLE, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +995, 0, // Y-coordinate +250, 0, // Width +150, 0, // Height +12, // Data Font Size +12, // Label Font Size +125,0, // Data Column Width +125,0, // Label Column Width +30,0, // Row Height +1, // Number of Rows +2, // Number of Columns +0, // AutoLabels +'0',':','0',':','C','h','a','n','n','e','l',' ','I','D',';','1',':','0',':','S','e','n','s','o','r',' ','T','y','p','e',';','\0', // Text +4, +0, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +1, // Label Horizontal Alignment +1, // Data Horizontal Alignment +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + { +0:0:4, // Dashboard ID +46, // Element ID +DB_TYPE_TABLE, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +1025, 0, // Y-coordinate +250, 0, // Width +150, 0, // Height +12, // Data Font Size +12, // Label Font Size +125,0, // Data Column Width +125,0, // Label Column Width +30,0, // Row Height +5, // Number of Rows +2, // Number of Columns +0, // AutoLabels +'0',':','0',':','0',';','1',':','0',':','B','u','t','t','o','n',' ','0',';','0',':','1',':','1',';','1',':','1',':','B','u','t','t','o','n',' ','1',';','0',':','2',':','2',';','1',':','2',':','B','u','t','t','o','n',' ','2',';','0',':','3',':','3',';','1',':','3',':','B','u','t','t','o','n',' ','3',';','0',':','4',':','4',';','1',':','4',':','B','u','t','t','o','n',' ','4',';','\0', // Text +4, +0, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +1, // Label Horizontal Alignment +1, // Data Horizontal Alignment +}; + + + + + + + + + + + + + +{ +0:0:3, // Dashboard ID +47, // Element ID +DB_TYPE_TABLE, // Element Type +0, // Z-Index (GUI stack order) +250, 0, // X-coordinate +35, 0, // Y-coordinate +500, 0, // Width +30, 0, // Height +12, // Data Font Size +12, // Label Font Size +125,0, // Data Column Width +125,0, // Label Column Width +30,0, // Row Height +1, // Number of Rows +4, // Number of Columns +0, // AutoLabels +'0',':','0',':','S','i','g','n','a','l',';','1',':','0',':','R','e','f','e','r','e','n','c','e',';','2',':','0',':','D','e','l','t','a',';','3',':','0',':','C','o','m','p','e','n','s','a','t','i','o','n',' ','p','F',';','\0', // Text +4, +0, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +1, // Label Horizontal Alignment +1, // Data Horizontal Alignment +}; + + + + + + + + + + + + +{ +0:0:4, // Dashboard ID +48, // Element ID +DB_TYPE_TABLE, // Element Type +0, // Z-Index (GUI stack order) +250, 0, // X-coordinate +995, 0, // Y-coordinate +500, 0, // Width +30, 0, // Height +12, // Data Font Size +12, // Label Font Size +125,0, // Data Column Width +125,0, // Label Column Width +30,0, // Row Height +1, // Number of Rows +4, // Number of Columns +0, // AutoLabels +'0',':','0',':','S','i','g','n','a','l',';','1',':','0',':','R','e','f','e','r','e','n','c','e',';','2',':','0',':','D','e','l','t','a',';','3',':','0',':','C','o','m','p','e','n','s','a','t','i','o','n',' ','p','F',';','\0', // Text +4, +0, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +1, // Label Horizontal Alignment +1, // Data Horizontal Alignment +}; + + + + +{ +0:0:3, // Dashboard ID +14, // Element ID +DB_TYPE_TABLE, // Element Type +0, // Z-Index (GUI stack order) +250, 0, // X-coordinate +65, 0, // Y-coordinate +700, 0, // Width +150, 0, // Height +12, // Data Font Size +12, // Label Font Size +125,0, // Data Column Width +125,0, // Label Column Width +30,0, // Row Height +5, // Number of Rows +4, // Number of Columns +0, // AutoLabels +'\0', // Text +4, +0, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +1, // Label Horizontal Alignment +1, // Data Horizontal Alignment +}; + + + +{ +0:0:4, // Dashboard ID +15, // Element ID +DB_TYPE_TABLE, // Element Type +0, // Z-Index (GUI stack order) +250, 0, // X-coordinate +1025, 0, // Y-coordinate +700, 0, // Width +150, 0, // Height +12, // Data Font Size +12, // Label Font Size +125,0, // Data Column Width +125,0, // Label Column Width +30,0, // Row Height +5, // Number of Rows +4, // Number of Columns +0, // AutoLabels +'\0', // Text +4, +0, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +1, // Label Horizontal Alignment +1, // Data Horizontal Alignment +}; + + + + + + + + + + +{ +0:0:3, // Dashboard ID +49, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +215, 0, // Y-coordinate +800, 0, // Width +25, 0, // Height +12, // Font Size +3, +0, // Horizontal Alignment +1, // Vertical Alignment +126, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +'C','o','m','p','e','n','s','a','t','i','o','n',':',' ','R','e','p','r','e','s','e','n','t','s',' ','P','T','C',' ','c','o','m','p','e','n','s','a','t','i','o','n',' ','c','i','r','c','u','i','t',' ','v','a','l','u','e',' ','w','h','i','c','h',' ','i','s',' ','e','q','u','i','v','a','l','e','n','t',' ','t','o',' ','s','e','n','s','o','r',' ','c','a','p','a','c','i','t','a','n','c','e','\0', // Text +}; + + +{ +0:0:4, // Dashboard ID +50, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +1175, 0, // Y-coordinate +800, 0, // Width +25, 0, // Height +12, // Font Size +3, +0, // Horizontal Alignment +1, // Vertical Alignment +126, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +'C','o','m','p','e','n','s','a','t','i','o','n',':',' ','R','e','p','r','e','s','e','n','t','s',' ','P','T','C',' ','c','o','m','p','e','n','s','a','t','i','o','n',' ','c','i','r','c','u','i','t',' ','v','a','l','u','e',' ','w','h','i','c','h',' ','i','s',' ','e','q','u','i','v','a','l','e','n','t',' ','t','o',' ','s','e','n','s','o','r',' ','c','a','p','a','c','i','t','a','n','c','e','\0', // Text +}; + + + + + +{ +0:0:3, // Dashboard ID +51, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +240, 0, // Y-coordinate +800, 0, // Width +25, 0, // Height +12, // Font Size +3, +0, // Horizontal Alignment +1, // Vertical Alignment +126, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +'"','C','o','m','p','e','n','s','t','a','t','i','o','n','"',' ','v','a','l','u','e',' ','c','a','n',' ','b','e',' ','u','s','e','d',' ','t','o',' ','c','h','e','c','k',' ','w','h','e','t','h','e','r',' ','s','e','n','s','o','r',' ','i','s',' ','s','a','t','u','r','a','t','e','d','.',' ','R','e','f','e','r',' ','t','o',' ','U','s','e','r',' ','G','u','i','d','e','\0', // Text +}; + + +{ +0:0:4, // Dashboard ID +52, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +1200, 0, // Y-coordinate +800, 0, // Width +25, 0, // Height +12, // Font Size +3, +0, // Horizontal Alignment +1, // Vertical Alignment +126, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +'"','C','o','m','p','e','n','s','t','a','t','i','o','n','"',' ','v','a','l','u','e',' ','c','a','n',' ','b','e',' ','u','s','e','d',' ','t','o',' ','c','h','e','c','k',' ','w','h','e','t','h','e','r',' ','s','e','n','s','o','r',' ','i','s',' ','s','a','t','u','r','a','t','e','d','.',' ','R','e','f','e','r',' ','t','o',' ','U','s','e','r',' ','G','u','i','d','e','\0', // Text +}; + + + + + + + + + + + + + + + + +{ +0:0:1, // Dashboard ID +53, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +265, 0, // Y-coordinate +175, 0, // Width +30, 0, // Height +14, // Font Size +3, +1, // Horizontal Alignment +1, // Vertical Alignment +77, 77, 77, 77, // Background Color +255, 0, 0, 0, // Foreground Color +'D','e','b','u','g',' ','D','a','t','a','\0', // Text +}; + + +{ +0:0:4, // Dashboard ID +54, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +1260, 0, // Y-coordinate +175, 0, // Width +30, 0, // Height +14, // Font Size +3, +1, // Horizontal Alignment +1, // Vertical Alignment +77, 77, 77, 77, // Background Color +255, 0, 0, 0, // Foreground Color +'D','e','b','u','g',' ','D','a','t','a','\0', // Text +}; + + + +{ +0:0:1, // Dashboard ID +16, // Element ID +DB_TYPE_TABLE, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +300, 0, // Y-coordinate +175, 0, // Width +150, 0, // Height +12, // Data Font Size +12, // Label Font Size +50,0, // Data Column Width +125,0, // Label Column Width +30,0, // Row Height +2, // Number of Rows +1, // Number of Columns +1, // AutoLabels +'\0', // Label Configuration +0, +0, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +0, // Label Horizontal Alignment +1, // Data Horizontal Alignment +}; + + +{ +0:0:4, // Dashboard ID +17, // Element ID +DB_TYPE_TABLE, // Element Type +0, // Z-Index (GUI stack order) +0, 0, // X-coordinate +1295, 0, // Y-coordinate +175, 0, // Width +150, 0, // Height +12, // Data Font Size +12, // Label Font Size +50,0, // Data Column Width +125,0, // Label Column Width +30,0, // Row Height +2, // Number of Rows +1, // Number of Columns +1, // AutoLabels +'\0', // Label Configuration +0, +0, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +0, // Label Horizontal Alignment +1, // Data Horizontal Alignment +}; + + + + + + + + + + +{ +0:0:1, // Dashboard ID +55, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +200, 0, // X-coordinate +300, 0, // Y-coordinate +800, 0, // Width +30, 0, // Height +12, // Font Size +3, +0, // Horizontal Alignment +1, // Vertical Alignment +126, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +'C','o','u','n','t','e','r',' ','f','o','r',' ','d','a','t','a','s','t','r','e','a','m','e','r',' ','p','a','c','k','e','t','s','.',' ',' ','M','i','s','s','i','n','g',' ','c','o','u','n','t',' ','i','n','d','i','c','a','t','e',' ','p','a','c','k','e','t',' ','d','r','o','p','\0', // Text +}; + + +{ +0:0:4, // Dashboard ID +56, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +200, 0, // X-coordinate +1295, 0, // Y-coordinate +800, 0, // Width +30, 0, // Height +12, // Font Size +3, +0, // Horizontal Alignment +1, // Vertical Alignment +126, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +'C','o','u','n','t','e','r',' ','f','o','r',' ','d','a','t','a','s','t','r','e','a','m','e','r',' ','p','a','c','k','e','t','s','.',' ',' ','M','i','s','s','i','n','g',' ','c','o','u','n','t',' ','i','n','d','i','c','a','t','e',' ','p','a','c','k','e','t',' ','d','r','o','p','\0', // Text +}; + + + + +{ +0:0:1, // Dashboard ID +57, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +200, 0, // X-coordinate +330, 0, // Y-coordinate +800, 0, // Width +30, 0, // Height +12, // Font Size +3, +0, // Horizontal Alignment +1, // Vertical Alignment +126, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +'I','n','d','i','c','a','t','e','s',' ','l','i','b','r','a','r','y',' ','e','r','r','o','r',' ','s','t','a','t','e','.',' ','Z','e','r','o',':',' ','n','o',' ','e','r','r','o','r','.',' ','R','e','f','e','r',' ','"','E','r','r','o','r',' ','C','o','d','e','"',' ','s','e','c','t','i','o','n',' ','i','n',' ','U','s','e','r',' ','G','u','i','d','e','\0', // Text +}; + + +{ +0:0:4, // Dashboard ID +58, // Element ID +DB_TYPE_LABEL, // Element Type +0, // Z-Index (GUI stack order) +200, 0, // X-coordinate +1325, 0, // Y-coordinate +800, 0, // Width +30, 0, // Height +12, // Font Size +3, +0, // Horizontal Alignment +1, // Vertical Alignment +126, 255, 255, 255, // Background Color +255, 0, 0, 0, // Foreground Color +'I','n','d','i','c','a','t','e','s',' ','l','i','b','r','a','r','y',' ','e','r','r','o','r',' ','s','t','a','t','e','.',' ','Z','e','r','o',':',' ','n','o',' ','e','r','r','o','r','.',' ','R','e','f','e','r',' ','"','E','r','r','o','r',' ','C','o','d','e','"',' ','s','e','c','t','i','o','n',' ','i','n',' ','U','s','e','r',' ','G','u','i','d','e','\0', // Text +}; + + + diff --git a/src/datastreamer/03EB00000000000000AA5501.ds b/src/datastreamer/03EB00000000000000AA5501.ds new file mode 100644 index 0000000..2ed6414 --- /dev/null +++ b/src/datastreamer/03EB00000000000000AA5501.ds @@ -0,0 +1,59 @@ + + + +B,1,1,FrameCounter + + + + + + + + + + + + +D,2,1,Signal0 +D,3,1,Reference0 +-D,4,1,Delta0 +D,5,1,Compensation0,F,(variable & 0x0F)*0.00675+((variable >> 4) & 0x0F)*0.0675+((variable >> 8) & 0x0F)*0.675+((variable >> 12) & 0x3) * 6.75 +B,6,1,State0 +B,7,1,Threshold0 +D,2,2,Signal1 +D,3,2,Reference1 +-D,4,2,Delta1 +D,5,2,Compensation1,F,(variable & 0x0F)*0.00675+((variable >> 4) & 0x0F)*0.0675+((variable >> 8) & 0x0F)*0.675+((variable >> 12) & 0x3) * 6.75 +B,6,2,State1 +B,7,2,Threshold1 +D,2,3,Signal2 +D,3,3,Reference2 +-D,4,3,Delta2 +D,5,3,Compensation2,F,(variable & 0x0F)*0.00675+((variable >> 4) & 0x0F)*0.0675+((variable >> 8) & 0x0F)*0.675+((variable >> 12) & 0x3) * 6.75 +B,6,3,State2 +B,7,3,Threshold2 +D,2,4,Signal3 +D,3,4,Reference3 +-D,4,4,Delta3 +D,5,4,Compensation3,F,(variable & 0x0F)*0.00675+((variable >> 4) & 0x0F)*0.0675+((variable >> 8) & 0x0F)*0.675+((variable >> 12) & 0x3) * 6.75 +B,6,4,State3 +B,7,4,Threshold3 +D,2,5,Signal4 +D,3,5,Reference4 +-D,4,5,Delta4 +D,5,5,Compensation4,F,(variable & 0x0F)*0.00675+((variable >> 4) & 0x0F)*0.0675+((variable >> 8) & 0x0F)*0.675+((variable >> 12) & 0x3) * 6.75 +B,6,5,State4 +B,7,5,Threshold4 + + + + + + + + + + +B,9,1,QTouchLibError + +B,1,2,FRAME_END diff --git a/src/datastreamer/03EB00000000000000AA5501.sc b/src/datastreamer/03EB00000000000000AA5501.sc new file mode 100644 index 0000000..c1e7d92 --- /dev/null +++ b/src/datastreamer/03EB00000000000000AA5501.sc @@ -0,0 +1,191 @@ + + + + + + + + +State0, 0 (Column:0;Row:0) +Delta0, 0 (Column:1;Row:0) +Threshold0, 0 (Column:2;Row:0) +State1, 0 (Column:0;Row:1) +Delta1, 0 (Column:1;Row:1) +Threshold1, 0 (Column:2;Row:1) +State2, 0 (Column:0;Row:2) +Delta2, 0 (Column:1;Row:2) +Threshold2, 0 (Column:2;Row:2) +State3, 0 (Column:0;Row:3) +Delta3, 0 (Column:1;Row:3) +Threshold3, 0 (Column:2;Row:3) +State4, 0 (Column:0;Row:4) +Delta4, 0 (Column:1;Row:4) +Threshold4, 0 (Column:2;Row:4) + + + + +State0, 1 (Column:0;Row:0) +Delta0, 1 (Column:1;Row:0) +Threshold0, 1 (Column:2;Row:0) +State1, 1 (Column:0;Row:1) +Delta1, 1 (Column:1;Row:1) +Threshold1, 1 (Column:2;Row:1) +State2, 1 (Column:0;Row:2) +Delta2, 1 (Column:1;Row:2) +Threshold2, 1 (Column:2;Row:2) +State3, 1 (Column:0;Row:3) +Delta3, 1 (Column:1;Row:3) +Threshold3, 1 (Column:2;Row:3) +State4, 1 (Column:0;Row:4) +Delta4, 1 (Column:1;Row:4) +Threshold4, 1 (Column:2;Row:4) + + +State0, 2 +State1, 3 +State2, 4 +State3, 5 +State4, 6 + + +State0, 7 +State1, 8 +State2, 9 +State3, 10 +State4, 11 + + + + + + + + + + + + +Signal0,12(visible:0) +Signal1,12(visible:0) +Signal2,12(visible:0) +Signal3,12(visible:0) +Signal4,12(visible:0) +Reference0,12(visible:0) +Reference1,12(visible:0) +Reference2,12(visible:0) +Reference3,12(visible:0) +Reference4,12(visible:0) +Delta0,12(visible:1) +Delta1,12(visible:1) +Delta2,12(visible:1) +Delta3,12(visible:1) +Delta4,12(visible:1) +Threshold0,12(visible:1) +Threshold1,12(visible:1) +Threshold2,12(visible:1) +Threshold3,12(visible:1) +Threshold4,12(visible:1) + + + + + +Signal0,13(visible:0) +Signal1,13(visible:0) +Signal2,13(visible:0) +Signal3,13(visible:0) +Signal4,13(visible:0) +Reference0,13(visible:0) +Reference1,13(visible:0) +Reference2,13(visible:0) +Reference3,13(visible:0) +Reference4,13(visible:0) +Delta0,13(visible:1) +Delta1,13(visible:1) +Delta2,13(visible:1) +Delta3,13(visible:1) +Delta4,13(visible:1) +Threshold0,13(visible:1) +Threshold1,13(visible:1) +Threshold2,13(visible:1) +Threshold3,13(visible:1) +Threshold4,13(visible:1) + + + + + +Signal0, 14 (Column:0;Row:0) +Reference0, 14 (Column:1;Row:0) +Delta0, 14 (Column:2;Row:0) +Compensation0, 14 (Column:3;Row:0) +State0, 14 (Column:4;Row:0) +Threshold0, 14 (Column:5;Row:0) +Signal1, 14 (Column:0;Row:1) +Reference1, 14 (Column:1;Row:1) +Delta1, 14 (Column:2;Row:1) +Compensation1, 14 (Column:3;Row:1) +State1, 14 (Column:4;Row:1) +Threshold1, 14 (Column:5;Row:1) +Signal2, 14 (Column:0;Row:2) +Reference2, 14 (Column:1;Row:2) +Delta2, 14 (Column:2;Row:2) +Compensation2, 14 (Column:3;Row:2) +State2, 14 (Column:4;Row:2) +Threshold2, 14 (Column:5;Row:2) +Signal3, 14 (Column:0;Row:3) +Reference3, 14 (Column:1;Row:3) +Delta3, 14 (Column:2;Row:3) +Compensation3, 14 (Column:3;Row:3) +State3, 14 (Column:4;Row:3) +Threshold3, 14 (Column:5;Row:3) +Signal4, 14 (Column:0;Row:4) +Reference4, 14 (Column:1;Row:4) +Delta4, 14 (Column:2;Row:4) +Compensation4, 14 (Column:3;Row:4) +State4, 14 (Column:4;Row:4) +Threshold4, 14 (Column:5;Row:4) + + + +Signal0, 15 (Column:0;Row:0) +Reference0, 15 (Column:1;Row:0) +Delta0, 15 (Column:2;Row:0) +Compensation0, 15 (Column:3;Row:0) +State0, 15 (Column:4;Row:0) +Threshold0, 15 (Column:5;Row:0) +Signal1, 15 (Column:0;Row:1) +Reference1, 15 (Column:1;Row:1) +Delta1, 15 (Column:2;Row:1) +Compensation1, 15 (Column:3;Row:1) +State1, 15 (Column:4;Row:1) +Threshold1, 15 (Column:5;Row:1) +Signal2, 15 (Column:0;Row:2) +Reference2, 15 (Column:1;Row:2) +Delta2, 15 (Column:2;Row:2) +Compensation2, 15 (Column:3;Row:2) +State2, 15 (Column:4;Row:2) +Threshold2, 15 (Column:5;Row:2) +Signal3, 15 (Column:0;Row:3) +Reference3, 15 (Column:1;Row:3) +Delta3, 15 (Column:2;Row:3) +Compensation3, 15 (Column:3;Row:3) +State3, 15 (Column:4;Row:3) +Threshold3, 15 (Column:5;Row:3) +Signal4, 15 (Column:0;Row:4) +Reference4, 15 (Column:1;Row:4) +Delta4, 15 (Column:2;Row:4) +Compensation4, 15 (Column:3;Row:4) +State4, 15 (Column:4;Row:4) +Threshold4, 15 (Column:5;Row:4) + + + +FrameCounter, 16 (Column:0;Row:0) +QTouchLibError, 16 (Column:0;Row:1) + + +FrameCounter, 17 (Column:0;Row:0) +QTouchLibError, 17 (Column:0;Row:1) + diff --git a/src/touch.c b/src/touch.c index 3c39de8..499ec96 100644 --- a/src/touch.c +++ b/src/touch.c @@ -46,7 +46,7 @@ */ #include #include "touch_api_SAMD.h" - +//#include "datastreamer/datastreamer.h" /*---------------------------------------------------------------------------- * manifest constants * ----------------------------------------------------------------------------*/ @@ -67,7 +67,9 @@ /*---------------------------------------------------------------------------- * Structure Declarations * ----------------------------------------------------------------------------*/ - +/* Node status, signal, calibration values */ +qtm_acq_node_data_t ptc_qtlib_node_stat1[DEF_SELFCAP_NUM_CHANNELS]; +qtm_touch_key_data_t qtlib_key_data_set1[DEF_SELFCAP_NUM_SENSORS]; /*---------------------------------------------------------------------------- * global variables * ----------------------------------------------------------------------------*/ @@ -90,11 +92,12 @@ touch_measure_data_t *p_selfcap_measure_data = NULL; * Default variables for the sensor config, then they are changed with * setHysteresis() , setSensitivity() and setSensitivityChannel before the init */ -unsigned int _sensitivity = 5u; -unsigned int _sensitivity_ch[5] = {5u , 5u, 5u, 5u, 5u}; +unsigned int _sensitivity = 50u; +unsigned int _sensitivity_ch[5] = {50u , 50u, 50u, 50u, 50u}; -hysteresis_t _hysteresis = HYST_50; +hysteresis_t _hysteresis = HYST_6_25; +uint8_t module_error_code = 0; /*---------------------------------------------------------------------------- * static variables * ----------------------------------------------------------------------------*/ @@ -290,10 +293,9 @@ touch_ret_t touch_sensors_init(void) */ touch_ret = touch_selfcap_sensors_calibrate(AUTO_TUNE_RSEL); if (touch_ret != TOUCH_SUCCESS) { - while (1u) { /* Check API Error return code. */ + while (1) { /* Check API Error return code. */ } } - return (touch_ret); } @@ -338,7 +340,7 @@ touch_ret_t touch_sensors_config(void) touch_ret = touch_selfcap_sensor_config(SENSOR_TYPE_KEY, CHANNEL_0, CHANNEL_0, NO_AKS_GROUP,_sensitivity_ch[0], - _hysteresis, RES_1_BIT, + HYST_6_25, RES_1_BIT, &sensor_id); if (touch_ret != TOUCH_SUCCESS) { while (1) { @@ -347,7 +349,7 @@ touch_ret = touch_selfcap_sensor_config(SENSOR_TYPE_KEY, CHANNEL_0, touch_ret = touch_selfcap_sensor_config(SENSOR_TYPE_KEY, CHANNEL_1, CHANNEL_1, NO_AKS_GROUP, _sensitivity_ch[1], - _hysteresis, RES_1_BIT, + HYST_6_25, RES_1_BIT, &sensor_id); if (touch_ret != TOUCH_SUCCESS) { while (1) { @@ -356,7 +358,7 @@ touch_ret = touch_selfcap_sensor_config(SENSOR_TYPE_KEY, CHANNEL_0, touch_ret = touch_selfcap_sensor_config(SENSOR_TYPE_KEY, CHANNEL_2, CHANNEL_2, NO_AKS_GROUP, _sensitivity_ch[2], - _hysteresis, RES_1_BIT, + HYST_6_25, RES_1_BIT, &sensor_id); if (touch_ret != TOUCH_SUCCESS) { while (1) { @@ -365,7 +367,7 @@ touch_ret = touch_selfcap_sensor_config(SENSOR_TYPE_KEY, CHANNEL_0, touch_ret = touch_selfcap_sensor_config(SENSOR_TYPE_KEY, CHANNEL_3, CHANNEL_3, NO_AKS_GROUP, _sensitivity_ch[3], - _hysteresis, RES_1_BIT, + HYST_6_25, RES_1_BIT, &sensor_id); if (touch_ret != TOUCH_SUCCESS) { while (1) { @@ -374,7 +376,7 @@ touch_ret = touch_selfcap_sensor_config(SENSOR_TYPE_KEY, CHANNEL_0, touch_ret = touch_selfcap_sensor_config(SENSOR_TYPE_KEY, CHANNEL_4, CHANNEL_4, NO_AKS_GROUP, _sensitivity_ch[4], - _hysteresis, RES_1_BIT, + HYST_6_25, RES_1_BIT, &sensor_id); if (touch_ret != TOUCH_SUCCESS) { while (1) { @@ -414,6 +416,7 @@ void setSensitivity(unsigned int newSens){ _sensitivity_ch[i] = _sensitivity; } } + void setSensitivityChannel(unsigned int newSens, unsigned int btn_channel){ _sensitivity_ch[btn_channel] = newSens; } @@ -425,3 +428,43 @@ hysteresis_t getHysteresis() { unsigned int getSensitivity() { return _sensitivity; } + +uint16_t get_sensor_node_signal(uint16_t sensor_node) +{ + return (p_selfcap_measure_data->p_channel_signals[sensor_node]); +} + +void update_sensor_node_signal(uint16_t sensor_node, uint16_t new_signal) +{ + p_selfcap_measure_data->p_channel_signals[sensor_node] = new_signal; +} + +uint16_t get_sensor_node_reference(uint16_t sensor_node) +{ + return (p_selfcap_measure_data->p_channel_references[sensor_node]); +} + +void update_sensor_node_reference(uint16_t sensor_node, uint16_t new_reference) +{ + p_selfcap_measure_data[sensor_node].p_channel_references[sensor_node] = new_reference; +} + +uint16_t get_sensor_cc_val(uint16_t sensor_node) +{ + return (p_selfcap_measure_data->p_cc_calibration_vals[sensor_node]); +} + +void update_sensor_cc_val(uint16_t sensor_node, uint16_t new_cc_value) +{ + p_selfcap_measure_data->p_cc_calibration_vals[sensor_node] = new_cc_value; +} + +uint8_t get_sensor_state(uint16_t sensor_node) +{ + return GET_SELFCAP_SENSOR_STATE(sensor_node); +} + +void update_sensor_state(uint16_t sensor_node, uint8_t new_state) +{ + p_selfcap_measure_data->p_sensor_states[sensor_node] = new_state; +} diff --git a/src/touch_api_SAMD.h b/src/touch_api_SAMD.h index 3f8a2c5..8bd4ecc 100644 --- a/src/touch_api_SAMD.h +++ b/src/touch_api_SAMD.h @@ -165,7 +165,7 @@ extern "C" /** * Max position hysteresis allowed */ -#define TOUCH_MAX_POS_HYST (20u) +#define TOUCH_MAX_POS_HYST (100u) /*---------------------------------------------------------------------------- * Mutual cap macros @@ -957,7 +957,14 @@ extern touch_measure_data_t *p_mutlcap_measure_data; /*---------------------------------------------------------------------------- * prototypes * ----------------------------------------------------------------------------*/ - +uint16_t get_sensor_node_signal(uint16_t sensor_node); +void update_sensor_node_signal(uint16_t sensor_node, uint16_t new_signal); +uint16_t get_sensor_node_reference(uint16_t sensor_node); +void update_sensor_node_reference(uint16_t sensor_node, uint16_t new_reference); +uint16_t get_sensor_cc_val(uint16_t sensor_node); +void update_sensor_cc_val(uint16_t sensor_node, uint16_t new_cc_value); +uint8_t get_sensor_state(uint16_t sensor_node); +void update_sensor_state(uint16_t sensor_node, uint8_t new_state); /*! \name Touch Helper API. */ /* ! @{ */ @@ -988,6 +995,91 @@ void setSensitivityChannel(unsigned int newSens, unsigned int btn_channel); hysteresis_t getHysteresis(); unsigned int getSensitivity(); + +/* Acquisition module SAMD21 Sequential */ + +typedef struct { + uint8_t node_acq_status; + uint16_t node_acq_signals; + uint16_t node_comp_caps; +} qtm_acq_node_data_t; + + +typedef struct { + uint16_t node_xmask; /* Selects the X Pins for this node */ + uint16_t node_ymask; /* Selects the Y Pins for this node */ + uint8_t node_rsel_prsc; /* Bits 7:4 = Resistor, Bits 3:0 Prescaler */ + uint8_t node_gain; /* Bits 7:4 = Analog gain, Bits 3:0 = Digital gain */ + uint8_t node_oversampling; /* Accumulator setting */ +} qtm_acq_samd21_node_config_t; + +/* Node run-time data - Defined in common api as it will be used with all acquisition modules */ + +/* Node group configuration */ +typedef struct { + uint16_t num_sensor_nodes; /* Number of sensor nodes */ + uint8_t acq_sensor_type; /* Self or mutual sensors */ + uint8_t calib_option_select; /* Hardware tuning: XX | TT 3/4/5 Tau | X | XX None/RSEL/PRSC/CSD */ + uint8_t freq_option_select; /* SDS or ASDV setting */ + uint8_t ptc_interrupt_priority; /* Runtime priority of PTC interrupt */ +} qtm_acq_node_group_config_t; + +/* Container structure for sensor group */ +typedef struct { + qtm_acq_node_group_config_t(*qtm_acq_node_group_config); + qtm_acq_samd21_node_config_t(*qtm_acq_node_config); + qtm_acq_node_data_t(*qtm_acq_node_data); +} qtm_acquisition_control_t; + +/* Key process module */ +/* Sensor group config */ +typedef struct { + uint16_t num_key_sensors; /* Number of sensors */ + uint8_t sensor_touch_di; /* Count in to Detect */ + uint8_t sensor_max_on_time; /* Max on duration x 200ms */ + uint8_t sensor_anti_touch_di; /* Count in to Anti-touch recal */ + uint8_t sensor_anti_touch_recal_thr; /* Anti-touch recal threshold % */ + uint8_t sensor_touch_drift_rate; /* One count per <200> ms */ + uint8_t sensor_anti_touch_drift_rate; /* One count per <200> ms */ + uint8_t sensor_drift_hold_time; /* Drift hold time */ + uint8_t sensor_reburst_mode; /* None / Unresolved / All */ +} qtm_touch_key_group_config_t; + +/* Sensor group data */ +typedef struct { + uint8_t qtm_keys_status; /* Status byte - bitfield: Bit 7 = REBURST_REQ, Bits 6:1 = Reserved, Bit 0 = Detect */ + uint16_t acq_group_timestamp; /* For tracking this group drift etc */ + uint8_t dht_count_in; /* Count of drift hold time */ + uint8_t tch_drift_count_in; /* Count of towards touch drift */ + uint8_t antitch_drift_count_in; /* Count of away from touch drift */ +} qtm_touch_key_group_data_t; + +/* Sensor keys config */ +typedef struct { + uint8_t channel_threshold; /* Touch detection threshold */ + uint8_t channel_hysteresis; /* Percentage of threshold reduction to exit detect state */ + uint8_t channel_aks_group; /* 0 = None, 1-255 = group number */ +} qtm_touch_key_config_t; + +/* ---------------------------------------------------------------------------------------- */ +/* Key sensor run-time data - api common */ +/* ---------------------------------------------------------------------------------------- */ + +typedef struct { + uint8_t sensor_state; /* Disabled, Off, On, Filter, Cal... */ + uint8_t sensor_state_counter; /* State counter */ + qtm_acq_node_data_t *node_data_struct_ptr; /* Pointer to node data structure */ + uint16_t channel_reference; /* Reference signal */ +} qtm_touch_key_data_t; + + +/* Container */ +typedef struct { + qtm_touch_key_group_data_t(*qtm_touch_key_group_data); + qtm_touch_key_group_config_t(*qtm_touch_key_group_config); + qtm_touch_key_data_t(*qtm_touch_key_data); + qtm_touch_key_config_t(*qtm_touch_key_config); +} qtm_touch_key_control_t; /* ! @} */ /*---------------------------------------------------------------------------- @@ -1241,8 +1333,4 @@ void touch_selfcap_rs_table_init(void); #ifdef __cplusplus } #endif - -/** - * \} - */ #endif /* TOUCH_API_SAMD_H */ diff --git a/src/touch_config_samd.h b/src/touch_config_samd.h index 6797731..2eae4f1 100644 --- a/src/touch_config_samd.h +++ b/src/touch_config_samd.h @@ -143,7 +143,7 @@ * power consumption and response time. Refer filter_level_t in touch_api_SAMD.h * Range: FILTER_LEVEL_1 (one sample) to FILTER_LEVEL_64 ( 64 samples). */ -#define DEF_SELFCAP_FILTER_LEVEL FILTER_LEVEL_1 /* Filter level */ +#define DEF_SELFCAP_FILTER_LEVEL FILTER_LEVEL_8 /* Filter level */ /** * Self Cap auto oversample setting. @@ -158,7 +158,7 @@ * Range: AUTO_OS_DISABLE (oversample disabled) to AUTO_OS_128 (128 * oversamples). */ -#define DEF_SELFCAP_AUTO_OS AUTO_OS_4 /* Automatic OverSampling */ +#define DEF_SELFCAP_AUTO_OS AUTO_OS_DISABLE /* Automatic OverSampling */ /** * Self Cap gain per touch channel. @@ -169,7 +169,8 @@ * Refer gain_t in touch_api_SAMD.h * Range:GAIN_1 (no scaling) to GAIN_32 (scale-up by 32) */ -#define DEF_SELFCAP_GAIN_PER_NODE GAIN_2,GAIN_2,GAIN_2,GAIN_2,GAIN_2 +#define DEF_SELFCAP_GAIN_PER_NODE GAIN_32,GAIN_32,GAIN_32,GAIN_32,GAIN_32 + /*---------------------------------------------------------------------------- * Tuning for Noise performance, touch response time and Power consumption. * ----------------------------------------------------------------------------*/ @@ -280,13 +281,13 @@ * Speicify period in milliseconds. Example, DEF_TOUCH_MEASUREMENT_PERIOD_MS 50u * will perform measurement on touch sensors every 50msec. */ -#define DEF_TOUCH_MEASUREMENT_PERIOD_MS 10u +#define DEF_TOUCH_MEASUREMENT_PERIOD_MS 30u /** * Self Cap Sensor detect integration (DI) limit. * Range: 0u to 255u. */ -#define DEF_SELFCAP_DI 5u +#define DEF_SELFCAP_DI 0u /** * Self Cap Sensor towards touch drift rate. @@ -294,7 +295,7 @@ * Default value: 20 = 4 seconds. * Range: 1u to 127u. */ -#define DEF_SELFCAP_TCH_DRIFT_RATE 10u +#define DEF_SELFCAP_TCH_DRIFT_RATE 30u /** * Self Cap Sensor away from touch drift rate. @@ -318,14 +319,14 @@ * Default value: 20 (hold off drifting for 4 seconds after leaving detect). * Range: 1u to 255u. */ -#define DEF_SELFCAP_DRIFT_HOLD_TIME 10u +#define DEF_SELFCAP_DRIFT_HOLD_TIME 30u /** * Self Cap Sensor away from touch recalibration delay. * Default value: 10. * Range: 1u to 255u. */ -#define DEF_SELFCAP_ATCH_RECAL_DELAY 10u +#define DEF_SELFCAP_ATCH_RECAL_DELAY 1u /** Self Cap Sensor away from touch recalibration threshold. * Default: RECAL_50 (recalibration threshold = 50% of detection threshold). @@ -353,6 +354,11 @@ */ #define DEF_SELFCAP_FILTER_CALLBACK (NULL) +/**********************************************************/ +/***************** Communication - Data Streamer ******************/ +/**********************************************************/ +#define DEF_TOUCH_DATA_STREAMER_ENABLE 1u +#define DATA_STREAMER_BOARD_TYPE USER_BOARD #endif /* TOUCH_CONFIG_SAMD_H */