mirror of https://github.com/ArduPilot/ardupilot
Copter: set system time on GPS lock
This commit is contained in:
parent
c8e21c194d
commit
6138dca2b2
|
@ -1300,6 +1300,10 @@ static void update_GPS(void)
|
||||||
// ap.home_is_set will be true so this will only happen once
|
// ap.home_is_set will be true so this will only happen once
|
||||||
ground_start_count = 0;
|
ground_start_count = 0;
|
||||||
init_home();
|
init_home();
|
||||||
|
|
||||||
|
// set system clock for log timestamps
|
||||||
|
hal.util->set_system_clock(g_gps->time_epoch_usec());
|
||||||
|
|
||||||
if (g.compass_enabled) {
|
if (g.compass_enabled) {
|
||||||
// Set compass declination automatically
|
// Set compass declination automatically
|
||||||
compass.set_initial_location(g_gps->latitude, g_gps->longitude);
|
compass.set_initial_location(g_gps->latitude, g_gps->longitude);
|
||||||
|
|
Loading…
Reference in New Issue