mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-18 08:54:15 +01:00
OP-1776 - Fixes from review
This commit is contained in:
parent
2a729c1742
commit
a418ca349f
@ -646,12 +646,11 @@ static void ProcessTelemetryStream(UAVTalkConnection inConnectionHandle, UAVTalk
|
|||||||
*/
|
*/
|
||||||
static void ProcessRadioStream(UAVTalkConnection inConnectionHandle, UAVTalkConnection outConnectionHandle, uint8_t *rxbuffer, uint8_t count)
|
static void ProcessRadioStream(UAVTalkConnection inConnectionHandle, UAVTalkConnection outConnectionHandle, uint8_t *rxbuffer, uint8_t count)
|
||||||
{
|
{
|
||||||
uint8_t position = 0;
|
uint8_t position = 0;
|
||||||
UAVTalkRxState state = UAVTALK_STATE_ERROR;
|
|
||||||
|
|
||||||
// Keep reading until we receive a completed packet.
|
// Keep reading until we receive a completed packet.
|
||||||
while (count > 0) {
|
while (count > 0) {
|
||||||
state = UAVTalkProcessInputStreamQuiet(inConnectionHandle, rxbuffer, &count, &position);
|
UAVTalkRxState state = UAVTalkProcessInputStreamQuiet(inConnectionHandle, rxbuffer, &count, &position);
|
||||||
if (state == UAVTALK_STATE_COMPLETE) {
|
if (state == UAVTALK_STATE_COMPLETE) {
|
||||||
// We only want to unpack certain objects from the remote modem
|
// We only want to unpack certain objects from the remote modem
|
||||||
// Similarly we only want to relay certain objects to the telemetry port
|
// Similarly we only want to relay certain objects to the telemetry port
|
||||||
|
@ -578,7 +578,7 @@ UAVTalkRxState UAVTalkProcessInputStreamQuiet(UAVTalkConnection connectionHandle
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Process an buffer from the telemetry stream.
|
* Process a buffer from the telemetry stream.
|
||||||
* \param[in] connection UAVTalkConnection to be used
|
* \param[in] connection UAVTalkConnection to be used
|
||||||
* \param[in] rxbuffer Received buffer
|
* \param[in] rxbuffer Received buffer
|
||||||
* \param[in] count bytes inside rxbuffer
|
* \param[in] count bytes inside rxbuffer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user