Skip to content

Commit

Permalink
Fixed incorrect timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
Timothy Scott authored and LorenzMeier committed Jul 3, 2019
1 parent a2471fb commit dce1dda
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/lib/FlightTasks/tasks/Utility/ObstacleAvoidance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ ObstacleAvoidance::_publishAvoidanceDesiredWaypoint()
void ObstacleAvoidance::_publishVehicleCmdDoLoiter()
{
vehicle_command_s command{};
command.timestamp = hrt_absolute_time();
command.command = vehicle_command_s::VEHICLE_CMD_DO_SET_MODE;
command.param1 = (float)1; // base mode
command.param3 = (float)0; // sub mode
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 @@ -568,7 +568,7 @@ MavlinkReceiver::handle_message_optical_flow_rad(mavlink_message_t *msg)

optical_flow_s f = {};

f.timestamp = _mavlink_timesync.sync_stamp(flow.time_usec);
f.timestamp = hrt_absolute_time();
f.time_since_last_sonar_update = flow.time_delta_distance_us;
f.integration_timespan = flow.integration_time_us;
f.pixel_flow_x_integral = flow.integrated_x;
Expand Down
1 change: 1 addition & 0 deletions src/modules/mc_pos_control/mc_pos_control_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -979,6 +979,7 @@ void MulticopterPositionControl::check_failure(bool task_failure, uint8_t nav_st
void MulticopterPositionControl::send_vehicle_cmd_do(uint8_t nav_state)
{
vehicle_command_s command{};
command.timestamp = hrt_absolute_time();
command.command = vehicle_command_s::VEHICLE_CMD_DO_SET_MODE;
command.param1 = (float)1; // base mode
command.param3 = (float)0; // sub mode
Expand Down

0 comments on commit dce1dda

Please sign in to comment.