/trunk/libfcinit.a |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Deleted: svn:mime-type |
-application/octet-stream |
\ No newline at end of property |
/trunk/libfcinit.h |
---|
File deleted |
/trunk/fc.c |
---|
658,7 → 658,7 |
{ |
ReadParameterSet(GetActiveParamSetNumber(), (unsigned char *) &EE_Parameter.Kanalbelegung[0], STRUCT_PARAM_LAENGE); |
LipoDetection(0); |
InitReceiver(); |
LIBFC_ReceiverInit(); |
if((EE_Parameter.GlobalConfig & CFG_HOEHENREGELUNG)) // Höhenregelung aktiviert? |
{ |
if((MessLuftdruck > 950) || (MessLuftdruck < 750)) SucheLuftruckOffset(); |
/trunk/libfc.a |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes: |
Added: svn:mime-type |
+application/octet-stream |
\ No newline at end of property |
/trunk/libfc.h |
---|
0,0 → 1,8 |
#ifndef _LIBFC_H |
#define _LIBFC_H |
extern void LIBFC_Init(void); |
extern void LIBFC_Polling(void); |
extern void LIBFC_ReceiverInit(void); |
#endif //_LIBFC_H |
/trunk/main.c |
---|
194,15 → 194,15 |
i2c_init(); |
SPI_MasterInit(); |
InitFC(); |
LIBFC_Init(); |
GRN_ON; |
sei(); |
ReadParameterSet(3, (unsigned char *) &EE_Parameter.Kanalbelegung[0], 13); // read only the first bytes |
if((eeprom_read_byte(&EEPromArray[EEPROM_ADR_MIXER_TABLE]) == MIXER_REVISION) && // Check Revision in the first Byte |
(eeprom_read_byte(&EEPromArray[EEPROM_ADR_VALID]) != 0xff)) // Settings reset via Koptertool |
{ |
226,9 → 226,9 |
eeprom_write_block(&Mixer, &EEPromArray[EEPROM_ADR_MIXER_TABLE], sizeof(Mixer)); |
} |
printf("\n\rMixer-Config: '%s' (%u Motors)",Mixer.Name,RequiredMotors); |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
// + Check connected BL-Ctrls |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
314,9 → 314,9 |
SetActiveParamSetNumber(3); // default-Setting |
eeprom_write_byte(&EEPromArray[EEPROM_ADR_VALID], EE_DATENREVISION); |
} |
FlugMinuten = (int)eeprom_read_byte(&EEPromArray[EEPROM_ADR_MINUTES2]) * 256 + (int)eeprom_read_byte(&EEPromArray[EEPROM_ADR_MINUTES2+1]); |
FlugMinutenGesamt = (int)eeprom_read_byte(&EEPromArray[EEPROM_ADR_MINUTES]) * 256 + (int)eeprom_read_byte(&EEPromArray[EEPROM_ADR_MINUTES+1]); |
if(FlugMinutenGesamt == 0xffff || FlugMinuten == 0xffff) |
360,8 → 360,8 |
I2CTimeout = 5000; |
WinkelOut.Orientation = 1; |
LipoDetection(1); |
InitReceiver(); |
LIBFC_ReceiverInit(); |
printf("\n\r===================================\n\r"); |
//SpektrumBinding(); |
timer = SetDelay(2000); |
372,7 → 372,7 |
if(CheckDelay(timerPolling)) |
{ |
timerPolling = SetDelay(100); |
Polling(); |
LIBFC_Polling(); |
} |
if(UpdateMotor && AdReady) // ReglerIntervall |
/trunk/main.h |
---|
3,19 → 3,6 |
#define QUADRO |
//Hier die Quarz Frequenz einstellen |
#if defined (__AVR_ATmega32__) |
#define SYSCLK 20000000L //Quarz Frequenz in Hz |
#endif |
#if defined (__AVR_ATmega644__) |
#define SYSCLK 20000000L //Quarz Frequenz in Hz |
#endif |
#if defined (__AVR_ATmega644P__) |
#define SYSCLK 20000000L //Quarz Frequenz in Hz |
#endif |
// neue Hardware |
#define ROT_OFF {if((PlatinenVersion == 10)||(PlatinenVersion == 20)) PORTB &=~0x01; else PORTB |= 0x01;} |
#define ROT_ON {if((PlatinenVersion == 10)||(PlatinenVersion == 20)) PORTB |= 0x01; else PORTB &=~0x01;} |
24,10 → 11,8 |
#define GRN_ON {if((PlatinenVersion < 12)) PORTB |= 0x02; else PORTB &=~0x02;} |
#define GRN_FLASH PORTB ^= 0x02 |
#define F_CPU SYSCLK |
//#ifndef F_CPU |
//#error ################## F_CPU nicht definiert oder ungültig ############# |
//#endif |
#define SYSCLK F_CPU |
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
#define EE_DATENREVISION 82 // Parameter fürs Koptertool; wird angepasst, wenn sich die EEPROM-Daten geändert haben |
#define MIXER_REVISION 1 // wird angepasst, wenn sich die Mixer-Daten geändert haben |
78,9 → 63,6 |
#define J5High PORTD |= 0x08 |
#define J5Low PORTD &= ~0x08 |
//#define SYSCLK |
//extern unsigned long SYSCLK; |
extern volatile unsigned char SenderOkay; |
extern unsigned char BattLowVoltageWarning; |
extern unsigned char CosinusNickWinkel, CosinusRollWinkel; |
118,7 → 100,7 |
#include "spi.h" |
#include "led.h" |
#include "spektrum.h" |
#include "libfcinit.h" |
#include "libfc.h" |
#ifndef EEMEM |
/trunk/makefile |
---|
151,7 → 151,7 |
#CFLAGS += -std=c99 |
CFLAGS += -std=gnu99 |
CFLAGS += -DVERSION_MAJOR=$(VERSION_MAJOR) -DVERSION_MINOR=$(VERSION_MINOR) -DVERSION_PATCH=$(VERSION_PATCH) -DVERSION_SERIAL_MAJOR=$(VERSION_SERIAL_MAJOR) -DVERSION_SERIAL_MINOR=$(VERSION_SERIAL_MINOR) -DNC_SPI_COMPATIBLE=$(NC_SPI_COMPATIBLE) |
CFLAGS += -DF_CPU=$(F_CPU) -DVERSION_MAJOR=$(VERSION_MAJOR) -DVERSION_MINOR=$(VERSION_MINOR) -DVERSION_PATCH=$(VERSION_PATCH) -DVERSION_SERIAL_MAJOR=$(VERSION_SERIAL_MAJOR) -DVERSION_SERIAL_MINOR=$(VERSION_SERIAL_MINOR) -DNC_SPI_COMPATIBLE=$(NC_SPI_COMPATIBLE) |
# Optional assembler flags. |
182,7 → 182,7 |
# -lm = math library |
LDFLAGS += -lm |
LDFLAGS += libfcinit.a |
LDFLAGS += libfc.a |
##LDFLAGS += -T./linkerfile/avr5.x |
/trunk/uart.c |
---|
135,10 → 135,10 |
RxdBuffer[buf_ptr] = '\r'; |
if(RxdBuffer[2] == 'R') |
{ |
LcdClear(); |
LcdClear(); |
wdt_enable(WDTO_250MS); // Reset-Commando |
ServoActive = 0; |
} |
} |
} |
373,7 → 373,7 |
SendOutData('S', FC_ADDRESS, 1, &tempchar1, sizeof(tempchar1)); |
if(!MotorenEin) Piep(tempchar1,110); |
LipoDetection(0); |
InitReceiver(); |
LIBFC_ReceiverInit(); |
break; |
case 'f': // auf anderen Parametersatz umschalten |
if((1 <= pRxData[0]) && (pRxData[0] <= 5)) SetActiveParamSetNumber(pRxData[0]); |
382,7 → 382,7 |
SendOutData('F', FC_ADDRESS, 1, &tempchar1, sizeof(tempchar1)); |
if(!MotorenEin) Piep(tempchar1,110); |
LipoDetection(0); |
InitReceiver(); |
LIBFC_ReceiverInit(); |
break; |
case 'y':// serial Potis |
PPM_in[13] = (signed char) pRxData[0]; PPM_in[14] = (signed char) pRxData[1]; PPM_in[15] = (signed char) pRxData[2]; PPM_in[16] = (signed char) pRxData[3]; |