Merge branch 'beta' into stable

This commit is contained in:
Lorenz Meier
2015-08-11 10:51:43 +02:00
16 changed files with 64 additions and 25 deletions
+6
View File
@@ -97,6 +97,12 @@ then
fi
fi
# This is a FMUv2+ thing
if ver hwcmp PX4FMU_V1
then
set MIXER_AUX none
fi
if [ $MIXER_AUX != none ]
then
#
-5
View File
@@ -110,11 +110,6 @@ else
fi
fi
# Check for flow sensor
if px4flow start &
then
fi
if ll40ls start
then
fi
+10 -4
View File
@@ -705,16 +705,22 @@ then
# End of autostart
fi
# There is no further script processing, so we can free some RAM
# XXX potentially unset all script variables.
unset TUNE_ERR
# Boot is complete, inform MAVLink app(s) that the system is now fully up and running
mavlink boot_complete
if ver hwcmp PX4FMU_V2
then
# Check for flow sensor - as it is a background task, launch it last
px4flow start &
fi
if [ $EXIT_ON_END == yes ]
then
echo "Exit from nsh"
exit
fi
unset EXIT_ON_END
# There is no further processing, so we can free some RAM
# XXX potentially unset all script variables.
unset TUNE_ERR
+2
View File
@@ -268,6 +268,8 @@ CONFIG_STM32_USART=y
#
# U[S]ART Configuration
#
# Hot fix for lost data
CONFIG_STM32_RXDMA_BUFFER_SIZE_OVERRIDE=256
# CONFIG_USART1_RS485 is not set
CONFIG_USART1_RXDMA=y
# CONFIG_USART2_RS485 is not set
@@ -263,6 +263,8 @@ CONFIG_STM32_USART=y
#
# U[S]ART Configuration
#
# Hot fix for lost data
CONFIG_STM32_RXDMA_BUFFER_SIZE_OVERRIDE=256
# CONFIG_USART2_RS485 is not set
CONFIG_USART2_RXDMA=y
# CONFIG_USART6_RS485 is not set
+2
View File
@@ -260,6 +260,8 @@ CONFIG_STM32_USART=y
#
# U[S]ART Configuration
#
# Hot fix for lost data
CONFIG_STM32_RXDMA_BUFFER_SIZE_OVERRIDE=64
# CONFIG_USART1_RS485 is not set
# CONFIG_USART1_RXDMA is not set
# CONFIG_USART2_RS485 is not set
+2
View File
@@ -294,6 +294,8 @@ CONFIG_STM32_USART=y
#
# U[S]ART Configuration
#
# Hot fix for lost data
CONFIG_STM32_RXDMA_BUFFER_SIZE_OVERRIDE=256
# CONFIG_USART1_RS485 is not set
CONFIG_USART1_RXDMA=y
# CONFIG_USART2_RS485 is not set
+2
View File
@@ -41,4 +41,6 @@ SRCS = px4flow.cpp
MAXOPTIMIZATION = -Os
MODULE_STACKSIZE = 1200
EXTRACXXFLAGS = -Wno-attributes
@@ -205,7 +205,7 @@ int AttitudeEstimatorQ::start() {
_control_task = task_spawn_cmd("attitude_estimator_q",
SCHED_DEFAULT,
SCHED_PRIORITY_MAX - 5,
2500,
2000,
(main_t)&AttitudeEstimatorQ::task_main_trampoline,
nullptr);
+11 -4
View File
@@ -275,7 +275,7 @@ int commander_main(int argc, char *argv[])
if (!strcmp(argv[1], "start")) {
if (thread_running) {
warnx("commander already running");
warnx("already running");
/* this is not an error */
exit(0);
}
@@ -288,11 +288,18 @@ int commander_main(int argc, char *argv[])
commander_thread_main,
(argv) ? (char * const *)&argv[2] : (char * const *)NULL);
while (!thread_running) {
usleep(200);
unsigned constexpr max_wait_us = 1000000;
unsigned constexpr max_wait_steps = 2000;
unsigned i;
for (i = 0; i < max_wait_steps; i++) {
usleep(max_wait_us / max_wait_steps);
if (thread_running) {
break;
}
}
exit(0);
exit(!(i < max_wait_steps));
}
if (!strcmp(argv[1], "stop")) {
+6
View File
@@ -1789,6 +1789,12 @@ Mavlink::start(int argc, char *argv[])
// before returning to the shell
int ic = Mavlink::instance_count();
if (ic == MAVLINK_COMM_NUM_BUFFERS) {
warnx("Maximum MAVLink instance count of %d reached.",
(int)MAVLINK_COMM_NUM_BUFFERS);
return 1;
}
// Instantiate thread
char buf[24];
sprintf(buf, "mavlink_if%d", ic);
+2 -2
View File
@@ -53,6 +53,6 @@ MAXOPTIMIZATION = -Os
MODULE_STACKSIZE = 1200
EXTRACXXFLAGS = -Weffc++ -Wno-attributes -Wno-packed
EXTRACXXFLAGS = -Weffc++ -Wno-attributes -Wno-packed -DMAVLINK_COMM_NUM_BUFFERS=3
EXTRACFLAGS = -Wno-packed
EXTRACFLAGS = -Wno-packed -DMAVLINK_COMM_NUM_BUFFERS=3
+17 -3
View File
@@ -344,7 +344,20 @@ int sdlog2_main(int argc, char *argv[])
3000,
sdlog2_thread_main,
(char * const *)argv);
exit(0);
/* wait for the task to launch */
unsigned const max_wait_us = 1000000;
unsigned const max_wait_steps = 2000;
unsigned i;
for (i = 0; i < max_wait_steps; i++) {
usleep(max_wait_us / max_wait_steps);
if (thread_running) {
break;
}
}
exit(!(i < max_wait_steps));
}
if (!strcmp(argv[1], "stop")) {
@@ -1228,8 +1241,6 @@ int sdlog2_thread_main(int argc, char *argv[])
/* close stdout */
close(1);
thread_running = true;
/* initialize thread synchronization */
pthread_mutex_init(&logbuffer_mutex, NULL);
pthread_cond_init(&logbuffer_cond, NULL);
@@ -1263,6 +1274,9 @@ int sdlog2_thread_main(int argc, char *argv[])
sdlog2_start_log();
}
/* running, report */
thread_running = true;
while (!main_thread_should_exit) {
usleep(sleep_delay);
-4
View File
@@ -78,8 +78,6 @@ void cpuload_initialize_once()
system_load.tasks[i].valid = false;
}
uint64_t now = hrt_absolute_time();
int static_tasks_count = 2; // there are at least 2 threads that should be initialized statically - "idle" and "init"
#ifdef CONFIG_PAGING
@@ -94,7 +92,6 @@ void cpuload_initialize_once()
// perform static initialization of "system" threads
for (system_load.total_count = 0; system_load.total_count < static_tasks_count; system_load.total_count++) {
system_load.tasks[system_load.total_count].start_time = now;
system_load.tasks[system_load.total_count].total_runtime = 0;
system_load.tasks[system_load.total_count].curr_start_time = 0;
system_load.tasks[system_load.total_count].tcb = sched_gettcb(
@@ -111,7 +108,6 @@ void sched_note_start(FAR struct tcb_s *tcb)
for (i = 1; i < CONFIG_MAX_TASKS; i++) {
if (!system_load.tasks[i].valid) {
/* slot is available */
system_load.tasks[i].start_time = hrt_absolute_time();
system_load.tasks[i].total_runtime = 0;
system_load.tasks[i].curr_start_time = 0;
system_load.tasks[i].tcb = tcb;
-1
View File
@@ -42,7 +42,6 @@ __BEGIN_DECLS
struct system_load_taskinfo_s {
uint64_t total_runtime; ///< Runtime since start (start_time - total_runtime)/(start_time - current_time) = load
uint64_t curr_start_time; ///< Start time of the current scheduling slot
uint64_t start_time; ///< FIRST start time of task
FAR struct tcb_s *tcb; ///<
bool valid; ///< Task is currently active / valid
};