Skip to content

Commit

Permalink
adapted to enum change in mavlink
Browse files Browse the repository at this point in the history
  • Loading branch information
Claudio-Chies committed Jul 22, 2024
1 parent 68d1136 commit 7f36a7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions msg/OrbitStatus.msg
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ uint8 ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1
uint8 ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2
uint8 ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3
uint8 ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4
uint8 ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5

uint64 timestamp # time since system start (microseconds)
float32 radius # Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise. [m]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,12 @@ bool FlightTaskOrbit::applyCommandParameters(const vehicle_command_s &command, b

// commanded heading behaviour
if (PX4_ISFINITE(command.param3)) {
_yaw_behaviour = command.param3;
if (command.param3 - 5.0f < FLT_EPSILON && !_is_position_on_circle()) {
_yaw_behaviour = _param_mc_orbit_yaw_mod.get();

} else {
_yaw_behaviour = _param_mc_orbit_yaw_mod.get();
} else {
_yaw_behaviour = command.param3;
}
}

// save current yaw estimate for ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING
Expand Down

0 comments on commit 7f36a7b

Please sign in to comment.