/trunk/main.c |
---|
322,6 → 322,9 |
// else NaviData.FlyingTime = 0; |
TimerCheckError = SetDelay(1000); |
Request_SendFollowMe = TRUE; |
if(SerialDataOkay) SerialDataOkay--; |
if(SerialDataOkay < 250 - 5) NaviData.NCFlags |= NC_NO_SERIAL_DATA; |
else NaviData.NCFlags &= ~NC_NO_SERIAL_DATA; |
} |
// ---------------- Logging --------------------------------------- |
Logging_Update(); |
/trunk/main.h |
---|
9,7 → 9,7 |
#define VERSION_SERIAL_MAJOR 10 |
#define VERSION_SERIAL_MINOR 0 |
#define FC_SPI_COMPATIBLE 5 |
#define FC_SPI_COMPATIBLE 6 |
#define MK3MAG_I2C_COMPATIBLE 2 |
/trunk/spi_slave.c |
---|
296,6 → 296,7 |
ToFlightCtrl.Param.Byte[0] = (char) FC_Kalman_K; |
ToFlightCtrl.Param.Byte[1] = (char) Kalman_MaxFusion; |
ToFlightCtrl.Param.Byte[2] = (char) Kalman_MaxDrift; |
ToFlightCtrl.Param.Byte[3] = (char) SerialDataOkay; |
break; |
default: |
/trunk/uart1.c |
---|
106,6 → 106,7 |
volatile u8 CntCrcError = 0; |
volatile u8 *pRxData = NULL; |
volatile u8 RxDataLen = 0; |
volatile u8 SerialDataOkay = 0; |
u8 text[100]; |
241,7 → 242,8 |
UART_VersionInfo.ProtoMinor = VERSION_SERIAL_MINOR; |
NaviData.Version = NAVIDATA_VERSION; |
WPList_Clear(); |
GPS_pWaypoint = WPList_Begin(); |
SerialPutString("\r\nUART1 init...ok"); |
} |
336,6 → 338,7 |
rxd_buffer_locked = TRUE; // lock the rxd buffer |
ReceivedBytes = ptr_rxd_buffer + 1; // store number of received bytes |
rxd_buffer[ptr_rxd_buffer] = '\r'; // set termination character |
SerialDataOkay = 250; |
// if 2nd byte is an 'R' start bootloader |
if(rxd_buffer[2] == 'R') |
{ |
/trunk/uart1.h |
---|
96,6 → 96,7 |
#define NC_FLAG_PH 2 |
#define NC_FLAG_CH 4 |
#define NC_FLAG_RANGE_LIMIT 8 |
#define NC_NO_SERIAL_DATA 0x10 |
typedef struct |
{ |
111,8 → 112,8 |
extern volatile u8 ReceivedBytes; |
extern volatile u8 rxd_buffer_locked; |
extern UART_TypeDef *DebugUART; |
extern volatile u8 SerialDataOkay; |
void UART1_Init(void); |
void UART1_Transmit(void); |
void UART1_TransmitTxData(void); |