Files
qt5-legatus-legacy/Lts/Proxies/TrainingAreaBase/Plugins/UAS/Test/test6.cpp
T
2026-08-13 18:33:10 +02:00

38 lines
770 B
C++
Executable File

#include <QApplication>
#include <QTimer>
#include <iostream>
#include <thread>
#include <dlfcn.h> // TODO: no UAS for windoof
#include <TmsIfAdapter/module_loader.h>
#include <TmsIfAdapter/tms_if_adapter.h>
#include <TmsIfAdapter/uav_commander.h>
int main(int argc, char **argv)
{
QCoreApplication app(argc, argv);
std::cout << "App started ..." << std::endl;
UAS::ModuleLoader::dlopen_handle handle = UAS::ModuleLoader::load("../lib/");
/*auto &adapter =*/ UAS::ModuleLoader::get(handle);
app.exec();
std::cout << "Stopping ..." << std::endl;
UAS::ModuleLoader::unload(handle);
std::cout << "Stopped ..." << std::endl;
std::this_thread::sleep_for(std::chrono::milliseconds(2000));
std::cout << "Exit ..." << std::endl;
return 0;
}