Browse Source

Plane: log Qassist state

c415-sdk
Iampete1 4 years ago committed by Andrew Tridgell
parent
commit
c03de6bdbe
  1. 5
      ArduPlane/Log.cpp
  2. 3
      ArduPlane/quadplane.cpp
  3. 1
      ArduPlane/quadplane.h

5
ArduPlane/Log.cpp

@ -371,9 +371,10 @@ const struct LogStructure Plane::log_structure[] = { @@ -371,9 +371,10 @@ const struct LogStructure Plane::log_structure[] = {
// @Field: CRt: climb rate
// @Field: TMix: transition throttle mix value
// @Field: Sscl: speed scalar for tailsitter control surfaces
// @Field: Trans: Transistion state
// @Field: Trn: Transistion state
// @Field: Ast: Q assist active state
{ LOG_QTUN_MSG, sizeof(QuadPlane::log_QControl_Tuning),
"QTUN", "QffffffeccffB", "TimeUS,ThI,ABst,ThO,ThH,DAlt,Alt,BAlt,DCRt,CRt,TMix,Sscl,Trans", "s----mmmnn---", "F----00000-0-" },
"QTUN", "QffffffeccffBB", "TimeUS,ThI,ABst,ThO,ThH,DAlt,Alt,BAlt,DCRt,CRt,TMix,Sscl,Trn,Ast", "s----mmmnn----", "F----00000-0--" },
// @LoggerMessage: AOA
// @Description: Angle of attack and Side Slip Angle values

3
ArduPlane/quadplane.cpp

@ -2946,7 +2946,8 @@ void QuadPlane::Log_Write_QControl_Tuning() @@ -2946,7 +2946,8 @@ void QuadPlane::Log_Write_QControl_Tuning()
climb_rate : int16_t(inertial_nav.get_velocity_z()),
throttle_mix : attitude_control->get_throttle_mix(),
speed_scaler : log_spd_scaler,
transition_state : static_cast<uint8_t>(transition_state)
transition_state : static_cast<uint8_t>(transition_state),
assist : assisted_flight,
};
plane.logger.WriteBlock(&pkt, sizeof(pkt));

1
ArduPlane/quadplane.h

@ -163,6 +163,7 @@ public: @@ -163,6 +163,7 @@ public:
float throttle_mix;
float speed_scaler;
uint8_t transition_state;
uint8_t assist;
};
MAV_TYPE get_mav_type(void) const;

Loading…
Cancel
Save