AP_Arming: use new enum for home_is_set

This commit is contained in:
Andrew Tridgell 2015-02-21 10:13:43 +11:00
parent a53395cdb8
commit 3a51bac0d0
2 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ const AP_Param::GroupInfo AP_Arming::var_info[] PROGMEM = {
//The function point is particularly hacky, hacky, tacky
//but I don't want to reimplement messaging to GCS at the moment:
AP_Arming::AP_Arming(const AP_AHRS &ahrs_ref, const AP_Baro &baro, Compass &compass,
const bool &home_set, gcs_send_t_p gcs_print_func)
const enum HomeState &home_set, gcs_send_t_p gcs_print_func)
: armed(false)
, logging_available(false)
, skip_gyro_cal(false)
@ -259,7 +259,7 @@ bool AP_Arming::gps_checks(bool report)
const AP_GPS &gps = ahrs.get_gps();
//GPS OK?
if (!home_is_set ||
if (home_is_set == HOME_UNSET ||
gps.status() < AP_GPS::GPS_OK_FIX_3D ||
AP_Notify::flags.gps_glitching ||
AP_Notify::flags.failsafe_gps) {

View File

@ -41,7 +41,7 @@ public:
typedef void (*gcs_send_t_p)(gcs_severity, const prog_char_t*);
AP_Arming(const AP_AHRS &ahrs_ref, const AP_Baro &baro, Compass &compass,
const bool &home_set, gcs_send_t_p);
const enum HomeState &home_set, gcs_send_t_p);
ArmingRequired arming_required();
bool arm(uint8_t method);
@ -75,7 +75,7 @@ private:
const AP_AHRS &ahrs;
const AP_Baro &barometer;
Compass &_compass;
const bool &home_is_set;
const enum HomeState &home_is_set;
gcs_send_t_p gcs_send_text_P;
void set_enabled_checks(uint16_t);