Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fligh anomaly data error #465

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions msg/FlightAnomaly.msg
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
# if(flightAnomalyData)
# {
# ROS_INFO("Flight Anomaly Reported by Flight Controller. Here are details:");
# if(flightAnomalyData && dji_osdk_ros::FlightAnomaly::COMPASS_INSTALLATION_ERROR)
# if(flightAnomalyData & dji_osdk_ros::FlightAnomaly::COMPASS_INSTALLATION_ERROR)
# {
# ROS_INFO("COMPASS_INSTALLATION_ERROR");
# }
#
# if(flightAnomalyData && dji_osdk_ros::FlightAnomaly::IMU_INSTALLATION_ERROR)
# if(flightAnomalyData & dji_osdk_ros::FlightAnomaly::IMU_INSTALLATION_ERROR)
# {
# ROS_INFO("IMU_INSTALLATION_ERROR");
# }
Expand Down
11 changes: 11 additions & 0 deletions src/dji_osdk_ros/modules/dji_vehicle_node_mission_services.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,8 @@ bool VehicleNode::waypointV2StartMissionCallback(
}

response.result = ptr_wrapper_->startWaypointV2Mission(WAIT_TIMEOUT);

return response.result;
}

bool VehicleNode::waypointV2StopMissionCallback(
Expand All @@ -673,6 +675,8 @@ bool VehicleNode::waypointV2StopMissionCallback(
}

response.result = ptr_wrapper_->stopWaypointV2Mission(WAIT_TIMEOUT);

return response.result;
}

bool VehicleNode::waypointV2PauseMissionCallback(
Expand All @@ -688,6 +692,8 @@ bool VehicleNode::waypointV2PauseMissionCallback(
}

response.result = ptr_wrapper_->pauseWaypointV2Mission(WAIT_TIMEOUT);

return response.result;
}

bool VehicleNode::waypointV2ResumeMissionCallback(
Expand All @@ -703,6 +709,8 @@ bool VehicleNode::waypointV2ResumeMissionCallback(
}

response.result = ptr_wrapper_->resumeWaypointV2Mission(WAIT_TIMEOUT);

return response.result;
}

bool VehicleNode::waypointV2GenerateActionsCallback(
Expand Down Expand Up @@ -911,6 +919,7 @@ bool VehicleNode::waypointV2GenerateActionsCallback(
response.result = true;
}
}

return response.result;
}

Expand Down Expand Up @@ -948,6 +957,8 @@ bool VehicleNode::waypointV2GetGlobalCruisespeedCallback(
}

response.result = ptr_wrapper_->getGlobalCruiseSpeed(response.global_cruisespeed, WAIT_TIMEOUT);

return response.result;
}

//10HZ push
Expand Down
4 changes: 2 additions & 2 deletions src/dji_osdk_ros/samples/telemetry_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,11 @@ int main(int argc ,char** argv)
ROS_INFO("rcConnectionStatus:");
ROS_INFO("rc_connection_status_: %d\n", rc_connection_status_.data);
ROS_INFO("flightAnomaly:");
if (flight_anomaly_.data && dji_osdk_ros::FlightAnomaly::COMPASS_INSTALLATION_ERROR)
if (flight_anomaly_.data & dji_osdk_ros::FlightAnomaly::COMPASS_INSTALLATION_ERROR)
{
ROS_INFO("COMPASS_INSTALLATION_ERROR\n");
}
if (flight_anomaly_.data && dji_osdk_ros::FlightAnomaly::IMU_INSTALLATION_ERROR)
if (flight_anomaly_.data & dji_osdk_ros::FlightAnomaly::IMU_INSTALLATION_ERROR)
{
ROS_INFO("IMU_INSTALLATION_ERROR\n");
}
Expand Down