Skip to content
This repository has been archived by the owner on Oct 1, 2021. It is now read-only.

Commit

Permalink
Compiles now.
Browse files Browse the repository at this point in the history
  • Loading branch information
Slatye committed Oct 30, 2014
1 parent a49b9bb commit 36c20c4
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 1 deletion.
83 changes: 83 additions & 0 deletions makefiles/config_px4fmu-v1_APM.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#
# Makefile for the px4fmu-v1_APM configuration
#

#
# Use the configuration's ROMFS.
#
ROMFS_ROOT = $(SKETCHBOOK)/mk/PX4/ROMFS

MODULES += $(APM_MODULE_DIR)

#
# Board support modules
#
MODULES += drivers/device
MODULES += drivers/stm32
MODULES += drivers/stm32/adc
MODULES += drivers/stm32/tone_alarm
MODULES += drivers/led
MODULES += drivers/px4io
MODULES += drivers/px4fmu
MODULES += drivers/boards/px4fmu-v1
MODULES += drivers/rgbled
MODULES += drivers/l3gd20
# MODULES += drivers/bma180
MODULES += drivers/mpu6000
MODULES += drivers/hmc5883
MODULES += drivers/ms5611
MODULES += drivers/mb12xx
MODULES += drivers/ll40ls
MODULES += drivers/gps
#MODULES += drivers/hil
#MODULES += drivers/hott_telemetry
MODULES += drivers/blinkm
MODULES += drivers/airspeed
MODULES += drivers/ets_airspeed
MODULES += drivers/meas_airspeed
MODULES += drivers/mkblctrl
#MODULES += modules/sensors

#
# System commands
#
MODULES += systemcmds/mtd
MODULES += systemcmds/bl_update
MODULES += systemcmds/boardinfo
MODULES += systemcmds/i2c
MODULES += systemcmds/mixer
MODULES += systemcmds/perf
MODULES += systemcmds/pwm
MODULES += systemcmds/reboot
MODULES += systemcmds/top
MODULES += systemcmds/tests
MODULES += systemcmds/nshterm
MODULES += systemcmds/auth

#
# Libraries
#
MODULES += modules/systemlib
MODULES += modules/systemlib/mixer
MODULES += modules/uORB
MODULES += lib/mathlib/math/filter
MODULES += modules/libtomfastmath
MODULES += modules/libtomcrypt
MODULES += lib/conversion

#
# Transitional support - add commands from the NuttX export archive.
#
# In general, these should move to modules over time.
#
# Each entry here is <command>.<priority>.<stacksize>.<entrypoint> but we use a helper macro
# to make the table a bit more readable.
#
define _B
$(strip $1).$(or $(strip $2),SCHED_PRIORITY_DEFAULT).$(or $(strip $3),CONFIG_PTHREAD_STACK_DEFAULT).$(strip $4)
endef

# command priority stack entrypoint
BUILTIN_COMMANDS := \
$(call _B, sercon, , 2048, sercon_main ) \
$(call _B, serdis, , 2048, serdis_main )
21 changes: 21 additions & 0 deletions src/drivers/ets_airspeed/ets_airspeed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@
*/
#define MIN_ACCURATE_DIFF_PRES_PA 0

#define DIFF_PRES_SCALE_ETS 1 /* Default pressure scaling */

/* Measurement rate is 100Hz */
#define CONVERSION_INTERVAL (1000000 / 100) /* microseconds */

Expand All @@ -106,6 +108,11 @@ class ETSAirspeed : public Airspeed
virtual int measure();
virtual int collect();

/**
* Get the default scaling for this sensor
*/
virtual float get_default_scale();

};

/*
Expand Down Expand Up @@ -164,6 +171,10 @@ ETSAirspeed::collect()
log("zero value from sensor");
return -1;
}

// the ETS sensor outputs Pa directly, so scaling is never applied
// to its output.
float diff_pres_pa = (float) diff_pres_pa_raw;

// The raw value still should be compensated for the known offset
diff_pres_pa_raw -= _diff_pres_offset;
Expand Down Expand Up @@ -256,6 +267,16 @@ ETSAirspeed::cycle()
USEC2TICK(CONVERSION_INTERVAL));
}


/**
* get default scale of the sensor
*/
float
ETSAirspeed::get_default_scale()
{
return DIFF_PRES_SCALE_ETS;
}

/**
* Local functions in support of the shell command.
*/
Expand Down
1 change: 0 additions & 1 deletion src/drivers/mb12xx/mb12xx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ MB12XX::MB12XX(int bus, int address) :
_collect_phase(false),
_class_instance(-1),
_range_finder_topic(-1),
_class_instance(-1),
_sample_perf(perf_alloc(PC_ELAPSED, "mb12xx_read")),
_comms_errors(perf_alloc(PC_COUNT, "mb12xx_comms_errors")),
_buffer_overflows(perf_alloc(PC_COUNT, "mb12xx_buffer_overflows"))
Expand Down

0 comments on commit 36c20c4

Please sign in to comment.