Subversion Repositories FlightCtrl

Rev

Rev 208 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 208 Rev 221
Line 25... Line 25...
25
    }
25
    }
Line 26... Line 26...
26
 
26
 
27
 
27
 
Line 28... Line 28...
28
 
28
 
29
 
29
 
30
    private long last_run_ms=-1;
30
    private long last_run_ms=0;
31
    private long last_step=-1;
31
    private long last_step=-1;
Line 32... Line 32...
32
 
32
 
33
    public void run()
33
    public void run()
34
    {
-
 
-
 
34
    {
Line 35... Line 35...
35
        while(true)
35
        while(true)
36
            {
36
            {
-
 
37
               
Line 37... Line 38...
37
               
38
                if (mk.connected)
38
                if (mk.connected)
39
                    {
39
                    {
40
                       
40
                        last_step=System.currentTimeMillis()-last_run_ms;      
41
 
41
 
42
                        if (last_run_ms!=0)
42
                        if (last_run_ms!=-1)
43
                            {
43
                            {
44
                                last_step=System.currentTimeMillis()-last_run_ms;      
-
 
45
 
Line 44... Line 46...
44
 
46
                                if (mk.debug_data.motor_complete>0)
45
                                if (mk.debug_data.motor_complete>0)
47
                                    motor_sum+=mk.debug_data.motor_complete;
46
                                    motor_sum+=mk.debug_data.motor_complete;
48
                                if (mk.debug_data.motor_complete>60)