@@ -444,7 +444,7 @@ UAVTalkRxState UAVTalkProcessInputStream(UAVTalkConnection connectionHandle, uin
444444 while (position < length ) {
445445 state = UAVTalkProcessInputStreamQuiet (connectionHandle , rxbuffer , length , & position );
446446 if (state == UAVTALK_STATE_COMPLETE ) {
447- UAVTalkReceiveObject (connectionHandle , true );
447+ UAVTalkReceiveObject (connectionHandle );
448448 }
449449 }
450450 return state ;
@@ -546,7 +546,7 @@ int32_t UAVTalkRelayPacket(UAVTalkConnection inConnectionHandle, UAVTalkConnecti
546546 * \return 0 Success
547547 * \return -1 Failure
548548 */
549- int32_t UAVTalkReceiveObject (UAVTalkConnection connectionHandle , bool create )
549+ int32_t UAVTalkReceiveObject (UAVTalkConnection connectionHandle )
550550{
551551 UAVTalkConnectionData * connection ;
552552
@@ -557,7 +557,28 @@ int32_t UAVTalkReceiveObject(UAVTalkConnection connectionHandle, bool create)
557557 return -1 ;
558558 }
559559
560- return receiveObject (connection , iproc -> type , iproc -> objId , iproc -> instId , connection -> rxBuffer , create );
560+ return receiveObject (connection , iproc -> type , iproc -> objId , iproc -> instId , connection -> rxBuffer , true);
561+ }
562+
563+ /**
564+ * Complete receiving a UAVTalk packet. This will cause the packet to be unpacked, acked, etc.
565+ * This version will not create/unpack an object if it does not already exist.
566+ * \param[in] connectionHandle UAVTalkConnection to be used
567+ * \return 0 Success
568+ * \return -1 Failure
569+ */
570+ int32_t UAVTalkReceiveObjectNoCreate (UAVTalkConnection connectionHandle )
571+ {
572+ UAVTalkConnectionData * connection ;
573+
574+ CHECKCONHANDLE (connectionHandle , connection , return - 1 );
575+
576+ UAVTalkInputProcessor * iproc = & connection -> iproc ;
577+ if (iproc -> state != UAVTALK_STATE_COMPLETE ) {
578+ return -1 ;
579+ }
580+
581+ return receiveObject (connection , iproc -> type , iproc -> objId , iproc -> instId , connection -> rxBuffer , false);
561582}
562583
563584/**
0 commit comments