Skip to content

Commit

Permalink
fix cpplint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
vooon committed Mar 3, 2024
1 parent 0f989c8 commit 003f03d
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion mavros/src/plugins/global_position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
*/

#include <angles/angles.h>
#include <tf2_eigen/tf2_eigen.hpp>

#include <string>
#include <tf2_eigen/tf2_eigen.hpp>
#include <GeographicLib/Geocentric.hpp> // NOLINT

#include "rcpputils/asserts.hpp"
Expand Down
3 changes: 1 addition & 2 deletions mavros/src/plugins/home_position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
* @{
*/

#include <tf2_eigen/tf2_eigen.hpp>

#include <memory>
#include <tf2_eigen/tf2_eigen.hpp>

#include "rcpputils/asserts.hpp"
#include "mavros/mavros_uas.hpp"
Expand Down
3 changes: 1 addition & 2 deletions mavros/src/plugins/imu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@
* @{
*/

#include <tf2_eigen/tf2_eigen.hpp>

#include <cmath>
#include <string>
#include <tf2_eigen/tf2_eigen.hpp>

#include "rcpputils/asserts.hpp"
#include "mavros/mavros_uas.hpp"
Expand Down
3 changes: 1 addition & 2 deletions mavros/src/plugins/local_position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@
* @{
*/

#include <tf2_eigen/tf2_eigen.hpp>

#include <string>
#include <tf2_eigen/tf2_eigen.hpp>

#include "rcpputils/asserts.hpp"
#include "mavros/mavros_uas.hpp"
Expand Down
8 changes: 5 additions & 3 deletions mavros/src/plugins/sys_status.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ class SystemStatusPlugin : public plugin::Plugin
// ):
// for v in l1:
// cog.outl(f"case enum_value(MAV_SEVERITY::{v}):")
// cog.outl(f" RCLCPP_{l2}_STREAM(node->get_logger(), \"FCU: EVENT \" << px4_id << \" with args \" << arg_str);")
// cog.outl(f" RCLCPP_{l2}_STREAM(node->get_logger(), \"FCU: EVENT \" << px4_id << \" with args \" << arg_str);") # NOLINT
// cog.outl(f" break;")
// ]]]
case enum_value(MAV_SEVERITY::EMERGENCY):
Expand Down Expand Up @@ -1037,8 +1037,10 @@ class SystemStatusPlugin : public plugin::Plugin
mavlink::common::msg::EVENT & eventm,
plugin::filter::SystemAndOk filter [[maybe_unused]])
{
uint8_t severity = eventm.log_levels & 0x0F; // take only 4 LSB, see https://mavlink.io/en/messages/common.html#EVENT
uint32_t px4_id = eventm.id & 0x00FFFFFF; // take only 24 LSB, see PX4 "constexpr uint32_t ID(const char (&name)[N])" function
// take only 4 LSB, see https://mavlink.io/en/messages/common.html#EVENT
uint8_t severity = eventm.log_levels & 0x0F;
// take only 24 LSB, see PX4 "constexpr uint32_t ID(const char (&name)[N])" function
uint32_t px4_id = eventm.id & 0x00FFFFFF;
process_event_normal(severity, px4_id, eventm.arguments);

auto evt_msg = mavros_msgs::msg::StatusEvent();
Expand Down

0 comments on commit 003f03d

Please sign in to comment.