Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
ajjjjjjjj committed Dec 10, 2024
1 parent 7f2a5ca commit 14888fd
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion radio/src/targets/flysky/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ void telemetryPortSetDirectionOutput(void);
//void sportSendBuffer(uint8_t * buffer, uint32_t count);
void sportSendBuffer(const uint8_t* buffer, unsigned long count);
uint8_t telemetryGetByte(uint8_t * byte);
bool telemetryIsEmpty();
// extern uint32_t telemetryErrors;

extern volatile bool pendingTelemetryPollFrame;
Expand Down
4 changes: 0 additions & 4 deletions radio/src/targets/flysky/telemetry_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,3 @@ extern "C" void TELEMETRY_USART_IRQHandler(void) {
uint8_t telemetryGetByte(uint8_t* byte) {
return telemetryDMAFifo.pop(*byte);
}

bool telemetryIsEmpty() {
return telemetryDMAFifo.isEmpty();
}
2 changes: 1 addition & 1 deletion radio/src/telemetry/telemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void telemetryWakeup()
}

#if defined(CROSSFIRE)
if (telemetryProtocol == PROTOCOL_TELEMETRY_CROSSFIRE && !telemetryIsEmpty()) {
if (telemetryProtocol == PROTOCOL_TELEMETRY_CROSSFIRE) {
uint8_t data;
while (telemetryGetByte(&data)) {
processCrossfireTelemetryData(data); // TODO handle full frame as in EdgeTX
Expand Down

0 comments on commit 14888fd

Please sign in to comment.