Subversion Repositories FlightCtrl

Rev

Rev 164 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
181 ligi 1
/*********************************************************************************************************************************
2
 *                                                                                                                                *
3
 * class representing the DebugData Structure                                                                                     *
4
 *                                                                                                                                *
5
 * Author:        Marcus -LiGi- Bueschleb                                                                                         *
6
 * Project-Start: 9/2007                                                                                                          *
7
 
8
 * Mailto:        ligi@smart4mobile.de                                                                                            *
9
 * Licence:       Creative Commons / Non Commercial                                                                               *
10
 * Big Up:        Holger&Ingo                                                                                                     *
11
 *********************************************************************************************************************************/
12
 
164 ligi 13
public class MKDebugData
14
 
15
{
16
 
17
    int[] digital;
18
    int zyklen;
19
    int zeit;
20
    int sekunden;
21
    int[] analog;
22
 
181 ligi 23
    public MKDebugData()
24
    {
25
        digital=new int[13];
26
        analog=new int[16];
27
        int i;
28
        for (i=0;i<13;i++)
29
            digital[i]=-1;
30
 
31
        zyklen=-1;
32
        zeit= -1;
33
        sekunden= -1;
164 ligi 34
 
181 ligi 35
        for (i=0;i<16;i++)
36
            analog[i]=-1;
37
 
38
    }
39
 
164 ligi 40
    public MKDebugData(int[] in_arr)
41
    {
42
        digital=new int[13];
43
        analog=new int[16];
44
        int i;
45
        for (i=0;i<13;i++)
46
            digital[i]=in_arr[i];
47
 
48
        zyklen= in_arr[13] << 8 | in_arr[14] ;
49
        zeit= in_arr[14] << 8 | in_arr[15] ;
50
        sekunden= in_arr[16] ;
51
 
52
        for (i=0;i<16;i++)
53
            analog[i]=(in_arr[17+i*2]<<8) | in_arr[18+i*2];
54
 
55
    }
56
 
57
 
58
}