Skip to content

Commit

Permalink
Plane: add system ID to quadplane
Browse files Browse the repository at this point in the history
  • Loading branch information
bnsgeyer committed Jan 29, 2025
1 parent 684cebd commit d2b4a6f
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions ArduPlane/GCS_MAVLink_Plane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ MAV_MODE GCS_MAVLINK_Plane::base_mode() const
case Mode::Number::FLY_BY_WIRE_B:
#if HAL_QUADPLANE_ENABLED
case Mode::Number::QSTABILIZE:
case Mode::Number::QSYSTEMID:
case Mode::Number::QHOVER:
case Mode::Number::QLOITER:
case Mode::Number::QLAND:
Expand Down Expand Up @@ -1606,6 +1607,7 @@ uint8_t GCS_MAVLINK_Plane::send_available_mode(uint8_t index) const
// Quadplane modes
const Mode* q_modes[] {
&plane.mode_qstabilize,
&plane.mode_qsystemid,
&plane.mode_qhover,
&plane.mode_qloiter,
&plane.mode_qland,
Expand Down
1 change: 1 addition & 0 deletions ArduPlane/GCS_Plane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ void GCS_Plane::update_vehicle_sensor_status_flags(void)
case Mode::Number::AUTOTUNE:
#if HAL_QUADPLANE_ENABLED
case Mode::Number::QSTABILIZE:
case Mode::Number::QSYSTEMID:
case Mode::Number::QHOVER:
case Mode::Number::QLAND:
case Mode::Number::QLOITER:
Expand Down
2 changes: 2 additions & 0 deletions ArduPlane/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ void Plane::failsafe_short_on_event(enum failsafe_state fstype, ModeReason reaso

#if HAL_QUADPLANE_ENABLED
case Mode::Number::QSTABILIZE:
case Mode::Number::QSYSTEMID:
case Mode::Number::QLOITER:
case Mode::Number::QHOVER:
#if QAUTOTUNE_ENABLED
Expand Down Expand Up @@ -162,6 +163,7 @@ void Plane::failsafe_long_on_event(enum failsafe_state fstype, ModeReason reason

#if HAL_QUADPLANE_ENABLED
case Mode::Number::QSTABILIZE:
case Mode::Number::QSYSTEMID:
case Mode::Number::QHOVER:
case Mode::Number::QLOITER:
case Mode::Number::QACRO:
Expand Down
2 changes: 1 addition & 1 deletion ArduPlane/mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ class ModeQSystemId : public Mode {
bool allows_throttle_nudging() const override { return true; }

// methods that affect movement of the vehicle in this mode
// void update() override;
void update() override;

// used as a base class for all Q modes
bool _enter() override;
Expand Down
2 changes: 1 addition & 1 deletion ArduPlane/mode_qsystemid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ bool ModeQSystemId::_enter()
return true;
}

void ModeQStabilize::update()
void ModeQSystemId::update()
{

}
Expand Down
4 changes: 4 additions & 0 deletions ArduPlane/quadplane.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,10 @@ const AP_Param::GroupInfo QuadPlane::var_info2[] = {
// @User: Standard
AP_GROUPINFO("APPROACH_DIST", 39, QuadPlane, approach_distance, 0),

// @Group: SID
// @Path: mode_qsystemid.cpp
AP_SUBGROUPINFO(mode_qsystemid, "SID", 40, QuadPlane, ModeQSystemId),

AP_GROUPEND
};

Expand Down
2 changes: 2 additions & 0 deletions ArduPlane/quadplane.h
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,8 @@ class QuadPlane

AC_WeatherVane *weathervane;

void mode_qsystemid;

bool initialised;

Location last_auto_target;
Expand Down

0 comments on commit d2b4a6f

Please sign in to comment.