Telemetry/AVR/Function renaming
renamed processSerialData to processTelemetryData acording to PR review
This commit is contained in:
committed by
Bertrand Songis
parent
b87fddf3e7
commit
fbd881f8d9
@@ -130,7 +130,7 @@ bool sportWaitState(SportUpdateState state, int timeout)
|
|||||||
for (int i=timeout/2; i>=0; i--) {
|
for (int i=timeout/2; i>=0; i--) {
|
||||||
uint8_t byte ;
|
uint8_t byte ;
|
||||||
while (telemetryGetByte(&byte)) {
|
while (telemetryGetByte(&byte)) {
|
||||||
processSerialData(byte);
|
processTelemetryData(byte);
|
||||||
}
|
}
|
||||||
if (sportUpdateState == state) {
|
if (sportUpdateState == state) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ void telemetryEnableRx(void)
|
|||||||
UCSRB_N(TLM_USART) |= (1 << RXCIE_N(TLM_USART)); // enable Interrupt
|
UCSRB_N(TLM_USART) |= (1 << RXCIE_N(TLM_USART)); // enable Interrupt
|
||||||
}
|
}
|
||||||
|
|
||||||
void processSerialData(uint8_t data);
|
void processTelemetryData(uint8_t data);
|
||||||
extern uint8_t telemetryRxBufferCount;
|
extern uint8_t telemetryRxBufferCount;
|
||||||
|
|
||||||
ISR(USART_RX_vect_N(TLM_USART))
|
ISR(USART_RX_vect_N(TLM_USART))
|
||||||
@@ -94,7 +94,7 @@ ISR(USART_RX_vect_N(TLM_USART))
|
|||||||
telemetryRxBufferCount = 0;
|
telemetryRxBufferCount = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
processSerialData(data);
|
processTelemetryData(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
cli() ;
|
cli() ;
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ enum FrSkyDataState {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
NOINLINE void processSerialData(uint8_t data)
|
NOINLINE void processTelemetryData(uint8_t data)
|
||||||
{
|
{
|
||||||
static uint8_t dataState = STATE_DATA_IDLE;
|
static uint8_t dataState = STATE_DATA_IDLE;
|
||||||
|
|
||||||
|
|||||||
@@ -479,6 +479,6 @@ void frskySetCellVoltage(uint8_t battnumber, frskyCellVoltage_t cellVolts);
|
|||||||
void frskyUpdateCells();
|
void frskyUpdateCells();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void processSerialData(uint8_t data);
|
void processTelemetryData(uint8_t data);
|
||||||
|
|
||||||
#endif // _FRSKY_H_
|
#endif // _FRSKY_H_
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ Telemetry_Data_t telemetry_data;
|
|||||||
static void MAVLINK_parse_char(uint8_t c);
|
static void MAVLINK_parse_char(uint8_t c);
|
||||||
uint8_t telemetryRxBufferCount = 0;
|
uint8_t telemetryRxBufferCount = 0;
|
||||||
|
|
||||||
void processSerialData(uint8_t byte) {
|
void processTelemetryData(uint8_t byte) {
|
||||||
MAVLINK_parse_char(byte);
|
MAVLINK_parse_char(byte);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ void processTelemetryData(uint8_t data)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
processSerialData(data);
|
processTelemetryData(data);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ void telemetryWakeup()
|
|||||||
if (telemetryProtocol == PROTOCOL_FRSKY_D_SECONDARY) {
|
if (telemetryProtocol == PROTOCOL_FRSKY_D_SECONDARY) {
|
||||||
uint8_t data;
|
uint8_t data;
|
||||||
while (telemetrySecondPortReceive(data)) {
|
while (telemetrySecondPortReceive(data)) {
|
||||||
processSerialData(data);
|
processTelemetryData(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user