Subversion Repositories FlightCtrl

Rev

Rev 181 | 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
 
208 ligi 17
    public int[] analog;
18
    public int motor_complete=-1;
19
 
164 ligi 20
 
208 ligi 21
    private int i;
22
 
23
    public int motor_val(int id) {      return analog[12+id];    }
24
 
25
 
26
    public MKDebugData()
181 ligi 27
    {
28
        analog=new int[16];
29
        for (i=0;i<16;i++)
30
            analog[i]=-1;
31
 
32
    }
33
 
208 ligi 34
    public MKDebugData(int[] in_arr) // MKVersion
164 ligi 35
    {
36
 
208 ligi 37
        analog=new int[32];
38
 
164 ligi 39
        for (i=0;i<16;i++)
40
            analog[i]=(in_arr[17+i*2]<<8) | in_arr[18+i*2];
41
 
208 ligi 42
        motor_complete=motor_val(0)+motor_val(1)+motor_val(2)+motor_val(3);
164 ligi 43
    }
44
 
45
 
46
}