Changes to allow the commander module to be built and run on Qurt (#21186)

* Changed exclusion to rely on the definition of PX4_STORAGEDIR
This commit is contained in:
Eric Katzfey
2023-03-06 09:49:07 -05:00
committed by GitHub
parent dc4926dc4d
commit daa302cdbe
9 changed files with 22 additions and 10 deletions
@@ -99,7 +99,10 @@ __END_DECLS
#define PX4_ROOTFSDIR CONFIG_BOARD_ROOTFSDIR
// Qurt doesn't have an SD card for storage
#ifndef __PX4_QURT
#define PX4_STORAGEDIR PX4_ROOTFSDIR
#endif
/****************************************************************************
* Defines for POSIX and ROS
+4 -3
View File
@@ -166,11 +166,12 @@ static px4_task_t px4_task_spawn_internal(const char *name, int priority, px4_ma
return -1;
} else {
//px4_clock_gettimemap[task_index].argv_storage[i], argv[i]);
strcpy(taskmap[task_index].argv_storage[i], argv[i]);
taskmap[task_index].argv[i] = taskmap[task_index].argv_storage[i];
}
} else {
// Must add NULL at end of argv
taskmap[task_index].argv[i] = nullptr;
break;
}
@@ -420,13 +421,13 @@ int px4_sem_timedwait(px4_sem_t *sem, const struct timespec *ts)
return 0;
}
int px4_prctl(int option, const char *arg2, pthread_t pid)
int px4_prctl(int option, const char *arg2, px4_task_t pid)
{
int rv = -1;
pthread_mutex_lock(&task_mutex);
for (int i = 0; i < PX4_MAX_TASKS; i++) {
if (taskmap[i].isused && taskmap[i].tid == pid) {
if (taskmap[i].isused && taskmap[i].tid == (pthread_t) pid) {
rv = pthread_attr_setthreadname(&taskmap[i].attr, arg2);
return rv;
}