Skip to content

Commit

Permalink
Blimp: Some fixups, swap mode land & mode hold so previous "land" beh…
Browse files Browse the repository at this point in the history
…aviour is kept...
  • Loading branch information
MichelleRos committed Jun 11, 2024
1 parent 8258a6a commit 068f781
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Blimp/Loiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ const AP_Param::GroupInfo Loiter::var_info[] = {
// @User: Advanced
AP_GROUPINFO("SCALER_SPD", 18, Loiter, scaler_spd, 0.99),

// @Param: LAG
// @DisplayName: Loiter lag
// @Param: POS_LAG
// @DisplayName: Loiter position lag
// @Description: Number of seconds' worth of travel that the actual position can be behind the target position.
// @Units: s
// @Range: 0 0.999
Expand Down
4 changes: 2 additions & 2 deletions Blimp/mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ class Mode

// Auto Pilot Modes enumeration
enum class Number : uint8_t {
LAND = 0, // go down to the ground, then go to mode hold
HOLD = 0, // hold (stop moving)
MANUAL = 1, // manual control
VELOCITY = 2, // velocity mode
LOITER = 3, // loiter mode (position hold)
RTL = 4, // rtl
AUTO = 5, // auto
HOLD = 6, // hold (stop moving)
LAND = 6, // go down to the ground, then go to mode hold
};

// constructor
Expand Down
5 changes: 0 additions & 5 deletions Blimp/mode_loiter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,5 @@ void ModeLoiter::run()
target_yaw = blimp.ahrs.get_yaw();
}

if (!blimp.motors->armed()) {
target_pos = blimp.pos_ned;
target_yaw = blimp.ahrs.get_yaw();
}

blimp.loiter->run(target_pos, target_yaw, Vector4b{false,false,false,false});
}

0 comments on commit 068f781

Please sign in to comment.