Changeset - 2f841e844536
[Not reviewed]
default
0 2 0
mkanning@CL-ENS241-10.cedarville.edu - 13 years ago 2013-02-14 15:21:33
mkanning@CL-ENS241-10.cedarville.edu
fixed the problem of two forms being created. still need to fix the addToChart()
and addMarker()
2 files changed with 7 insertions and 7 deletions:
0 comments (0 inline, 0 general)
Demo.WindowsForms/Forms/MainForm.cs
Show inline comments
 
@@ -2558,16 +2558,16 @@ namespace Demo.WindowsForms
 
        //handle line of input data and put into chart
 
 
        //parses transmissions and saves data to CSV file
 
        public void ParseIncomingData(string rawDataReceived)
 
        {
 
            //check to see if data should be processed
 
            if (!cboxCollectData.Checked)
 
            {
 
                return;
 
            }
 
            //if (!cboxCollectData.Checked)
 
            //{
 
            //    return;
 
            //}
 
            /* sample stansmission
 
            KD8TDF-9>APRS,WIDE2-1:/151916z3944.87N/08348.75WO005/0.013 SV:09 A-30.5 B45.64 C99542
 
                                          ^char 31 ^char 40            ^60
 
            */
 
 
            //TODO: verify index charcter accuracy with real transmission
 
@@ -2576,13 +2576,13 @@ namespace Demo.WindowsForms
 
            latitude = rawDataReceived.Substring(indexStart + 1, indexEnd - indexStart - 1);
 
 
            indexStart = rawDataReceived.IndexOf("N/");
 
            indexEnd = rawDataReceived.IndexOf("WO");
 
            longitude = rawDataReceived.Substring(indexStart + 2, indexEnd - indexStart - 2);
 
 
            addMarkerFromTransmit(latitude, longitude);
 
            //addMarkerFromTransmit(latitude, longitude);
 
            AddText(rawDataReceived + "\r\n");
 
 
            rawDataReceived = rawDataReceived.Substring(59); //remove APRS overhead from string
 
 
            //place each datum in its own variable
 
            string[] dataTransmission;
 
@@ -2595,13 +2595,13 @@ namespace Demo.WindowsForms
 
 
            //loop through all datums in the transmission and send them to the chart builder
 
            for (int i = 1; i < dataTransmission.Length; i++)
 
            {
 
                typeCode = dataTransmission[i].Substring(0, 1);
 
                data = double.Parse(dataTransmission[i].Substring(1));
 
                addToChart(typeCode, data);
 
                //addToChart(typeCode, data);
 
                csvData += typeCode + data + ",";
 
            }
 
 
            //write the data to CSV file
 
            WriteToCSV(csvData);
 
        }
Demo.WindowsForms/Source/Program.cs
Show inline comments
 
@@ -29,13 +29,13 @@ namespace Demo.WindowsForms
 
          Application.SetCompatibleTextRenderingDefault(false);
 
          var program = new Program();
 
          windowGUI = new MainForm();
 
          program.SerialInitialize();
 
         Application.EnableVisualStyles();
 
         
 
         Application.Run(new MainForm());
 
         Application.Run(windowGUI);
 
      }
 
 
      //inits the serial port and event handler
 
      private void SerialInitialize()
 
      {
 
          // http://msmvps.com/blogs/coad/archive/2005/03/23/SerialPort-_2800_RS_2D00_232-Serial-COM-Port_2900_-in-C_2300_-.NET.aspx
0 comments (0 inline, 0 general)