diff --git a/libraries/AP_DAL/AP_DAL.cpp b/libraries/AP_DAL/AP_DAL.cpp index 0e4f309fad..b05c411e5d 100644 --- a/libraries/AP_DAL/AP_DAL.cpp +++ b/libraries/AP_DAL/AP_DAL.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #if APM_BUILD_TYPE(APM_BUILD_Replay) #include @@ -46,8 +47,12 @@ void AP_DAL::start_frame(AP_DAL::FrameType frametype) end_frame(); _RFRF.frame_types = uint8_t(frametype); - + +#if AP_VEHICLE_ENABLED _RFRH.time_flying_ms = AP::vehicle()->get_time_flying_ms(); +#else + _RFRH.time_flying_ms = 0; +#endif _RFRH.time_us = AP_HAL::micros64(); WRITE_REPLAY_BLOCK(RFRH, _RFRH);