Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 624 → Rev 738

/branches/V0.68d J16J17/fc.c
600,7 → 600,14
 
GyroFaktor = ((float)Parameter_Gyro_P + 10.0) / 256.0;
IntegralFaktor = ((float) Parameter_Gyro_I) / 44000;
// [Harrie:] switch the auxility (LED) output on J16 (PC2 output on ATMEGA):
if(PPM_in[EE_Parameter.Kanalbelegung[K_POTI2]] > 75) LED1_ON; else LED1_OFF;
// [Harrie:] switch the auxility (LED) output on J17 (PC3 output on ATMEGA):
if(PPM_in[EE_Parameter.Kanalbelegung[K_POTI3]] > 75) LED2_ON; else LED2_OFF;
 
 
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//+ Digitale Steuerung per DubWise
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/branches/V0.68d J16J17/main.c
96,7 → 96,9
PORTB = 0x00;
for(timer = 0; timer < 1000; timer++); // verzögern
if(PINB & 0x01) PlatinenVersion = 11; else PlatinenVersion = 10;
DDRC = 0x81; // SCL
 
// [Harrie:] DDRC : 0x8D=128+8+4+1 so PC0,PC2(LED1),PC3(LED2),PC7 are now defined as outputs
DDRC = 0x8D; // SCL
PORTC = 0xff; // Pullup SDA
DDRB = 0x1B; // LEDs und Druckoffset
PORTB = 0x01; // LED_Rot
/branches/V0.68d J16J17/main.h
18,6 → 18,11
#define GRN_OFF PORTB &=~0x02
#define GRN_ON PORTB |= 0x02
#define GRN_FLASH PORTB ^= 0x02
// [Harrie:] define the LEDs
#define LED1_ON PORTC |= 0x04
#define LED1_OFF PORTC &=~0x04
#define LED2_ON PORTC |= 0x08
#define LED2_OFF PORTC &=~0x08