private void RadioTest()
        {
            UpdateOutputText("Testing radio communication quality...");
            RadioTester radiotest = new RadioTester(parameters, thisUSB, referenceRadio);
            parameters.radioTestsuccesses = radiotest.RunRadioTest(parameters.numberofradiotestsEachWay);
            parameters.radiotestsuccesspercent = 100 * parameters.radioTestsuccesses / (2 * parameters.numberofradiotestsEachWay);  //do i need to cast these as doubles?
            parameters.radiotestsuccesspercentstring = parameters.radiotestsuccesspercent.ToString();
            //referenceRadio.Close();  //possible to only do this on formclosing?  see comment above at opening

            UpdateProgressBar_Overall(55);
        }
        private void RadioTest()
        {
            //FTDIdevice referenceRadio = new FTDIdevice(parameters);5
            //referenceRadio.OpenPort(parameters.reference_radio_pid);  //would it be possible to do this once and leave it open between tests?
            //referenceRadio.Close();
            //referenceRadio.OpenPort(parameters.reference_radio_pid);
            //try
            //{
            UpdateOutputText("Testing radio communication quality...");
            RadioTester radiotest = new RadioTester(parameters, thisUSB, referenceRadio);
            parameters.radioTestsuccesses = radiotest.RunRadioTest(parameters.numberofradiotestsEachWay);
            parameters.radiotestsuccesspercent = 100 * parameters.radioTestsuccesses / (2 * parameters.numberofradiotestsEachWay);  //do i need to cast these as doubles?
            parameters.radiotestsuccesspercentstring = parameters.radiotestsuccesspercent.ToString();
            //referenceRadio.Close();  //possible to only do this on formclosing?  see comment above at opening

            UpdateProgressBar_Overall(55);
            //}
            //catch (Exception ex)
            //{
            //    referenceRadio.Close();  //If an error is thrown, we want to close the reference radio so we can reopen it next time.
            //    throw ex;
            //}
        }