Subversion Repositories FlightCtrl

Rev

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

Rev 732 Rev 756
Line 34... Line 34...
34
        DDRD &= ~(1<<DDD6);
34
        DDRD &= ~(1<<DDD6);
35
        PORTD |= (1<<PORTD6);
35
        PORTD |= (1<<PORTD6);
Line 36... Line 36...
36
 
36
 
37
        // Channel 5,6,7 is decoded to servo signals at pin PD5 (J3), PD4(J4), PD3(J5)
37
        // Channel 5,6,7 is decoded to servo signals at pin PD5 (J3), PD4(J4), PD3(J5)
38
        // set as output
38
        // set as output
39
        DDRD |= (1<<DDD5)|(1<<DDD4)|(1<<DDD3);
39
        DDRD |= (1<<DDD5)|(1<<DDD4);
40
        // low level
40
        // low level
Line 41... Line 41...
41
        PORTD &= ~((1<<PORTD5)|(1<<PORTD4)|(1<<PORTD3));
41
        PORTD &= ~((1<<PORTD5)|(1<<PORTD4));
42
 
42
 
43
        // PD3 can't be used in FC 1.1 if 2nd UART is activated
43
        // PD3 can't be used in FC 1.1 if 2nd UART is activated
44
        // becouse TXD1 is at that port
44
        // becouse TXD1 is at that port
Line 139... Line 139...
139
                PPM_in[index] = tmp; // update channel value
139
                PPM_in[index] = tmp; // update channel value
140
            }
140
            }
141
            index++; // next channel
141
            index++; // next channel
142
            // demux sum signal for channels 5 to 7 to J3, J4, J5
142
            // demux sum signal for channels 5 to 7 to J3, J4, J5
143
                if(index == 5) PORTD |= (1<<PORTD5); else PORTD &= ~(1<<PORTD5);
143
                if(index == 5) PORTD |= (1<<PORTD5); else PORTD &= ~(1<<PORTD5);
144
                if(index == 6) PORTD |= (1<<PORTD4); else PORTD &= ~(1<<PORTD4);
144
                //if(index == 6) PORTD |= (1<<PORTD4); else PORTD &= ~(1<<PORTD4);
145
                if(BoardRelease == 10)
145
                if(BoardRelease == 10)
146
                {
146
                {
147
                                if(index == 7) PORTD |= (1<<PORTD3); else PORTD &= ~(1<<PORTD3);
147
                                if(index == 7) PORTD |= (1<<PORTD3); else PORTD &= ~(1<<PORTD3);
148
                }
148
                }
149
        }
149
        }