Browse Source

AP_AccelCal: added active() method

zr-v5.1
Andrew Tridgell 4 years ago committed by Peter Barker
parent
commit
580cd143b8
  1. 6
      libraries/AP_AccelCal/AP_AccelCal.cpp
  2. 3
      libraries/AP_AccelCal/AP_AccelCal.h

6
libraries/AP_AccelCal/AP_AccelCal.cpp

@ -382,3 +382,9 @@ bool AP_AccelCal::gcs_vehicle_position(float position) @@ -382,3 +382,9 @@ bool AP_AccelCal::gcs_vehicle_position(float position)
return false;
}
// true if we are in a calibration process
bool AP_AccelCal::active(void) const
{
return _status == ACCEL_CAL_WAITING_FOR_ORIENTATION || _status == ACCEL_CAL_COLLECTING_SAMPLE;
}

3
libraries/AP_AccelCal/AP_AccelCal.h

@ -36,6 +36,9 @@ public: @@ -36,6 +36,9 @@ public:
void handleMessage(const mavlink_message_t &msg);
// true if we are in a calibration process
bool active(void) const;
private:
GCS_MAVLINK *_gcs;
bool _use_gcs_snoop;

Loading…
Cancel
Save