Compare commits

...

7 Commits

Author SHA1 Message Date
Oleg Kalachev
d715206fbe Enable strict warnings for aruco_pose 2022-06-02 16:32:30 +03:00
Oleg Kalachev
9fc07c9479 Remove unused in optical flow 2022-06-02 16:19:17 +03:00
Oleg Kalachev
075779d81f Mark unused in optical_flow 2022-06-02 16:17:04 +03:00
Oleg Kalachev
fcfa1c2a30 Mark unused variable in vpe_publisher 2022-06-02 16:08:49 +03:00
Oleg Kalachev
7f1d89110b Mark unused variables in simple_offboard 2022-06-02 14:39:24 +03:00
Oleg Kalachev
2f261c6a20 Enable all warnings, fail on warnings 2022-06-02 14:34:24 +03:00
Oleg Kalachev
673343f042 Enable -Wall and -Wextra for simple_offboard 2022-06-02 13:41:29 +03:00
5 changed files with 11 additions and 8 deletions

View File

@@ -4,6 +4,8 @@ project(aruco_pose)
## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)
add_compile_options(-Wall -Wextra -Werror)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages

View File

@@ -4,6 +4,8 @@ project(clover)
## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)
add_compile_options(-Wall -Wextra -Werror)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages

View File

@@ -236,7 +236,6 @@ private:
prev_ = curr_.clone();
prev_stamp_ = msg->header.stamp;
publish_debug:
// Publish debug image
if (img_pub_.getNumSubscribers() > 0) {
// publish debug image
@@ -277,7 +276,7 @@ publish_debug:
return flow;
}
void paramCallback(clover::FlowConfig &config, uint32_t level)
void paramCallback(clover::FlowConfig &config, [[maybe_unused]] uint32_t level)
{
enabled_ = config.enabled;
if (!enabled_) {

View File

@@ -503,10 +503,10 @@ inline void checkManualControl()
if (check_kill_switch) {
// switch values: https://github.com/PX4/PX4-Autopilot/blob/c302514a0809b1765fafd13c014d705446ae1113/msg/manual_control_setpoint.msg#L3
const uint8_t SWITCH_POS_NONE = 0; // switch is not mapped
const uint8_t SWITCH_POS_ON = 1; // switch activated
const uint8_t SWITCH_POS_MIDDLE = 2; // middle position
const uint8_t SWITCH_POS_OFF = 3; // switch not activated
[[maybe_unused]] const uint8_t SWITCH_POS_NONE = 0; // switch is not mapped
[[maybe_unused]] const uint8_t SWITCH_POS_ON = 1; // switch activated
[[maybe_unused]] const uint8_t SWITCH_POS_MIDDLE = 2; // middle position
[[maybe_unused]] const uint8_t SWITCH_POS_OFF = 3; // switch not activated
const int KILL_SWITCH_BIT = 12; // https://github.com/PX4/Firmware/blob/c302514a0809b1765fafd13c014d705446ae1113/src/modules/mavlink/mavlink_messages.cpp#L3975
uint8_t kill_switch = (manual_control.buttons & (0b11 << KILL_SWITCH_BIT)) >> KILL_SWITCH_BIT;
@@ -808,7 +808,7 @@ bool setRates(SetRates::Request& req, SetRates::Response& res) {
return serve(RATES, NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN, NAN, req.pitch_rate, req.roll_rate, req.yaw_rate, NAN, NAN, req.thrust, NAN, "", req.auto_arm, res.success, res.message);
}
bool land(std_srvs::Trigger::Request& req, std_srvs::Trigger::Response& res)
bool land([[maybe_unused]] std_srvs::Trigger::Request& req, std_srvs::Trigger::Response& res)
{
try {
if (busy)

View File

@@ -109,7 +109,7 @@ void callback(const T& msg)
}
}
bool reset(std_srvs::Trigger::Request& req, std_srvs::Trigger::Response& res)
bool reset([[maybe_unused]] std_srvs::Trigger::Request& req, std_srvs::Trigger::Response& res)
{
reset_flag = true;
res.success = true;