Skip to content

Commit

Permalink
Format fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
okalachev committed Nov 19, 2019
1 parent 427f2cc commit a4e3d94
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ void AttitudeEstimatorQ::task_main()
// Check for timeouts on data
if (_ext_hdg_mode == 1) {
_ext_hdg_good = vision.timestamp > 0 && (hrt_elapsed_time(&vision.timestamp) < 500000);

} else if (_ext_hdg_mode == 2) {
_ext_hdg_good = mocap.timestamp > 0 && (hrt_elapsed_time(&mocap.timestamp) < 500000);
}
Expand Down
4 changes: 2 additions & 2 deletions src/modules/land_detector/MulticopterLandDetector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,12 +167,12 @@ bool MulticopterLandDetector::_get_ground_contact_state()
hrt_elapsed_time(&_distance_sensor.timestamp) < 200_ms &&
_distance_sensor.orientation == distance_sensor_s::ROTATION_DOWNWARD_FACING &&
_distance_sensor.current_distance <= _distance_sensor.max_distance &&
_distance_sensor.current_distance >= _distance_sensor.min_distance)
{
_distance_sensor.current_distance >= _distance_sensor.min_distance) {
// rangefinder data is valid
if (_distance_sensor.current_distance <= _params.clearance) {
return true;
}

// rangefinder says we're not landed, but we still try another conditions
}

Expand Down
2 changes: 1 addition & 1 deletion src/modules/mavlink/mavlink_receiver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2485,7 +2485,7 @@ void MavlinkReceiver::handle_message_statustext(mavlink_message_t *msg)
log_message.timestamp = hrt_absolute_time();

snprintf((char *)log_message.text, sizeof(log_message.text),
"[mavlink: component %d] %." STRINGIFY(MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN) "s", msg->compid, statustext.text);
"[mavlink: component %d] %." STRINGIFY(MAVLINK_MSG_STATUSTEXT_FIELD_TEXT_LEN) "s", msg->compid, statustext.text);

if (_log_message_pub == nullptr) {
_log_message_pub = orb_advertise(ORB_ID(log_message), &log_message);
Expand Down

0 comments on commit a4e3d94

Please sign in to comment.