Click here to Skip to main content
15,888,461 members
Home / Discussions / C#
   

C#

 
GeneralRe: server connect Pin
heba abu ghaleih22 23-Mar-12 14:27
heba abu ghaleih22 23-Mar-12 14:27 
GeneralRe: server connect Pin
Richard Andrew x6423-Mar-12 14:29
professionalRichard Andrew x6423-Mar-12 14:29 
GeneralRe: server connect Pin
heba abu ghaleih22 23-Mar-12 14:30
heba abu ghaleih22 23-Mar-12 14:30 
QuestionWinform graph Pin
DerecL23-Mar-12 11:14
DerecL23-Mar-12 11:14 
AnswerRe: Winform graph Pin
Eddy Vluggen23-Mar-12 11:24
professionalEddy Vluggen23-Mar-12 11:24 
GeneralRe: Winform graph Pin
DerecL23-Mar-12 11:32
DerecL23-Mar-12 11:32 
QuestionRe: Winform graph Pin
Eddy Vluggen23-Mar-12 11:38
professionalEddy Vluggen23-Mar-12 11:38 
AnswerRe: Winform graph Pin
DerecL23-Mar-12 11:54
DerecL23-Mar-12 11:54 
It takes 12 bytes from microcontroller and there is about 20 records per second. "lag" I did mean its painting slowly (one graph is working perfectly but another is hanging). I did some seconds before loading but it didn't help.

There is data diplay delegate I am using:

C#
private delegate void AddDataToGraphDelegate(int xValue, byte[] yValues);

private void AddDataToGraph(int xValue, byte[] yValues)
{
    if (this.InvokeRequired)
    {
        this.Invoke(new AddDataToGraphDelegate(this.AddDataToGraph), xValue, yValues);
    }
    else
    {
        for (int i = 0, k = 0, l = 0; i < 6; i++)
        {
            l = (yValues[k + 1] << 8) | yValues[k];
            sens_data1[i] = ((short)(l));
            skaicius[1 + i, xvalue] = sens_data1[i];
            k = k + 2;
        }
        accChart.Series["accel ROLL"].Points.AddXY(xValue, sens_data1[0]);
        accChart.Series["accel PITCH"].Points.AddXY(xValue, sens_data1[1]);
        accChart.Series["accel YAW"].Points.AddXY(xValue, sens_data1[2]);

        gyroChart.Series["gyro ROLL"].Points.AddXY(xValue, sens_data1[3]);
        gyroChart.Series["gyro PITCH"].Points.AddXY(xValue, sens_data1[4]);
        gyroChart.Series["gyro YAW"].Points.AddXY(xValue, sens_data1[5]);


        if (xvalue > 100)
        {
            accChart.ChartAreas["Acc"].AxisX.Minimum++;
            accChart.ChartAreas["Acc"].AxisX.Maximum++;

            gyroChart.ChartAreas["Gyro"].AxisX.Minimum++;
            gyroChart.ChartAreas["Gyro"].AxisX.Maximum++;
        }

        Thread.Sleep(50);
        if (graph) comport.Write("V");
    }
}


modified 23-Mar-12 18:14pm.

GeneralRe: Winform graph Pin
Eddy Vluggen24-Mar-12 2:25
professionalEddy Vluggen24-Mar-12 2:25 
AnswerRe: Winform graph Pin
Philippe Mori23-Mar-12 12:28
Philippe Mori23-Mar-12 12:28 
GeneralRe: Winform graph Pin
DerecL23-Mar-12 13:16
DerecL23-Mar-12 13:16 
AnswerRe: Winform graph Pin
eupendra25-Mar-12 22:11
eupendra25-Mar-12 22:11 
Question<b>Question: Making a Keno Game in C#</b> Pin
Tailean23-Mar-12 10:39
Tailean23-Mar-12 10:39 
QuestionRe: Question: Making a Keno Game in C# Pin
Eddy Vluggen23-Mar-12 11:20
professionalEddy Vluggen23-Mar-12 11:20 
QuestionRe: Question: Making a Keno Game in C# Pin
Tailean23-Mar-12 11:34
Tailean23-Mar-12 11:34 
AnswerRe: Question: Making a Keno Game in C# Pin
Eddy Vluggen23-Mar-12 14:14
professionalEddy Vluggen23-Mar-12 14:14 
GeneralRe: Question: Making a Keno Game in C# Pin
Tailean23-Mar-12 15:12
Tailean23-Mar-12 15:12 
GeneralRe: Question: Making a Keno Game in C# Pin
Eddy Vluggen24-Mar-12 1:26
professionalEddy Vluggen24-Mar-12 1:26 
QuestionUse of multiple panel Control in winform Pin
Dexter Arora23-Mar-12 10:31
Dexter Arora23-Mar-12 10:31 
AnswerRe: Use of multiple panel Control in winform Pin
Eddy Vluggen23-Mar-12 11:17
professionalEddy Vluggen23-Mar-12 11:17 
GeneralRe: Use of multiple panel Control in winform Pin
Dexter Arora24-Mar-12 0:48
Dexter Arora24-Mar-12 0:48 
GeneralRe: Use of multiple panel Control in winform Pin
Eddy Vluggen24-Mar-12 1:20
professionalEddy Vluggen24-Mar-12 1:20 
GeneralRe: Use of multiple panel Control in winform Pin
Dexter Arora24-Mar-12 2:08
Dexter Arora24-Mar-12 2:08 
QuestionRe: Use of multiple panel Control in winform Pin
Eddy Vluggen24-Mar-12 2:17
professionalEddy Vluggen24-Mar-12 2:17 
AnswerRe: Use of multiple panel Control in winform Pin
Dexter Arora24-Mar-12 9:17
Dexter Arora24-Mar-12 9:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.