Adding in DriverFramework

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois 2015-11-02 00:06:12 -08:00
parent d04a4969e2
commit 143fd4aec6
3 changed files with 7 additions and 5 deletions

View File

@ -14,6 +14,7 @@ if (NOT ${CMAKE_C_COMPILER_ID} STREQUAL "Clang" OR NOT APPLE)
target_link_libraries(mainapp
-Wl,--start-group
${module_libraries}
${driver_framework_libraries}
pthread m rt
-Wl,--end-group
)

View File

@ -199,7 +199,6 @@ ADCSIM *g_adc;
int
test(void)
{
DriverHandle h = DriverMgr::getHandle(ADCSIM0_DEVICE_PATH);
if (!h.isValid()) {
@ -245,7 +244,7 @@ adcsim_main(int argc, char *argv[])
}
}
if (argc > 1) {
if (argc > 1 && g_adc) {
if (!strcmp(argv[1], "test")) {
ret = test();
}

View File

@ -43,6 +43,9 @@
#include <sstream>
#include <vector>
#include <signal.h>
#include "apps.h"
#include "px4_middleware.h"
#include "DriverFramework.hpp"
namespace px4
{
@ -53,9 +56,6 @@ using namespace std;
typedef int (*px4_main_t)(int argc, char *argv[]);
#include "apps.h"
#include "px4_middleware.h"
static bool _ExitFlag = false;
extern "C" {
void _SigIntHandler(int sig_num);
@ -184,6 +184,7 @@ int main(int argc, char **argv)
}
if (!error_detected) {
DriverFramework::Framework::initialize();
px4::init_once();
px4::init(argc, argv, "mainapp");
@ -236,5 +237,6 @@ int main(int argc, char **argv)
vector<string> shutdown_cmd = { "shutdown" };
run_cmd(shutdown_cmd, true);
DriverFramework::Framework::shutdown();
}
}