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

Commit 36c20c4

Browse files
committed
Compiles now.
1 parent a49b9bb commit 36c20c4

3 files changed

Lines changed: 104 additions & 1 deletion

File tree

makefiles/config_px4fmu-v1_APM.mk

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
#
2+
# Makefile for the px4fmu-v1_APM configuration
3+
#
4+
5+
#
6+
# Use the configuration's ROMFS.
7+
#
8+
ROMFS_ROOT = $(SKETCHBOOK)/mk/PX4/ROMFS
9+
10+
MODULES += $(APM_MODULE_DIR)
11+
12+
#
13+
# Board support modules
14+
#
15+
MODULES += drivers/device
16+
MODULES += drivers/stm32
17+
MODULES += drivers/stm32/adc
18+
MODULES += drivers/stm32/tone_alarm
19+
MODULES += drivers/led
20+
MODULES += drivers/px4io
21+
MODULES += drivers/px4fmu
22+
MODULES += drivers/boards/px4fmu-v1
23+
MODULES += drivers/rgbled
24+
MODULES += drivers/l3gd20
25+
# MODULES += drivers/bma180
26+
MODULES += drivers/mpu6000
27+
MODULES += drivers/hmc5883
28+
MODULES += drivers/ms5611
29+
MODULES += drivers/mb12xx
30+
MODULES += drivers/ll40ls
31+
MODULES += drivers/gps
32+
#MODULES += drivers/hil
33+
#MODULES += drivers/hott_telemetry
34+
MODULES += drivers/blinkm
35+
MODULES += drivers/airspeed
36+
MODULES += drivers/ets_airspeed
37+
MODULES += drivers/meas_airspeed
38+
MODULES += drivers/mkblctrl
39+
#MODULES += modules/sensors
40+
41+
#
42+
# System commands
43+
#
44+
MODULES += systemcmds/mtd
45+
MODULES += systemcmds/bl_update
46+
MODULES += systemcmds/boardinfo
47+
MODULES += systemcmds/i2c
48+
MODULES += systemcmds/mixer
49+
MODULES += systemcmds/perf
50+
MODULES += systemcmds/pwm
51+
MODULES += systemcmds/reboot
52+
MODULES += systemcmds/top
53+
MODULES += systemcmds/tests
54+
MODULES += systemcmds/nshterm
55+
MODULES += systemcmds/auth
56+
57+
#
58+
# Libraries
59+
#
60+
MODULES += modules/systemlib
61+
MODULES += modules/systemlib/mixer
62+
MODULES += modules/uORB
63+
MODULES += lib/mathlib/math/filter
64+
MODULES += modules/libtomfastmath
65+
MODULES += modules/libtomcrypt
66+
MODULES += lib/conversion
67+
68+
#
69+
# Transitional support - add commands from the NuttX export archive.
70+
#
71+
# In general, these should move to modules over time.
72+
#
73+
# Each entry here is <command>.<priority>.<stacksize>.<entrypoint> but we use a helper macro
74+
# to make the table a bit more readable.
75+
#
76+
define _B
77+
$(strip $1).$(or $(strip $2),SCHED_PRIORITY_DEFAULT).$(or $(strip $3),CONFIG_PTHREAD_STACK_DEFAULT).$(strip $4)
78+
endef
79+
80+
# command priority stack entrypoint
81+
BUILTIN_COMMANDS := \
82+
$(call _B, sercon, , 2048, sercon_main ) \
83+
$(call _B, serdis, , 2048, serdis_main )

src/drivers/ets_airspeed/ets_airspeed.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@
8888
*/
8989
#define MIN_ACCURATE_DIFF_PRES_PA 0
9090

91+
#define DIFF_PRES_SCALE_ETS 1 /* Default pressure scaling */
92+
9193
/* Measurement rate is 100Hz */
9294
#define CONVERSION_INTERVAL (1000000 / 100) /* microseconds */
9395

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

111+
/**
112+
* Get the default scaling for this sensor
113+
*/
114+
virtual float get_default_scale();
115+
109116
};
110117

111118
/*
@@ -164,6 +171,10 @@ ETSAirspeed::collect()
164171
log("zero value from sensor");
165172
return -1;
166173
}
174+
175+
// the ETS sensor outputs Pa directly, so scaling is never applied
176+
// to its output.
177+
float diff_pres_pa = (float) diff_pres_pa_raw;
167178

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

270+
271+
/**
272+
* get default scale of the sensor
273+
*/
274+
float
275+
ETSAirspeed::get_default_scale()
276+
{
277+
return DIFF_PRES_SCALE_ETS;
278+
}
279+
259280
/**
260281
* Local functions in support of the shell command.
261282
*/

src/drivers/mb12xx/mb12xx.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ MB12XX::MB12XX(int bus, int address) :
198198
_collect_phase(false),
199199
_class_instance(-1),
200200
_range_finder_topic(-1),
201-
_class_instance(-1),
202201
_sample_perf(perf_alloc(PC_ELAPSED, "mb12xx_read")),
203202
_comms_errors(perf_alloc(PC_COUNT, "mb12xx_comms_errors")),
204203
_buffer_overflows(perf_alloc(PC_COUNT, "mb12xx_buffer_overflows"))

0 commit comments

Comments
 (0)