Subversion Repositories FlightCtrl

Rev

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

Rev 2527 Rev 2540
Line 26... Line 26...
26
        static unsigned char J16Bitmask = 0;
26
        static unsigned char J16Bitmask = 0;
27
        static unsigned char J17Bitmask = 0;
27
        static unsigned char J17Bitmask = 0;
28
        static unsigned char J16Warn = 0, J17Warn = 0;
28
        static unsigned char J16Warn = 0, J17Warn = 0;
29
    static unsigned char from_nc = 0; // Copy for the timing
29
    static unsigned char from_nc = 0; // Copy for the timing
Line 30... Line 30...
30
 
30
 
-
 
31
        if(!NC_Wait_for_LED) from_nc = (unsigned char) PPM_in[WP_EVENT_PPM_IN] + 127;
31
        if(FromNC_WP_EventChannel_New) from_nc = FromNC_WP_EventChannel_New;
32
 
32
        if(!delay--)  // 20ms Intervall
33
        if(!delay--)  // 20ms Intervall
33
        {
34
        {
34
        J16Bitmask = EE_Parameter.J16Bitmask;
35
        J16Bitmask = EE_Parameter.J16Bitmask;
35
        J17Bitmask = EE_Parameter.J17Bitmask;
36
        J17Bitmask = EE_Parameter.J17Bitmask;
Line 72... Line 73...
72
           {
73
           {
73
        NC_Wait_for_LED = 1;
74
        NC_Wait_for_LED = 1;
74
        if(J16Mask == 0)
75
        if(J16Mask == 0)
75
                 {
76
                 {
76
                  from_nc = FromNC_WP_EventChannel_New;
77
                  from_nc = FromNC_WP_EventChannel_New;
77
                  FromNC_WP_EventChannel_New = 0;
-
 
78
                  J16Mask = 64;
78
                  J16Mask = 64;
79
                  if(J16Bitmask & 128) J16_ON; else J16_OFF; // Ausschalten
79
                  if(J16Bitmask & 128) J16_ON; else J16_OFF; // Ausschalten
80
                 }
80
                 }
81
                else
81
                else
82
                 {
82
                 {
83
                  if(J16Mask & J16Bitmask) J16_ON; else J16_OFF;
83
                  if(J16Mask & J16Bitmask) J16_ON; else J16_OFF;
84
                  J16Mask /= 2;
84
                  J16Mask /= 2;
-
 
85
                  if(J16Mask == 0x01) FromNC_WP_EventChannel_New = 0;  // Last Bit -> Refresh the value by NC now
85
                 }
86
                 }
86
           }   
87
           }   
87
         }
88
         }
88
        else
89
        else
89
         {
90
         {