APO GPS bug fix.
This commit is contained in:
parent
5c16a380c0
commit
d47e43e0c4
@ -23,6 +23,7 @@ void setup() {
|
|||||||
AP_Guide * guide = NULL;
|
AP_Guide * guide = NULL;
|
||||||
AP_Controller * controller = NULL;
|
AP_Controller * controller = NULL;
|
||||||
AP_HardwareAbstractionLayer * hal = NULL;
|
AP_HardwareAbstractionLayer * hal = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Communications
|
* Communications
|
||||||
*/
|
*/
|
||||||
@ -50,6 +51,7 @@ void setup() {
|
|||||||
hal->debug->println_P(PSTR("initializing gps"));
|
hal->debug->println_P(PSTR("initializing gps"));
|
||||||
AP_GPS_Auto gpsDriver(&Serial1, &(hal->gps));
|
AP_GPS_Auto gpsDriver(&Serial1, &(hal->gps));
|
||||||
hal->gps = &gpsDriver;
|
hal->gps = &gpsDriver;
|
||||||
|
hal->gps->callback = delay;
|
||||||
hal->gps->init();
|
hal->gps->init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,7 +157,6 @@ void setup() {
|
|||||||
hal->hil = new COMMLINK_CLASS(&Serial1, navigator, guide, controller, hal);
|
hal->hil = new COMMLINK_CLASS(&Serial1, navigator, guide, controller, hal);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Start the autopilot
|
* Start the autopilot
|
||||||
*/
|
*/
|
||||||
|
@ -45,6 +45,7 @@ AP_Autopilot::AP_Autopilot(AP_Navigator * navigator, AP_Guide * guide,
|
|||||||
if (hal->gps->fix) {
|
if (hal->gps->fix) {
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
hal->gps->update();
|
||||||
hal->gcs->sendText(SEVERITY_LOW,
|
hal->gcs->sendText(SEVERITY_LOW,
|
||||||
PSTR("waiting for gps lock\n"));
|
PSTR("waiting for gps lock\n"));
|
||||||
hal->debug->printf_P(PSTR("waiting for gps lock\n"));
|
hal->debug->printf_P(PSTR("waiting for gps lock\n"));
|
||||||
@ -67,8 +68,8 @@ AP_Autopilot::AP_Autopilot(AP_Navigator * navigator, AP_Guide * guide,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
hal->debug->println_P(PSTR("waiting for hil packet"));
|
hal->debug->println_P(PSTR("waiting for hil packet"));
|
||||||
delay(1000);
|
|
||||||
}
|
}
|
||||||
|
delay(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
AP_MavlinkCommand::home.setAlt(_navigator->getAlt());
|
AP_MavlinkCommand::home.setAlt(_navigator->getAlt());
|
||||||
|
Loading…
Reference in New Issue
Block a user