diff --git a/src/px4_connection/src/heartbeat.cpp b/src/px4_connection/src/heartbeat.cpp index 13480867..0ed09f55 100644 --- a/src/px4_connection/src/heartbeat.cpp +++ b/src/px4_connection/src/heartbeat.cpp @@ -114,7 +114,7 @@ private: const std::shared_ptr request, const std::shared_ptr response) { - if (request->control < 0 || request->control > CONTROL_POSITION_POS) + if (request->control < 0 || request->control > (1 << CONTROL_POSITION_POS)) { response->status = 1; }