mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Exposed the Send ACK/NACK function in UAVTalk.
This commit is contained in:
parent
30d63b5b12
commit
22f48ce8b0
@ -53,6 +53,8 @@ int32_t UAVTalkSetOutputStream(UAVTalkConnection connection, UAVTalkOutputStream
|
|||||||
UAVTalkOutputStream UAVTalkGetOutputStream(UAVTalkConnection connection);
|
UAVTalkOutputStream UAVTalkGetOutputStream(UAVTalkConnection connection);
|
||||||
int32_t UAVTalkSendObject(UAVTalkConnection connection, UAVObjHandle obj, uint16_t instId, uint8_t acked, int32_t timeoutMs);
|
int32_t UAVTalkSendObject(UAVTalkConnection connection, UAVObjHandle obj, uint16_t instId, uint8_t acked, int32_t timeoutMs);
|
||||||
int32_t UAVTalkSendObjectRequest(UAVTalkConnection connection, UAVObjHandle obj, uint16_t instId, int32_t timeoutMs);
|
int32_t UAVTalkSendObjectRequest(UAVTalkConnection connection, UAVObjHandle obj, uint16_t instId, int32_t timeoutMs);
|
||||||
|
int32_t UAVTalkSendAck(UAVTalkConnection connectionHandle, UAVObjHandle obj, uint16_t instId);
|
||||||
|
int32_t UAVTalkSendNack(UAVTalkConnection connectionHandle, uint32_t objId);
|
||||||
UAVTalkRxState UAVTalkProcessInputStream(UAVTalkConnection connection, uint8_t rxbyte);
|
UAVTalkRxState UAVTalkProcessInputStream(UAVTalkConnection connection, uint8_t rxbyte);
|
||||||
UAVTalkRxState UAVTalkProcessInputStreamQuiet(UAVTalkConnection connection, uint8_t rxbyte);
|
UAVTalkRxState UAVTalkProcessInputStreamQuiet(UAVTalkConnection connection, uint8_t rxbyte);
|
||||||
void UAVTalkGetStats(UAVTalkConnection connection, UAVTalkStats *stats);
|
void UAVTalkGetStats(UAVTalkConnection connection, UAVTalkStats *stats);
|
||||||
|
@ -489,6 +489,36 @@ UAVTalkRxState UAVTalkProcessInputStream(UAVTalkConnection connectionHandle, uin
|
|||||||
return state;
|
return state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a ACK through the telemetry link.
|
||||||
|
* \param[in] connectionHandle UAVTalkConnection to be used
|
||||||
|
* \param[in] objId Object ID to send a NACK for
|
||||||
|
* \return 0 Success
|
||||||
|
* \return -1 Failure
|
||||||
|
*/
|
||||||
|
int32_t UAVTalkSendAck(UAVTalkConnection connectionHandle, UAVObjHandle obj, uint16_t instId)
|
||||||
|
{
|
||||||
|
UAVTalkConnectionData *connection;
|
||||||
|
CHECKCONHANDLE(connectionHandle,connection,return -1);
|
||||||
|
|
||||||
|
return sendObject(connection, obj, instId, UAVTALK_TYPE_ACK);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Send a NACK through the telemetry link.
|
||||||
|
* \param[in] connectionHandle UAVTalkConnection to be used
|
||||||
|
* \param[in] objId Object ID to send a NACK for
|
||||||
|
* \return 0 Success
|
||||||
|
* \return -1 Failure
|
||||||
|
*/
|
||||||
|
int32_t UAVTalkSendNack(UAVTalkConnection connectionHandle, uint32_t objId)
|
||||||
|
{
|
||||||
|
UAVTalkConnectionData *connection;
|
||||||
|
CHECKCONHANDLE(connectionHandle,connection,return -1);
|
||||||
|
|
||||||
|
return sendNack(connection, objId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Receive an object. This function process objects received through the telemetry stream.
|
* Receive an object. This function process objects received through the telemetry stream.
|
||||||
* \param[in] connection UAVTalkConnection to be used
|
* \param[in] connection UAVTalkConnection to be used
|
||||||
|
Loading…
x
Reference in New Issue
Block a user