Example #1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            Process process = RunningInstance();

            if (process != null)
            {
                DialogResult status = MessageBox.Show("Another Instance of Current Software is Already Running. Still Continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                if (status == DialogResult.No)
                {
                    this.Close();
                    return;
                }
            }

            bridge = new USB_I2C();

            //define a timer to get bridge device when TIME_OUT
            t           = new System.Timers.Timer(TIME_OUT);
            t.AutoReset = true;
            t.Elapsed  += new System.Timers.ElapsedEventHandler(t_Elapsed);
            t.Start();

            int OK = GetDevice();

            if (OK == 0)
            {
                t.Stop();
            }
        }
Example #2
0
        /// <summary>
        /// Constructor of TestFunction
        /// </summary>
        /// <param name="serialNumber"></param>
        /// <param name="UsbBridge"></param>
        public TestFunction(string serialNumber, USB_I2C UsbBridge, TrackpadConfig trackpadConfig, string testStation)
        {
            dut = new DUT();
            dut.SerailNumber = serialNumber;
            dut.RawCount     = new List <int>();
            dut.RawCountX    = new List <int>();
            dut.RawCountY    = new List <int>();
            dut.Noise        = new List <int>();
            dut.StdDev       = new List <double>();

            dut.IDAC        = new List <int>();
            dut.Global_IDAC = new List <int>();
            dut.IDACGain    = new List <byte>();
            dut.IDAC_Erased = new List <int>();
            dut.Local_IDAC  = new List <int>();

            dut.Signal = new List <int>();
            dut.SNR    = new List <double>();

            dut.RawCount_Single  = new List <int>();
            dut.Signal_Single    = new List <int>();
            dut.Finger_Positions = new List <Point>();

            m_TPCONFIG = trackpadConfig;

            if (testStation == "TMT")
            {
                m_TPCONFIGtestItems = m_TPCONFIG.TMT;
            }
            if (testStation == "OQC")
            {
                m_TPCONFIGtestItems = m_TPCONFIG.OQC;
            }
            if (testStation == "TPT")
            {
                m_TPCONFIGtestItems = m_TPCONFIG.TPT;
            }

            NUM_COLS       = m_TPCONFIGtestItems.FW_INFO_NUM_COLS;
            NUM_ROWS       = m_TPCONFIGtestItems.FW_INFO_NUM_ROWS;
            RAW_DATA_READS = m_TPCONFIGtestItems.RAW_DATA_READS;

            bridge = UsbBridge;
            bridge.DeviceAddress = m_TPCONFIG.I2C_ADDRESS;

            VDD_DEFAULT = Convert.ToString(m_TPCONFIG.VDD_OP_PS);
            if (m_TPCONFIG.TRACKPAD_PLATFORM == TPCONFIG.TP_FUNCTION_APA)
            {
                I2CReadDelay = DelayTime.I2C_MS / 2;
            }
            else
            {
                I2CReadDelay = DelayTime.I2C_MS;
            }
        }
Example #3
0
        /// <summary>
        /// Constructor of TestFunction
        /// </summary>
        /// <param name="serialNumber"></param>
        /// <param name="UsbBridge"></param>
        public TestFunction(string serialNumber, USB_I2C UsbBridge, TrackpadConfig trackpadConfig, string testStation)
        {
            dut = new DUT();
            dut.SerailNumber = serialNumber;
            dut.RawCount = new List<int>();
            dut.RawCountX = new List<int>();
            dut.RawCountY = new List<int>();
            dut.Noise = new List<int>();
            dut.StdDev = new List<double>();

            dut.IDAC = new List<int>();
            dut.Global_IDAC = new List<int>();
            dut.IDACGain = new List<byte>();
            dut.IDAC_Erased = new List<int>();
            dut.Local_IDAC = new List<int>();

            dut.Signal = new List<int>();
            dut.SNR = new List<double>();

            dut.RawCount_Single = new List<int>();
            dut.Signal_Single = new List<int>();
            dut.Finger_Positions = new List<Point>();

            m_TPCONFIG = trackpadConfig;

            if (testStation == "TMT")
            {
                m_TPCONFIGtestItems = m_TPCONFIG.TMT;
            }
            if (testStation == "OQC")
            {
                m_TPCONFIGtestItems = m_TPCONFIG.OQC;
            }
            if (testStation == "TPT")
            {
                m_TPCONFIGtestItems = m_TPCONFIG.TPT;
            }

            NUM_COLS = m_TPCONFIGtestItems.FW_INFO_NUM_COLS;
            NUM_ROWS = m_TPCONFIGtestItems.FW_INFO_NUM_ROWS;
            RAW_DATA_READS = m_TPCONFIGtestItems.RAW_DATA_READS;

            bridge = UsbBridge;
            bridge.DeviceAddress = m_TPCONFIG.I2C_ADDRESS;

            VDD_DEFAULT = Convert.ToString(m_TPCONFIG.VDD_OP_PS);
            if (m_TPCONFIG.TRACKPAD_PLATFORM == TPCONFIG.TP_FUNCTION_APA)
            {
                I2CReadDelay = DelayTime.I2C_MS / 2;
            }
            else
            {
                I2CReadDelay = DelayTime.I2C_MS;
            }
        }
Example #4
0
        private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (test_running)
            {
                DialogResult status = MessageBox.Show("Test is Runnung. Do you want to close?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                if (status == DialogResult.No)
                {
                    e.Cancel = true;
                }
                else
                {
                    bridge.ClosePort();
                    bridge = null;
                }
            }
            else
            {
                bridge.ClosePort();
                bridge = null;
            }

            saveSysConfig();
        }
Example #5
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            Process process = RunningInstance();
            if (process != null)
            {
                DialogResult status = MessageBox.Show("Another Instance of Current Software is Already Running. Still Continue?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                if (status == DialogResult.No)
                {
                    this.Close();
                    return;
                }
            }

            bridge = new USB_I2C();

            //define a timer to get bridge device when TIME_OUT
            t = new System.Timers.Timer(TIME_OUT);
            t.AutoReset = true;
            t.Elapsed += new System.Timers.ElapsedEventHandler(t_Elapsed);
            t.Start();

            int OK = GetDevice();
            if (OK == 0) { t.Stop(); }
        }
Example #6
0
        private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (test_running)
            {
                DialogResult status = MessageBox.Show("Test is Runnung. Do you want to close?", "WARNING", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                if (status == DialogResult.No)
                {
                    e.Cancel = true;
                }
                else
                {
                    bridge.ClosePort();
                    bridge = null;
                }
            }
            else
            {
                bridge.ClosePort();
                bridge = null;
            }

            saveSysConfig();
        }