Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/libraries/AP_DAL/examples/AP_DAL_Standalone/main.cpp
Views: 1800
//1// Ensure that AP_NavEKF libraries can be compiled when not linked to2// anything except the DAL.3//45#include <AP_DAL/AP_DAL.h>6#include <AP_NavEKF2/AP_NavEKF2.h>7#include <AP_NavEKF3/AP_NavEKF3.h>8#include <AP_Logger/AP_Logger.h>910void AP_Param::setup_object_defaults(void const*, AP_Param::GroupInfo const*) {}1112template<typename T, ap_var_type PT>13void AP_ParamT<T, PT>::set_and_default(const T &v) {}14template class AP_ParamT<int8_t, AP_PARAM_INT8>;151617int AP_HAL::Util::vsnprintf(char*, size_t, char const*, va_list) { return -1; }1819void *nologger = nullptr;20AP_Logger &AP::logger() {21return *((AP_Logger*)nologger); // this is not usually a good idea...22}23void AP_Logger::WriteBlock(void const*, unsigned short) {}2425class AP_HAL_DAL_Standalone : public AP_HAL::HAL {26public:27AP_HAL_DAL_Standalone() :28AP_HAL::HAL(29nullptr,30nullptr,31nullptr,32nullptr,33nullptr,34nullptr,35nullptr,36nullptr,37nullptr,38nullptr,39nullptr,40nullptr,41nullptr,42nullptr,43nullptr,44nullptr,45nullptr,46nullptr,47nullptr,48nullptr,49nullptr,50nullptr,51nullptr,52nullptr,53nullptr54) {}55void run(int argc, char* const argv[], Callbacks* callbacks) const override {}56void setup() { }57void loop() { }58};5960AP_HAL_DAL_Standalone _hal;61const AP_HAL::HAL &hal = _hal;6263NavEKF2 navekf2;64NavEKF3 navekf3;6566int main(int argc, const char *argv[])67{68navekf2.InitialiseFilter();69navekf3.InitialiseFilter();70navekf2.UpdateFilter();71navekf3.UpdateFilter();72return navekf2.healthy() && navekf3.healthy()?0:1;73}747576