From 2b74d018fe957c3a9d17042d75ffbb7f7b695273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mayoral=20Vilches?= Date: Wed, 21 Jan 2015 12:00:45 +0100 Subject: [PATCH] HAL_Linux: Adjust set_system_clock Do nothing for HAL_BOARD_SUBTYPE_NONE. --- libraries/AP_HAL_Linux/Util.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libraries/AP_HAL_Linux/Util.cpp b/libraries/AP_HAL_Linux/Util.cpp index 4f3741d37e..c76bdf5472 100644 --- a/libraries/AP_HAL_Linux/Util.cpp +++ b/libraries/AP_HAL_Linux/Util.cpp @@ -54,10 +54,12 @@ void LinuxUtil::_toneAlarm_timer_tick(){ void LinuxUtil::set_system_clock(uint64_t time_utc_usec) { +#if CONFIG_HAL_BOARD_SUBTYPE != HAL_BOARD_SUBTYPE_NONE timespec ts; ts.tv_sec = time_utc_usec/1.0e6; ts.tv_nsec = (time_utc_usec % 1000000) * 1000; clock_settime(CLOCK_REALTIME, &ts); +#endif } #endif // CONFIG_HAL_BOARD == HAL_BOARD_LINUX