mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 18:11:35 +08:00
Build fixes for qurt after rebase on PX4 master
Removed the re-definitions of the usage method in the posix/main.cpp file. Added qurt_external_hook interface to call externally linked module. Fixed code format to comply with PX4 style. Added usage information to main app and handled cases for unknown arguments. Fixed the orb_priority interface to use int32_t instead of int. Fixes to get hil working with led changes. Added the config_eagle_adsp.mk file and update the make files to to use new include/lib paths Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
****************************************************************************/
|
||||
/**
|
||||
* @file main.cpp
|
||||
* Basic shell to execute builtin "apps"
|
||||
* Basic shell to execute builtin "apps"
|
||||
*
|
||||
* @author Mark Charlebois <charlebm@gmail.com>
|
||||
*/
|
||||
@@ -56,6 +56,8 @@ static px4_task_t g_dspal_task = -1;
|
||||
__BEGIN_DECLS
|
||||
// The commands to run are specified in a target file: commands_<target>.c
|
||||
extern const char *get_commands(void);
|
||||
// Enable external library hook
|
||||
void qurt_external_hook(void) __attribute__((weak));
|
||||
__END_DECLS
|
||||
|
||||
static void run_cmd(map<string,px4_main_t> &apps, const vector<string> &appargs) {
|
||||
@@ -108,7 +110,7 @@ static void process_commands(map<string,px4_main_t> &apps, const char *cmds)
|
||||
|
||||
// Eat leading whitespace
|
||||
eat_whitespace(b, i);
|
||||
|
||||
|
||||
|
||||
for(;;) {
|
||||
// End of command line
|
||||
@@ -156,15 +158,17 @@ __END_DECLS
|
||||
|
||||
int dspal_entry( int argc, char* argv[] )
|
||||
{
|
||||
//const char *argv[2] = { "dspal_client", NULL };
|
||||
//int argc = 1;
|
||||
|
||||
PX4_INFO("In main\n");
|
||||
map<string,px4_main_t> apps;
|
||||
init_app_map(apps);
|
||||
px4::init_once();
|
||||
px4::init(argc, (char **)argv, "mainapp");
|
||||
process_commands(apps, get_commands());
|
||||
usleep( 1000000 ); // give time for all commands to execute before starting external function
|
||||
if(qurt_external_hook)
|
||||
{
|
||||
qurt_external_hook();
|
||||
}
|
||||
for( ;; ){
|
||||
usleep( 1000000 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user