sdlog2: workaround for Snapdragon

This fixes an issue where topics where not subscribed to on the Linux
side on Snapdragon. It's a hack until there is a proper fix for the
orb_exists() call.
This commit is contained in:
Julian Oes 2016-04-12 11:32:41 +02:00
parent 592113178b
commit 1aa45cede8

View File

@ -906,7 +906,17 @@ bool copy_if_updated_multi(orb_id_t topic, int multi_instance, int *handle, void
bool updated = false;
if (*handle < 0) {
if (OK == orb_exists(topic, multi_instance)) {
#if __PX4_POSIX_EAGLE
// The orb_exists call doesn't work correctly on Snapdragon yet.
// (No data gets sent from the QURT to the Linux side because there
// are no subscribers. However, there won't be any subscribers, if
// they check using orb_exists() before subscribing.
if (true)
#else
if (OK == orb_exists(topic, multi_instance))
#endif
{
*handle = orb_subscribe_multi(topic, multi_instance);
/* copy first data */
if (*handle >= 0) {