Subversion Repositories FlightCtrl

Rev

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

Rev 2029 Rev 2031
Line 80... Line 80...
80
{
80
{
81
 static unsigned char  ptr = 0;
81
 static unsigned char  ptr = 0;
82
  if(!SpektrumTimer && udr == 0x0f)  // wait for the start
82
  if(!SpektrumTimer && udr == 0x0f)  // wait for the start
83
   {
83
   {
84
        ptr = 0;
84
        ptr = 0;
-
 
85
    SpektrumTimer = 80; // 8ms gap
85
        }
86
        }
86
        else
87
        else
87
        {
88
        {
88
     if(++ptr == 24)                    // last byte
89
     if(++ptr == 24)                    // last byte
89
          {
90
          {
90
                NewSBusData = 1;
91
                NewSBusData = 1;
Line 94... Line 95...
94
        else
95
        else
95
        {
96
        {
96
         sBusBuffer[ptr] = udr; // collect all bytes
97
         sBusBuffer[ptr] = udr; // collect all bytes
97
        }
98
        }
98
   }
99
   }
99
 SpektrumTimer = 100; // 10ms gap
-
 
100
}
100
}
Line 101... Line 101...
101
 
101
 
102
void ProcessSBus(void)
102
void ProcessSBus(void)
103
{
103
{