diff --git a/libs/mavlink-skyward-lib b/libs/mavlink-skyward-lib index aa28ae345943b3686d72a0675fa374771e4a00b1..2105872f965e63932abf304854604369a523f587 160000 --- a/libs/mavlink-skyward-lib +++ b/libs/mavlink-skyward-lib @@ -1 +1 @@ -Subproject commit aa28ae345943b3686d72a0675fa374771e4a00b1 +Subproject commit 2105872f965e63932abf304854604369a523f587 diff --git a/src/shared/events/EventBroker.cpp b/src/shared/events/EventBroker.cpp index b748fc1e91393133da2709cab2a761fe341ed442..b7029ee58d1c8d662344995825137b5fd0e791fb 100644 --- a/src/shared/events/EventBroker.cpp +++ b/src/shared/events/EventBroker.cpp @@ -29,6 +29,7 @@ namespace Boardcore { EventBroker::EventBroker() {} + void EventBroker::post(const Event& ev, uint8_t topic) { #ifdef TRACE_EVENTS diff --git a/src/shared/radio/MavlinkDriver/MavlinkDriver.h b/src/shared/radio/MavlinkDriver/MavlinkDriver.h index ba01382ebb13563292fd4113cf371a0ca7d666c8..aec5c22ddfbd2ec2646d132e665f7fdc1ffb80a6 100644 --- a/src/shared/radio/MavlinkDriver/MavlinkDriver.h +++ b/src/shared/radio/MavlinkDriver/MavlinkDriver.h @@ -65,7 +65,7 @@ template <unsigned int PktLength, unsigned int OutQueueSize, unsigned int MavMsgLength = MAVLINK_MAX_PAYLOAD_LEN> class MavlinkDriver { - ///< Alias of the function to be executed on message reception. + /// Alias of the function to be executed on message reception. using MavHandler = std::function<void(MavlinkDriver* channel, const mavlink_message_t& msg)>; @@ -88,6 +88,11 @@ public: */ bool start(); + /** + * @brief Tells whether the driver was started. + */ + bool isStarted(); + /** * @brief Stops sender and receiver threads. */ @@ -141,7 +146,8 @@ public: private: /** - * @brief Calls the run member function + * @brief Calls the run member function. + * * @param arg the object pointer cast to void* */ static void rcvLauncher(void* arg) @@ -238,7 +244,14 @@ bool MavlinkDriver<PktLength, OutQueueSize, MavMsgLength>::start() if (sndStarted && rcvStarted) LOG_DEBUG(logger, "Sender and receiver started"); - return (sndStarted && rcvStarted); + return sndStarted && rcvStarted; +} + +template <unsigned int PktLength, unsigned int OutQueueSize, + unsigned int MavMsgLength> +bool MavlinkDriver<PktLength, OutQueueSize, MavMsgLength>::start() +{ + return sndStarted && rcvStarted; } template <unsigned int PktLength, unsigned int OutQueueSize,