Skip to content

Commit

Permalink
Copter: Autorotation mode: minor tidy ups
Browse files Browse the repository at this point in the history
  • Loading branch information
MattKear committed Jan 25, 2024
1 parent 581e660 commit bd95095
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ArduCopter/mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -1935,8 +1935,8 @@ class ModeAutorotate : public Mode {
float _target_climb_rate_adjust;// Target vertical acceleration used during bail out phase
float _target_pitch_adjust; // Target pitch rate used during bail out phase
uint32_t _touchdown_time_ms;
bool hover_autorotation;
bool initial_energy_check;
bool hover_autorotation;
bool initial_energy_check;
float time_to_impact;

enum class Autorotation_Phase {
Expand Down
3 changes: 1 addition & 2 deletions ArduCopter/mode_autorotate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,7 @@ void ModeAutorotate::run()
g2.arot._using_rfnd = false;
}

// Initialise internal variables
float curr_vel_z = inertial_nav.get_velocity_z_up_cms(); // Current vertical descent
float curr_vel_z = inertial_nav.get_velocity_z_up_cms();

// Update time to impact only if we are not in the touch down phase. This must be updated before the state machine.
if (phase_switch != Autorotation_Phase::TOUCH_DOWN) {
Expand Down

0 comments on commit bd95095

Please sign in to comment.