Skip to content

Commit

Permalink
Terrain Avoidance: for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
timtuxworth committed Jun 6, 2024
1 parent e27dea7 commit 7e53a41
Show file tree
Hide file tree
Showing 6 changed files with 1,319 additions and 1,248 deletions.
7 changes: 7 additions & 0 deletions ArduPlane/ArduPlane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -963,6 +963,13 @@ bool Plane::flight_option_enabled(FlightOptions flight_option) const
return g2.flight_options & flight_option;
}

// Implements the virtual function from AP_Vehicle. Should probabl be set_desired_airspeed()
bool Plane::set_desired_airspeed(float airspeed_new)
{
plane.new_airspeed_cm = constrain_float(airspeed_new, aparm.airspeed_min, aparm.airspeed_max) * 100.0f;
return true;
}

#if AC_PRECLAND_ENABLED
void Plane::precland_update(void)
{
Expand Down
1 change: 1 addition & 0 deletions ArduPlane/Plane.h
Original file line number Diff line number Diff line change
Expand Up @@ -1045,6 +1045,7 @@ class Plane : public AP_Vehicle {
void update_flight_stage();
void set_flight_stage(AP_FixedWing::FlightStage fs);
bool flight_option_enabled(FlightOptions flight_option) const;
bool set_desired_airspeed(float airspeed_new) override;

// navigation.cpp
void loiter_angle_reset(void);
Expand Down
Loading

0 comments on commit 7e53a41

Please sign in to comment.