199,6 → 199,10 |
|
printf("\n\r==================================="); |
printf("\n\rFlightControl\n\rHardware:%d.%d\n\rSoftware:V%d.%d%c ",PlatinenVersion/10,PlatinenVersion%10, VERSION_MAJOR, VERSION_MINOR,VERSION_PATCH + 'a'); |
printf("\n\rthe use of this software is only permitted \n\ron original MikroKopter-Hardware"); |
printf("\n\rwww.MikroKopter.de (c) HiSystems GmbH"); |
printf("\n\r==================================="); |
|
if(UCSR1A == 0x20 && UCSR1C == 0x06) // initial Values for 644P |
{ |
Uart1Init(); |
341,17 → 345,15 |
LipoDetection(1); |
printf("\n\r===================================\n\r"); |
//SpektrumBinding(); |
timer = SetDelay(100); |
timer = SetDelay(1000); |
while (1) |
{ |
if(UpdateMotor && AdReady) // ReglerIntervall |
{ |
UpdateMotor=0; |
J3High; |
if(WinkelOut.CalcState) CalMk3Mag(); |
else MotorRegler(); |
SendMotorData(); |
J3Low; |
ROT_OFF; |
if(SenderOkay) SenderOkay--; |
else TIMSK1 |= _BV(ICIE1); // enable PPM-Input |
393,7 → 395,7 |
else BearbeiteRxDaten(); |
if(CheckDelay(timer)) |
{ |
timer += 20;//SetDelay(20); |
timer += 20; |
if(PcZugriff) PcZugriff--; |
else |
{ |
425,10 → 427,11 |
timer2 = 0; |
FlugMinuten++; |
FlugMinutenGesamt++; |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_MINUTES2],FlugMinuten / 256); // ACC-NeutralWerte speichern |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_MINUTES2+1],FlugMinuten % 256); // ACC-NeutralWerte speichern |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_MINUTES],FlugMinutenGesamt / 256); // ACC-NeutralWerte speichern |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_MINUTES+1],FlugMinutenGesamt % 256); // ACC-NeutralWerte speichern |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_MINUTES2],FlugMinuten / 256); |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_MINUTES2+1],FlugMinuten % 256); |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_MINUTES],FlugMinutenGesamt / 256); |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_MINUTES+1],FlugMinutenGesamt % 256); |
timer = SetDelay(20); // falls "timer += 20;" mal nicht geht |
} |
} |
LED_Update(); |