mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 07:23:34 +08:00
QuRT: enable uORB, and simulator
uORB, the simulator and simulated devices now run Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -52,7 +52,7 @@ int HelloExample::main()
|
||||
int i=0;
|
||||
while (!appState.exitRequested() && i<5) {
|
||||
|
||||
PX4_DEBUG(" Doing work...\n");
|
||||
PX4_DEBUG(" Doing work...");
|
||||
++i;
|
||||
}
|
||||
|
||||
|
||||
@@ -47,10 +47,10 @@ int PX4_MAIN(int argc, char **argv)
|
||||
{
|
||||
px4::init(argc, argv, "hello");
|
||||
|
||||
PX4_DEBUG("hello\n");
|
||||
PX4_DEBUG("hello");
|
||||
HelloExample hello;
|
||||
hello.main();
|
||||
|
||||
PX4_DEBUG("goodbye\n");
|
||||
PX4_DEBUG("goodbye");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -53,11 +53,10 @@ extern "C" __EXPORT int hello_main(int argc, char *argv[]);
|
||||
|
||||
static void usage()
|
||||
{
|
||||
PX4_DEBUG("usage: hello {start|stop|status}\n");
|
||||
PX4_DEBUG("usage: hello {start|stop|status}");
|
||||
}
|
||||
int hello_main(int argc, char *argv[])
|
||||
{
|
||||
PX4_DEBUG("argc = %d %s %s %p\n", argc, argv[0], argv[1], argv[2]);
|
||||
if (argc < 2) {
|
||||
usage();
|
||||
return 1;
|
||||
@@ -65,9 +64,8 @@ int hello_main(int argc, char *argv[])
|
||||
|
||||
if (!strcmp(argv[1], "start")) {
|
||||
|
||||
PX4_DEBUG("Starting\n");
|
||||
if (HelloExample::appState.isRunning()) {
|
||||
PX4_DEBUG("already running\n");
|
||||
PX4_DEBUG("already running");
|
||||
/* this is not an error */
|
||||
return 0;
|
||||
}
|
||||
@@ -89,10 +87,10 @@ int hello_main(int argc, char *argv[])
|
||||
|
||||
if (!strcmp(argv[1], "status")) {
|
||||
if (HelloExample::appState.isRunning()) {
|
||||
PX4_DEBUG("is running\n");
|
||||
PX4_DEBUG("is running");
|
||||
|
||||
} else {
|
||||
PX4_DEBUG("not started\n");
|
||||
PX4_DEBUG("not started");
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user