aboutsummaryrefslogtreecommitdiff
path: root/apps/systemlib/systemlib.c
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2012-10-23 23:38:45 -0700
committerpx4dev <px4@purgatory.org>2012-10-23 23:51:13 -0700
commit2fc10320697ecaa9c4e0c52d4d047424e41e6336 (patch)
tree4f18f494ab811e29dc55452f92a63fff9d271dda /apps/systemlib/systemlib.c
parent34f99c7dca1995f8ddd9e8d61c4cbd7289f40e99 (diff)
downloadpx4-firmware-2fc10320697ecaa9c4e0c52d4d047424e41e6336.tar.gz
px4-firmware-2fc10320697ecaa9c4e0c52d4d047424e41e6336.tar.bz2
px4-firmware-2fc10320697ecaa9c4e0c52d4d047424e41e6336.zip
Major formatting/whitespace cleanup
Diffstat (limited to 'apps/systemlib/systemlib.c')
-rw-r--r--apps/systemlib/systemlib.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/apps/systemlib/systemlib.c b/apps/systemlib/systemlib.c
index 94a5283f0..50ac62464 100644
--- a/apps/systemlib/systemlib.c
+++ b/apps/systemlib/systemlib.c
@@ -131,7 +131,7 @@ int task_spawn(const char *name, int scheduler, int priority, int stack_size, ma
pid = task_create(name, priority, stack_size, entry, argv);
if (pid > 0) {
-
+
/* configure the scheduler */
struct sched_param param;
@@ -140,6 +140,7 @@ int task_spawn(const char *name, int scheduler, int priority, int stack_size, ma
/* XXX do any other private task accounting here before the task starts */
}
+
sched_unlock();
return pid;
@@ -157,15 +158,18 @@ int fmu_get_board_info(struct fmu_board_info_s *info)
statres = stat("/dev/bma180", &sb);
if (statres == OK) {
- /* BMA180 indicates a v1.5-v1.6 board */
- strcpy(info->board_name, "FMU v1.6");
- info->board_version = 16;
+ /* BMA180 indicates a v1.5-v1.6 board */
+ strcpy(info->board_name, "FMU v1.6");
+ info->board_version = 16;
+
} else {
statres = stat("/dev/accel", &sb);
+
if (statres == OK) {
/* MPU-6000 indicates a v1.7+ board */
strcpy(info->board_name, "FMU v1.7");
info->board_version = 17;
+
} else {
/* If no BMA and no MPU is present, it is a v1.3 board */
strcpy(info->board_name, "FMU v1.3");