Subversion Repositories FlightCtrl

Rev

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

Rev 2386 Rev 2426
Line 118... Line 118...
118
     if(pieper_ein) PORTC |= (1<<7); // Speaker an PORTC.7
118
     if(pieper_ein) PORTC |= (1<<7); // Speaker an PORTC.7
119
     else           PORTC &= ~(1<<7);
119
     else           PORTC &= ~(1<<7);
120
#else
120
#else
121
     if(pieper_ein)
121
     if(pieper_ein)
122
        {
122
        {
123
          if(PlatinenVersion == 10) PORTD |= (1<<2); // Speaker an PORTD.2
123
//          if(PlatinenVersion == 10) PORTD |= (1<<2); // Speaker an PORTD.2
-
 
124
//          else                      
124
          else                      PORTC |= (1<<7); // Speaker an PORTC.7
125
                  PORTC |= (1<<7); // Speaker an PORTC.7
125
        }
126
        }
126
     else
127
     else
127
        {
128
        {
128
         if(PlatinenVersion == 10) PORTD &= ~(1<<2);
129
//         if(PlatinenVersion == 10) PORTD &= ~(1<<2);
-
 
130
//         else                      
129
         else                      PORTC &= ~(1<<7);
131
                 PORTC &= ~(1<<7);
130
        }
132
        }
131
#endif
133
#endif
132
        }
134
        }
133
 if(JustMK3MagConnected && !NaviDataOkay && Parameter_GlobalConfig & CFG_KOMPASS_AKTIV)
135
 if(JustMK3MagConnected && !NaviDataOkay && Parameter_GlobalConfig & CFG_KOMPASS_AKTIV)
134
 {
136
 {
Line 298... Line 300...
298
                else
300
                else
299
                if(ServoNickValue > ((int16_t)EE_Parameter.ServoNickMax * MULTIPLYER))
301
                if(ServoNickValue > ((int16_t)EE_Parameter.ServoNickMax * MULTIPLYER))
300
                {
302
                {
301
                        ServoNickValue = (int16_t)EE_Parameter.ServoNickMax * MULTIPLYER;
303
                        ServoNickValue = (int16_t)EE_Parameter.ServoNickMax * MULTIPLYER;
302
                }
304
                }
303
                if(PlatinenVersion < 20) CalculateServoSignals = 0; else CalculateServoSignals++;
305
//              if(PlatinenVersion < 20) CalculateServoSignals = 0; else 
-
 
306
                CalculateServoSignals++;
304
        }
307
        }
305
        else
308
        else
306
        {
309
        {
307
        roll = (cosinus * IntegralRoll) / 128L + (sinus * IntegralNick) / 128L;
310
        roll = (cosinus * IntegralRoll) / 128L + (sinus * IntegralNick) / 128L;
308
        roll = ((long)Parameter_ServoRollComp * roll) / 512L;
311
        roll = ((long)Parameter_ServoRollComp * roll) / 512L;
Line 348... Line 351...
348
 
351
 
349
        static uint8_t  PulseOutput = 0;
352
        static uint8_t  PulseOutput = 0;
350
        static uint16_t ServoFrameTime = 0;
353
        static uint16_t ServoFrameTime = 0;
Line 351... Line 354...
351
        static uint8_t  ServoIndex = 0;
354
        static uint8_t  ServoIndex = 0;
352
 
355
 
353
 
356
/*
354
        if(PlatinenVersion < 20)
357
        if(PlatinenVersion < 20)
355
        {
358
        {
356
                //---------------------------
359
                //---------------------------
Line 378... Line 381...
378
                        // set pulse output active
381
                        // set pulse output active
379
                        PulseOutput = 1;
382
                        PulseOutput = 1;
380
                }
383
                }
381
        } // EOF Nick servo state machine
384
        } // EOF Nick servo state machine
382
        else
385
        else
-
 
386
*/
383
        {
387
        {
384
                //-----------------------------------------------------
388
                //-----------------------------------------------------
385
                // PPM state machine, onboard demultiplexed by HEF4017
389
                // PPM state machine, onboard demultiplexed by HEF4017
386
                //-----------------------------------------------------
390
                //-----------------------------------------------------
387
                if(!PulseOutput) // pulse output complete
391
                if(!PulseOutput) // pulse output complete