Ardupilot2/libraries/AP_DAL/AP_DAL_VisualOdom.cpp
Andrew Tridgell e116b1ff0a AP_DAL: added data access layer library
This provides a wrapper around sensor and system calls to allow for
logging for replay in EKF2 and EKF3

Co-authored-by: Peter Barker <pbarker@barker.dropbear.id.au>
2020-11-10 16:15:45 +11:00

24 lines
448 B
C++

#include "AP_DAL_VisualOdom.h"
#include <AP_VisualOdom/AP_VisualOdom.h>
#include <AP_Logger/AP_Logger.h>
#include "AP_DAL.h"
AP_DAL_VisualOdom::AP_DAL_VisualOdom()
{
}
void AP_DAL_VisualOdom::start_frame()
{
const auto *vo = AP::visualodom();
const log_RVOH old = RVOH;
RVOH.ptr_is_nullptr = (vo == nullptr);
if (vo != nullptr) {
RVOH.healthy = vo->healthy();
}
WRITE_REPLAY_BLOCK_IFCHANGD(RVOH, RVOH, old);
}