Exemple #1
0
 void parser_RxMessageReceived_event(object sender, ParseMessgaeArgs e)
 {
     //if (this.InvokeRequired)
     //{
     //    this.BeginInvoke((MethodInvoker)delegate
     //    {
     //        parser_RxMessageReceived_event(sender, e);
     //    });
     //    return;
     //}
     if (e.Msg_type == RxMsg_types.K_DBG_PID_Y)
     {
         float[] hodnoty = (float[])e.Msg_data;
         //    this.chart_PID.Series["series_e"].Points.Add(hodnoty[0]);
         //    this.chart_PID.Series["series_sum"].Points.Add(hodnoty[1]);
         //    this.chart_PID.Series["series_dif"].Points.Add(hodnoty[2]);
         //    this.chart_PID.Series["series_out"].Points.Add(hodnoty[3]);
         this.ToAdd_series_e.Add((Double)hodnoty[0]);
         //this.ToAdd_series_sum.Add((Double)hodnoty[1]);
         //this.ToAdd_series_dif.Add((Double)hodnoty[2]);
         this.ToAdd_series_out.Add((Double)hodnoty[3]);
     }
     else if (e.Msg_type == RxMsg_types.K_PID_SETTED)
     {
         MessageBox.Show((string)e.Msg_data);
     }
 }
Exemple #2
0
 void parser_RxMessageReceived_event(object sender, ParseMessgaeArgs e)
 {
     //if (this.InvokeRequired)
     //{
     //    this.BeginInvoke((MethodInvoker)delegate
     //    {
     //        parser_RxMessageReceived_event(sender, e);
     //    });
     //    return;
     //}
     if (e.Msg_type == RxMsg_types.K_DBG_PID_Y)
     {
         float[] hodnoty = (float[])e.Msg_data;
         //    this.chart_PID.Series["series_e"].Points.Add(hodnoty[0]);
         //    this.chart_PID.Series["series_sum"].Points.Add(hodnoty[1]);
         //    this.chart_PID.Series["series_dif"].Points.Add(hodnoty[2]);
         //    this.chart_PID.Series["series_out"].Points.Add(hodnoty[3]);
         this.ToAdd_series_e.Add((Double)hodnoty[0]);
         //this.ToAdd_series_sum.Add((Double)hodnoty[1]);
         //this.ToAdd_series_dif.Add((Double)hodnoty[2]);
         this.ToAdd_series_out.Add((Double)hodnoty[3]);
     }
     else if (e.Msg_type == RxMsg_types.K_PID_SETTED)
     {
         MessageBox.Show((string)e.Msg_data);
     }
 }
Exemple #3
0
 void Parser_RxMessageReceived_event(object sender, ParseMessgaeArgs e)
 {
     if (e.Msg_type == RxMsg_types.K_LIVE_OK)
     {
         this.Sended_counter--;
         if (this.Sended_counter > LIVE_TIME)
         {
             if (this.PingChanged_event != null)
             {
                 this.PingChanged_event(this, new LiveControlerArgs(GuardStates.ERROR, this.Sended_counter * GUARD_INTERVAL));
             }
         }
         else if (this.Sended_counter >= 0)
         {
             Compute_stats();
         }
     }
 }
Exemple #4
0
        void parser_RxMessageReceived_event(object sender, ParseMessgaeArgs e)
        {
            //if (this.InvokeRequired)
            //{
            //    this.BeginInvoke((MethodInvoker)delegate
            //    {
            //        parser_RxMessageReceived_event(sender, e);
            //    });
            //    return;
            //}
            if (e.Msg_type == RxMsg_types.K_DBG_RPM)
            {
                UInt32[] hodnoty = (UInt32[]) e.Msg_data;

                //this.chart1.Series["series_pl"].Points.Add(hodnoty[0]);
                //this.chart1.Series["series_pp"].Points.Add(hodnoty[1]);
                //this.chart1.Series["series_zl"].Points.Add(hodnoty[2]);
                //this.chart1.Series["series_zp"].Points.Add(hodnoty[3]);
                this.To_show_series_pl.Add(hodnoty[0]);
                this.To_show_series_pp.Add(hodnoty[1]);
                this.To_show_series_zl.Add(hodnoty[2]);
                this.To_show_series_zp.Add(hodnoty[3]);
            }
        }
Exemple #5
0
        void parser_RxMessageReceived_event(object sender, ParseMessgaeArgs e)
        {
            //if (this.InvokeRequired)
            //{
            //    this.BeginInvoke((MethodInvoker)delegate
            //    {
            //        parser_RxMessageReceived_event(sender, e);
            //    });
            //    return;
            //}
            if (e.Msg_type == RxMsg_types.K_DBG_RPM)
            {
                UInt32[] hodnoty = (UInt32[])e.Msg_data;

                //this.chart1.Series["series_pl"].Points.Add(hodnoty[0]);
                //this.chart1.Series["series_pp"].Points.Add(hodnoty[1]);
                //this.chart1.Series["series_zl"].Points.Add(hodnoty[2]);
                //this.chart1.Series["series_zp"].Points.Add(hodnoty[3]);
                this.To_show_series_pl.Add(hodnoty[0]);
                this.To_show_series_pp.Add(hodnoty[1]);
                this.To_show_series_zl.Add(hodnoty[2]);
                this.To_show_series_zp.Add(hodnoty[3]);
            }
        }
Exemple #6
0
 void Parser_RxMessageReceived_event(object sender, ParseMessgaeArgs e)
 {
     if (e.Msg_type == RxMsg_types.K_LIVE_OK)
     {
         this.Sended_counter--;
         if (this.Sended_counter > LIVE_TIME)
         {
             if (this.PingChanged_event != null) this.PingChanged_event(this, new LiveControlerArgs(GuardStates.ERROR, this.Sended_counter * GUARD_INTERVAL));
         }
         else if (this.Sended_counter >= 0)
         {
             Compute_stats();
         }
     }
 }