Subversion Repositories FlightCtrl

Rev

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

Rev 143 Rev 149
Line 84... Line 84...
84
//############################################################################
84
//############################################################################
85
{
85
{
86
        unsigned int timer;
86
        unsigned int timer;
87
        unsigned int timer2 = 0;
87
        unsigned int timer2 = 0;
Line -... Line 88...
-
 
88
 
88
 
89
 
89
    DDRC  = 0x01; // SCL
90
    DDRC  = 0x01; // SCL
90
    PORTC = 0xff; // Pullup SDA
91
    PORTC = 0xff; // Pullup SDA
91
    DDRB  = 0x1B; // LEDs und Druckoffset
92
    DDRB  = 0x1B; // LEDs und Druckoffset
92
    PORTB = 0x01; // LED_Rot
93
    PORTB = 0x01; // LED_Rot
Line 109... Line 110...
109
    Timer_Init();
110
    Timer_Init();
110
        UART_Init();
111
        UART_Init();
111
    rc_sum_init();
112
    rc_sum_init();
112
        ADC_Init();
113
        ADC_Init();
113
        i2c_init();
114
        i2c_init();
114
   
115
 
115
        sei();
116
        sei();
Line 116... Line 117...
116
 
117
 
117
    VersionInfo.Hauptversion = VERSION_HAUPTVERSION;
118
    VersionInfo.Hauptversion = VERSION_HAUPTVERSION;
118
    VersionInfo.Nebenversion = VERSION_NEBENVERSION;
119
    VersionInfo.Nebenversion = VERSION_NEBENVERSION;
Line 170... Line 171...
170
        if (UpdateMotor)      // ReglerIntervall
171
        if (UpdateMotor)      // ReglerIntervall
171
            {
172
            {
172
            UpdateMotor=0;
173
            UpdateMotor=0;
173
            MotorRegler();  
174
            MotorRegler();  
174
            SendMotorData();
175
            SendMotorData();
175
//            ROT_OFF;
176
            ROT_OFF;
176
            if(PcZugriff) PcZugriff--;
177
            if(PcZugriff) PcZugriff--;
Line 177... Line 178...
177
           
178
           
Line 178... Line 179...
178
            if(SenderOkay)  SenderOkay--;
179
            if(SenderOkay)  SenderOkay--;