Subversion Repositories NaviCtrl

Rev

Rev 61 | Rev 63 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 61 Rev 62
Line 90... Line 90...
90
u8 Request_DebugLabel           = 255;
90
u8 Request_DebugLabel           = 255;
91
u8 Request_ChannelOnly          = FALSE;
91
u8 Request_ChannelOnly          = FALSE;
92
u8 Request_NaviData                     = FALSE;
92
u8 Request_NaviData                     = FALSE;
93
u8 Request_ErrorMessage     = FALSE;
93
u8 Request_ErrorMessage     = FALSE;
94
u8 Request_NewWaypoint          = FALSE;
94
u8 Request_NewWaypoint          = FALSE;
95
u8 Request_3DData                    = FALSE;
95
u8 Request_Data3D                    = FALSE;
Line 96... Line 96...
96
 
96
 
Line 97... Line 97...
97
u8 DisplayLine = 0;
97
u8 DisplayLine = 0;
Line 122... Line 122...
122
 
122
 
123
u32 DebugData_Timer;
123
u32 DebugData_Timer;
124
u32 DebugData_Interval = 1000; // in ms
124
u32 DebugData_Interval = 1000;  // in ms
125
u32 NaviData_Timer;
125
u32 NaviData_Timer;
126
u32 NaviData_Interval = 1000; // in ms
126
u32 NaviData_Interval = 1000;   // in ms
127
u32 Data3D_Timer = 0;
127
u32 Data3D_Timer = 0;                   // in ms
Line 128... Line 128...
128
u32 Intervall3D = 0;
128
u32 Data3D_Interval = 0;
Line 129... Line 129...
129
 
129
 
130
static u16 ptr_txd_buffer = 0;
130
static u16 ptr_txd_buffer = 0;
Line 547... Line 547...
547
                                        WPList_Append(pWaypoint);
547
                                        WPList_Append(pWaypoint);
548
                                        GPS_pWaypoint = WPList_Begin();
548
                                        GPS_pWaypoint = WPList_Begin();
549
                                }
549
                                }
550
                                break;
550
                                break;
Line -... Line 551...
-
 
551
 
-
 
552
                        case 'c': // request for 3D data;
-
 
553
                                Data3D_Interval = (u32) pRxData[0] * 10;
-
 
554
                                if(Data3D_Interval > 0) Request_Data3D = TRUE;
-
 
555
                                break;
551
 
556
 
552
                        case 'u': // redirect debug uart
557
                        case 'u': // redirect debug uart
553
                                switch(pRxData[0])
558
                                switch(pRxData[0])
554
                                {
559
                                {
555
                                        case UART_FLIGHTCTRL:
560
                                        case UART_FLIGHTCTRL:
Line 606... Line 611...
606
                        case 'b': // submit extern control
611
                        case 'b': // submit extern control
607
                                memcpy(&ExternControl, (u8*)&pRxData[0], sizeof(ExternControl));
612
                                memcpy(&ExternControl, (u8*)&pRxData[0], sizeof(ExternControl));
608
                                ConfirmFrame = ExternControl.Frame;
613
                                ConfirmFrame = ExternControl.Frame;
609
                                break;
614
                                break;
Line 610... Line -...
610
 
-
 
611
                        case 'c': // request for debug data;
-
 
612
                                Intervall3D = (u32) pRxData[0] * 10;
-
 
613
                                if(Intervall3D > 0) Request_3DData = TRUE;
-
 
614
                                break;
-
 
615
 
615
 
616
                        case 'd': // request for debug data;
616
                        case 'd': // request for debug data;
617
                                DebugData_Interval = (u32) pRxData[0] * 10;
617
                                DebugData_Interval = (u32) pRxData[0] * 10;
618
                                if(DebugData_Interval > 0) Request_DebugData = TRUE;
618
                                if(DebugData_Interval > 0) Request_DebugData = TRUE;
Line 691... Line 691...
691
        if(ConfirmFrame && txd_complete)
691
        if(ConfirmFrame && txd_complete)
692
        {
692
        {
693
                SendOutData('B', NC_ADDRESS, 1, &ConfirmFrame, sizeof(ConfirmFrame));
693
                SendOutData('B', NC_ADDRESS, 1, &ConfirmFrame, sizeof(ConfirmFrame));
694
                ConfirmFrame = 0;
694
                ConfirmFrame = 0;
695
        }
695
        }
696
        if( ((DebugData_Interval>0 && CheckDelay(DebugData_Timer)) || Request_DebugData) && txd_complete)
696
        if( (( (DebugData_Interval > 0) && CheckDelay(DebugData_Timer)) || Request_DebugData) && txd_complete)
697
        {
697
        {
698
                SendOutData('D', NC_ADDRESS, 1,(u8 *)&DebugOut, sizeof(DebugOut));
698
                SendOutData('D', NC_ADDRESS, 1,(u8 *)&DebugOut, sizeof(DebugOut));
699
                DebugData_Timer = SetDelay(DebugData_Interval);
699
                DebugData_Timer = SetDelay(DebugData_Interval);
700
                Request_DebugData = FALSE;
700
                Request_DebugData = FALSE;
701
        }
701
        }
Line 702... Line 702...
702
 
702
 
703
        if(((Intervall3D>0 && CheckDelay(Data3D_Timer)) || Request_3DData) && txd_complete)
703
        if((( (Data3D_Interval > 0) && CheckDelay(Data3D_Timer) ) || Request_Data3D) && txd_complete)
704
        {
704
        {
705
                SendOutData('C', NC_ADDRESS, 1,(u8 *)&Data3D, sizeof(Data3D));
705
                SendOutData('C', NC_ADDRESS, 1,(u8 *)&Data3D, sizeof(Data3D));
706
                Data3D_Timer = SetDelay(Intervall3D);
706
                Data3D_Timer = SetDelay(Data3D_Interval);
707
                Request_3DData = FALSE;
707
                Request_Data3D = FALSE;
Line 708... Line 708...
708
        }
708
        }
709
 
709
 
710
        if(Request_ExternalControl && txd_complete)
710
        if(Request_ExternalControl && txd_complete)