/trunk/eeprom.h |
---|
34,6 → 34,9 |
#define EE_LAST_GYRO_ROLL 28 // word |
#define EE_LAST_GYRO_YAW 30 // word |
#define EE_BAUDRATE 32 // Byte |
#define EE_BAUDRATE_CRC 33 // Byte |
#define EEPROM_ADR_CHANNELS 80 // 80 - 93, 12 bytes + 1 byte crc |
#define EEPROM_ADR_PARAMSET 100 // 100 - 995, 5 * 179 bytes (V2.14) |
#define EEPROM_ADR_MIXERTABLE 1000 // 1000 - 1078, 78 bytes |
/trunk/libfc1284.a |
---|
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
/trunk/main.c |
---|
359,6 → 359,7 |
LIBFC_Init(LIB_FC_COMPATIBLE); |
GRN_ON; |
sei(); |
printf("\r\nBaudrate:%u",Baudrate); |
ParamSet_Init(); |
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
if(PlatinenVersion < 20) |
489,6 → 490,7 |
while(!CheckDelay(timer)); |
printf("\r\nStart\r\n"); |
#endif |
while(1) |
{ |
EEAR = EE_DUMMY; // Set the EEPROM Address pointer to an unused space |
/trunk/spi.c |
---|
48,6 → 48,7 |
unsigned char FlyzonePointCnt = 0; |
unsigned int FromNC_Laser_cm; |
unsigned int TrigLogging_CountExternal = 0; |
unsigned char FromNcBaudrateIndex = 8; |
#ifdef USE_SPI_COMMUNICATION |
550,6 → 551,13 |
Partner_StatusFlags = FromNaviCtrl.Param.Byte[14]; |
Partner_StatusFlags2 = FromNaviCtrl.Param.Byte[15]; |
Partner_StatusFlags3 = FromNaviCtrl.Param.Byte[16]; |
if(!MotorenEin && FromNcBaudrateIndex != FromNaviCtrl.Param.Byte[17]) |
{ |
FromNcBaudrateIndex = FromNaviCtrl.Param.Byte[17]; |
SetParamByte(EE_BAUDRATE,FromNcBaudrateIndex); |
SetParamByte(EE_BAUDRATE_CRC,FromNcBaudrateIndex+1); |
UART_Init(); |
} |
break; |
case SPI_NCCMD_GPSINFO: |
GPSInfo.Flags = FromNaviCtrl.Param.Byte[0]; |
/trunk/spi.h |
---|
256,6 → 256,7 |
extern unsigned int FromNC_Laser_cm; |
extern unsigned char FlyzonePointCnt; |
extern unsigned int TrigLogging_CountExternal; |
extern unsigned char FromNcBaudrateIndex; |
#else |
/trunk/uart.c |
---|
77,6 → 77,8 |
#define MASK_SET_DEFAULT_PARAMS 0x40 |
#define MASK_SET_SAVE_EEPROM 0x80 |
const unsigned int BAUDRATES[MAX_BD_RATES] = {1200,2400,4800,9600,14400,19200,28800,38400,57600}; |
unsigned char GetExternalControl = 0,DebugDisplayAnforderung1 = 0, DebugDisplayAnforderung = 0,DebugDataAnforderung = 0,GetVersionAnforderung = 0, GetPPMChannelAnforderung = 0; |
unsigned char DisplayLine = 0; |
unsigned volatile char SioTmp = 0; |
111,6 → 113,7 |
unsigned volatile char ReceiverUpdateModeActive = 0; // 1 = Update 2 = JetiBox-Simulation |
unsigned char SwitchMultiplexerToUpdate = 0; // the Uart-Multiplexer on the FC V3.0 |
unsigned char SerialChannelDataOkay = 0; // timeout |
unsigned int Baudrate = 57600; |
#ifdef REDUNDANT_FC_SLAVE |
unsigned char SerialMotorRequest = 0; |
723,12 → 726,20 |
} |
//############################################################################ |
//INstallation der Seriellen Schnittstelle |
//Initialisierung der Seriellen Schnittstelle |
void UART_Init (void) |
//############################################################################ |
{ |
unsigned int ubrr = (unsigned int) ((unsigned long) F_CPU/(8 * USART0_BAUD) - 1); |
unsigned int ubrr; |
//{1200,2400,4800,9600,14400,19200,28800,38400,57600}; |
FromNcBaudrateIndex = GetParamByte(EE_BAUDRATE); |
if(FromNcBaudrateIndex < MAX_BD_RATES && GetParamByte(EE_BAUDRATE_CRC) == FromNcBaudrateIndex + 1) // EEprom-Data Valid |
{ |
Baudrate = BAUDRATES[FromNcBaudrateIndex]; |
} |
else FromNcBaudrateIndex = 8; |
ubrr = (unsigned int) ((unsigned long) F_CPU/(8 * (unsigned long)Baudrate) - 1); |
//Enable TXEN im Register UCR TX-Data Enable & RX Enable |
UCSR0B = (1 << TXEN0) | (1 << RXEN0); |
// UART Double Speed (U2X) |
/trunk/uart.h |
---|
1,5 → 1,5 |
#ifndef _UART_H |
#define _UART_H |
#ifndef _UART_H |
#define _UART_H |
#define printf_P(format, args...) _printf_P(&uart_putchar, format , ## args) |
#define printf(format, args...) _printf_P(&uart_putchar, PSTR(format) , ## args) |
26,6 → 26,7 |
extern unsigned char MotorTest[16]; |
extern unsigned char SwitchMultiplexerToUpdate; // the Uart-Multiplexer on the FC V3.0 |
extern unsigned char SerialChannelDataOkay; // timeout |
extern unsigned int Baudrate; |
struct str_DebugOut |
{ |
141,6 → 142,8 |
}; |
extern struct str_VersionInfo VersionInfo; |
#define MAX_BD_RATES 9 |
extern const unsigned int BAUDRATES[MAX_BD_RATES]; |
//#define USART0_BAUD 9600 |
//#define USART0_BAUD 14400 |
148,5 → 151,4 |
//#define USART0_BAUD 38400 |
#define USART0_BAUD 57600 |
#endif //_UART_H |
/trunk/version.txt |
---|
874,7 → 874,7 |
-> NC landing Waypoints |
- Laser distance in Hott-Menu |
2.17a (20.04.2017) |
2.18a (20.04.2017) |
- Flyzones implemented |
-> Settings option: FlyZoneRequired |
-> Settings option: Land Outside Flyzone |
887,6 → 887,9 |
- accept slightly higher tolerances during calibration |
- Better Status text in Text-Telemetry |
- HotShoe Photo counter in the HoTT Text-Telemetry display |
2.19a (25.04.2017) |
- variable baudrate |
toDo: |
- CalAthmospheare nachführen |