mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 02:53:34 +08:00
Merge branch 'bringup-m1' of https://github.com/mcharleb/Firmware into bringup-m2
Conflicts: Tools/posix_apps.py Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -47,6 +47,7 @@ print("""
|
||||
|
||||
#include <px4_tasks.h>
|
||||
#include <px4_posix.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
@@ -63,6 +64,7 @@ static int list_tasks_main(int argc, char *argv[]);
|
||||
static int list_files_main(int argc, char *argv[]);
|
||||
static int list_devices_main(int argc, char *argv[]);
|
||||
static int list_topics_main(int argc, char *argv[]);
|
||||
static int sleep_main(int argc, char *argv[]);
|
||||
}
|
||||
|
||||
|
||||
@@ -80,6 +82,7 @@ print('\tapps["list_tasks"] = list_tasks_main;')
|
||||
print('\tapps["list_files"] = list_files_main;')
|
||||
print('\tapps["list_devices"] = list_devices_main;')
|
||||
print('\tapps["list_topics"] = list_topics_main;')
|
||||
print('\tapps["sleep"] = sleep_main;'
|
||||
print("""
|
||||
return apps;
|
||||
}
|
||||
@@ -121,5 +124,14 @@ static int list_files_main(int argc, char *argv[])
|
||||
px4_show_files();
|
||||
return 0;
|
||||
}
|
||||
static int sleep_main(int argc, char *argv[])
|
||||
{
|
||||
if (argc != 2) {
|
||||
cout << "Usage: sleep <seconds>" << endl;
|
||||
return 1;
|
||||
}
|
||||
sleep(atoi(argv[1]));
|
||||
return 0;
|
||||
}
|
||||
""")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user