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

Add a system command for writing/viewing OTP, see docs below... #42

Open
wants to merge 177 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
71c87bb
px4io: fixed errno returns to be negative
Nov 6, 2014
61f51a6
systemcmds: added reflect command for USB testing
Nov 7, 2014
be4f68e
px4io: only check SAFETY_OFF for allowing RC config changes and reboot
Nov 8, 2014
4d20714
airspeed: use _retries=2 for I2C retries once initialised
Nov 3, 2014
a639a2c
px4io: prevent use of uninitialised memory in io_set_arming_state()
Nov 25, 2014
d9d1573
lsm303d: only use GPIO_EXTI_ACCEL_DRDY when available
Nov 27, 2014
5b7fa44
makefiles: removed stray spaces
Dec 3, 2014
8cae3db
makefiles: make it easier to use ccache for build on windows
Dec 3, 2014
fee131b
Merge remote-tracking branch 'upstream/master'
tridge Dec 6, 2014
c93002f
defconfig: raise CONFIG_NFILE_DESCRIPTORS to 50
tridge Dec 9, 2014
e6ca006
MPU6000: Add regdump command
gmorph Dec 20, 2014
a462073
mpu6000: monitor some key registers for correct values
tridge Dec 24, 2014
171e303
lsm303d: replace old register checking with new check_registers() method
tridge Dec 29, 2014
3c4f0a7
mpu6000: try resetting the mpu6000 up to 5 times
tridge Dec 29, 2014
7971140
l3gd20: added register checking
tridge Dec 29, 2014
902e82d
mpu6000: added factory self-test function
tridge Dec 29, 2014
1c17608
mpu6000: monitor some more registers
tridge Dec 29, 2014
c53a0a6
mpu6000: added "mpu6000 testerror" command
tridge Dec 29, 2014
7cf0fe5
mpu6000: wait for 10ms after a full reset
tridge Dec 29, 2014
bc0962e
mpu6000: make register fixup much closer to a reset()
tridge Dec 29, 2014
31b8ed1
l3gd20: added "l3gd20 regdump" command
tridge Dec 30, 2014
1992f0b
l3gd20: use the I2C disable bit on l3gd20H
tridge Dec 30, 2014
1407840
NuttxConfig: increase I2C timeout to 10ms
rmackay9 Dec 20, 2014
42731cc
i2c: const get_address
rmackay9 Dec 30, 2014
8ba3569
batt_smbus: driver for smart battery
rmackay9 Nov 25, 2014
9c6c17d
batt_smbus: remove sleep before I2C transfer
rmackay9 Dec 9, 2014
920be50
batt_smbus: remove redundant ORB_DECLARE
rmackay9 Dec 15, 2014
5e2604a
batt_smbus: minor format fix
rmackay9 Dec 29, 2014
d5e4ac1
batt_smbus: add get_PEC
rmackay9 Dec 15, 2014
facbeef
batt_smbus: add search
rmackay9 Dec 30, 2014
d7c11da
l3gd20: added testerror command
tridge Dec 31, 2014
12517b7
l3gd20: removed printf in interrupt context
tridge Dec 31, 2014
d411598
l3gd20: check DRDY after check_registers() is called
tridge Dec 31, 2014
bfed6b2
l3gd20: fixed reporting of error count
tridge Dec 31, 2014
cd0e668
l3m303d: added testerror command
tridge Dec 31, 2014
3329af7
lsm303d: added two more checked registers
tridge Dec 31, 2014
7b3e24d
lsm303d: removed unsafe printf in interrupt context
tridge Dec 31, 2014
94a6384
lsm303d: check DRDY after check_registers()
tridge Dec 31, 2014
95364f6
lsm303d: show all perf counters in "info"
tridge Dec 31, 2014
71df171
mpu6000: removed unsafe printf in interrupt context
tridge Dec 31, 2014
fe77c5f
l3gd20: fixed build warning
tridge Dec 31, 2014
2a076d7
lsm303d: fixed build warning
tridge Dec 31, 2014
cf91896
ll40ls: fixed exit code on external sensor startup failure
tridge Dec 31, 2014
ce60265
lsm303d: detect large fixed values and report an error
tridge Jan 2, 2015
9661c3b
Merge remote-tracking branch 'upstream/master' into merge-jan-2015
tridge Jan 5, 2015
97655fd
uavcan: use UAVCAN variable for uavcan directory
tridge Jan 5, 2015
061d414
hmc5883: fixed handling of 3 bus options
tridge Jan 9, 2015
4cbc6ff
hmc5883: fixed mixup of internal and external hmc5883 I2C bus options
tridge Jan 20, 2015
83177c6
hmc5883: fixed DEVIOCGDEVICEID ioctl
tridge Jan 20, 2015
6603bbe
batt_smbus: disable if no batt 10seconds after startup
rmackay9 Jan 21, 2015
b2b6ec5
px4io: add safety_arm and safety_disarm commands
jschall Jan 29, 2015
0ab3716
ms5611: allow for all 4 bus combinations in ms5611 driver
tridge Feb 1, 2015
9ebcc43
px4fmu-v1: removed baro I2C address in board_config.h
tridge Feb 1, 2015
fba85df
ms5611: removed debug code
tridge Feb 1, 2015
c9e12a4
IO driver: Fix naming of safety command line argument
LorenzMeier Feb 1, 2015
257a836
systemcmds: added usb_connected command
tridge Feb 6, 2015
64e52b1
l3gd20: fixed "l3gd20 test"
tridge Feb 11, 2015
93ca517
l3gd20: checking status only makes sense if we have DRDY
tridge Feb 11, 2015
7799dc5
trone: added support for WHOAMI register
lfrodrigues Jan 26, 2015
471eb14
hmc5883: Fix for Issue1858 detection of MAG on Int/Ext I2C Bus.
gmorph Feb 6, 2015
e6126fd
batt_smbus: run I2C at 100kHz
tridge Feb 13, 2015
ff61524
px4flow: run I2C at 100kHz
tridge Feb 13, 2015
58cbeed
ms5611: run I2C at 100kHz
tridge Feb 13, 2015
9d9beb0
hmc5883: run I2C at 100kHz
tridge Feb 13, 2015
0206300
Merge remote-tracking branch 'upstream/master'
tridge Feb 13, 2015
7d880ac
Merge remote-tracking branch 'upstream/master'
tridge Feb 13, 2015
6e00c4c
hmc5883: fixed build errors with gcc 2.7.4 and -O3
tridge Feb 13, 2015
55fff0d
batt_smbus: fixed device path
tridge Feb 13, 2015
3104fd9
build: avoid wiping an existing PYTHONPATH variable
tridge Feb 13, 2015
e2adbba
i2c: prevent double free of _dev pointer
tridge Feb 13, 2015
487a3a4
Tools: improve python package error message
tridge Feb 13, 2015
ee41fae
PX4: better error msg in python uorb generation error
tridge Feb 14, 2015
8d11607
batt_smbus: reverse reported current
rmackay9 Feb 19, 2015
5341001
drivers: added header for pwm_input
Slatye Feb 20, 2015
ace5bbf
pwm_input: added uORB message structure
Slatye Feb 20, 2015
d105d8c
fmuv2: setup for PWM input on timer4, channel 2
tridge Feb 21, 2015
5fe02c9
pwm_input: added PWM input driver
tridge Feb 21, 2015
dd09422
px4fmu: added "mode_pwm4" startup mode
tridge Feb 23, 2015
0eb0e38
bl_update: fixed stat() check
tridge Feb 25, 2015
83bcac6
OreoLED: driver for attiny88 based LED controller
rmackay9 Dec 24, 2014
0616820
OreoLED: fix formatting
rmackay9 Feb 25, 2015
cc73e30
build: add oreoled to px4fmu-v2_default
rmackay9 Feb 25, 2015
9ff269d
batt_smbus: remove debug
rmackay9 Mar 2, 2015
531bc4f
oreoled: support send_bytes ioctl
rmackay9 Mar 2, 2015
5db1af5
px_loader: added --force option
tridge Mar 5, 2015
2415a9e
px_uploader: print chip version
tridge Mar 5, 2015
c3ce144
mpu6000: add set_accel_range
jschall Feb 17, 2015
675a5e4
drv_accel: add ACCELIOCSHWLOWPASS to set hardware lowpass
jschall Feb 17, 2015
22b975c
drv_gyro: add GYROIOCSHWLOWPASS to set hardware lowpass
jschall Feb 17, 2015
e5f7780
l3gd20: add support for GYROIOCSHWLOWPASS
jschall Feb 17, 2015
5df711a
lsm303d: support ACCELIOCSHWLOWPASS
jschall Feb 17, 2015
2b72fed
mpu6k: add support for ACCELIOCSHWLOWPASS and GYROIOCSHWLOWPASS
jschall Feb 17, 2015
46aed37
FMUv2: added bootloader delay signature to text
tridge Mar 14, 2015
8ad2ffc
px_uploader.py: added --boot-delay option
tridge Mar 14, 2015
0c9d7c1
Tools: added boot_now.py script
tridge Mar 14, 2015
d67068f
uavcan-baro: add read()-style interface to baro device
Nov 28, 2014
f62c625
uavcan-baro: use RingBuffer for read() support
tridge Mar 16, 2015
9c5ba2c
lsm303d: support temperature readings in lsm303d
tridge Mar 17, 2015
b89470d
mpu6000: show temperature in "mpu6000 info"
tridge Mar 17, 2015
1fae9e6
batt_smbus: calculate current discharged
rmackay9 Mar 18, 2015
f5a8173
batt_smbus: remove usleep
rmackay9 Mar 19, 2015
969360c
HMC5883 driver: Rotate before applying offsets.
LorenzMeier Mar 15, 2015
08c1d0c
fix code style if trivial one line difference
dagar Mar 2, 2015
4f3afaa
Mag drivers: Temp support
LorenzMeier Mar 26, 2015
b34a394
HMC5883: Temp dummy value
LorenzMeier Mar 26, 2015
2725346
LSM303D: Return argument in right format
LorenzMeier Feb 8, 2015
6c6bf51
LSM303D: Update comment why we report as internal always
LorenzMeier Feb 15, 2015
d12440e
LSM303D driver: Rotate before applying offsets.
LorenzMeier Mar 15, 2015
03f7268
LSM303D: Temp support
LorenzMeier Mar 26, 2015
da8b308
drv_mag: added ioctl to control temperature compensation
tridge Mar 26, 2015
0b1fa0e
hmc5883: added support for temperature compensation
tridge Mar 26, 2015
3d6fd6b
hmc5883: try to cope with genuine 5883 parts
tridge Apr 2, 2015
fff0935
hmc5883: added -T option to enable temperature compensation
tridge Apr 2, 2015
27bf110
HMC5883: Always report as internal sensor in SPI mode, since the sens…
LorenzMeier Feb 15, 2015
54950ef
hmc5883: read the temperature every 10 samples when enabled
tridge Apr 2, 2015
e0f266b
batt_smbus: add ioctl to return batt capacity
rmackay9 Apr 9, 2015
ef546f6
lsm303d: run sampling 200usec faster to avoid aliasing
tridge May 7, 2015
70f4e52
mpu6000: sample at 200usec faster rate to avoid aliasing
tridge May 7, 2015
548f37a
l3gd20: follow same pattern as lsm303d for duplicate rejection
tridge May 7, 2015
d2c8679
l3gd20: faster gyro interrupts
rmackay9 May 18, 2015
ee1d8cd
Merge remote-tracking branch 'upstream/master' into merge-2015-05-31
tridge May 30, 2015
595b205
batt_smbus: fixed build for new ringbuffer class
tridge May 31, 2015
345500c
uavcan: setup defaults for node ID and bitrate
tridge May 31, 2015
f9ad47c
motor_test: nullptr is in C++, not C
tridge May 31, 2015
13cf41e
uavcan: use UAVCAN_DIR for module path
tridge May 31, 2015
2e6fb9d
uORB: removed generated esc_status.h
tridge May 31, 2015
3aa83a9
irlock: initial version of IR-LOCK sensor driver
Nov 17, 2014
5ebef78
irlock: simplify driver
rmackay9 Mar 1, 2015
fc6fc49
irlock: formatting fixes
rmackay9 May 25, 2015
75d6fee
irlock: report target in radians
rmackay9 May 27, 2015
d67cddd
Merge remote-tracking branch 'origin/master' into merge-2015-05-31
tridge Jun 8, 2015
f10500d
ArduPilot: removed .gitmodules
tridge Jun 9, 2015
18ea4c4
ArduPilot: ignore generated file
tridge Jun 9, 2015
2035fe0
ArduPilot: removed directories for old submodules
tridge Jun 9, 2015
5d4fc51
Merge remote-tracking branch 'tridge/merge-2015-05-31' into HEAD
tridge Jun 9, 2015
f0bd9df
ArduPilot: ignore APM makefile
tridge Jun 9, 2015
883a219
px4io: don't call io_set_rc_config() if RC handling is disabled
tridge Jun 11, 2015
b38850a
px4io: handle non-PX4 parameter system
tridge Jun 11, 2015
0cf4cfd
systemlib: initialise value in circuit_breaker_enabled()
tridge Jun 11, 2015
ed6ed1a
systemlib: don't include PX4 param system in ArduPilot build
tridge Jun 11, 2015
989af1c
perf: fixed perf to write to stdout
tridge Jun 17, 2015
8008f18
px4io: return failure when FORCE_SAFETY_OFF fails
jschall Apr 7, 2015
d5396ac
Added two commands for bootloader support
Gussy Mar 31, 2015
1f7b17e
oreoled: added more perf counters and I2C reply bytes
tridge Mar 31, 2015
2c90b06
oreoled: added XOR crc check
Gussy Mar 31, 2015
7cf0eae
oreoled: add two way XOR checksum and retries
Gussy Apr 6, 2015
79116c4
oreoled: bootloader support
Gussy Apr 10, 2015
ede5c4f
oreoled: smarter handling of ready state
Gussy Apr 10, 2015
a062737
oreoled: bump firmware version
Gussy May 4, 2015
b34eb1a
oreoled: update based on fw checksum not version
Gussy May 5, 2015
86de52b
oreoled: coerce unhealthy LEDs
Gussy May 7, 2015
b4ea5ef
oreoled: use version number from firmware binary
Gussy May 12, 2015
13bdd11
oreoled: add ioctl to allow force sync of LEDs
Gussy May 12, 2015
f6ba8f3
oreoled: formatting changes to match px4 style
rmackay9 May 14, 2015
b67245e
oreoled: fixed bug in firmware checksum calc
Gussy May 26, 2015
1a89748
oreoled: fix double-increment of _num_healthy
jschall May 29, 2015
4a038c2
oreoled: fix backwards compatability
Gussy May 31, 2015
b39d9ae
oreoled: close file handles and free memory
Gussy Jun 1, 2015
0b13186
px4iofirmware: blink blue LED more rapidly when override is active
tridge Jun 21, 2015
005080d
px4iofirmware: allow override when RAW_PWM is active
tridge Jun 21, 2015
2120816
APM: ignore abother generated file
tridge Jun 23, 2015
b0cb142
ms5611: fixed the i2c device on NuttX
tridge Jun 27, 2015
55d4ea7
pwm_input: added perf counters and remove console output
tridge Aug 7, 2015
6d634d2
ms5611: cleanup usage message
tridge Aug 12, 2015
7a62054
ll40ls: added support for 'blue label' lidars
tridge Aug 15, 2015
5746c40
mpu9250: first cut at a MPU9250 driver
tridge Aug 1, 2015
1b15be6
drv_sensor: added MPU9250 sensor defines
tridge Aug 1, 2015
ec41275
mpu6000: check WHOAMI register
tridge Aug 12, 2015
8470351
px4fmu: allow for GPIO_SET_OUTPUT with initial value
tridge Aug 17, 2015
20eb125
pwm_input: removed Lidar specific reset code
tridge Aug 20, 2015
df0d8f0
ll40ls: new strategy for initialisating and operating the lidar on I2C
tridge Aug 21, 2015
34e1d54
perf_counter: fixed write to correct fd for perf output
tridge Aug 21, 2015
51858c8
IRLock: fix compile error
rmackay9 Aug 28, 2015
1623d18
build: parallelize build
lucasdemarchi Sep 13, 2015
c4f3902
sdlog2: Added 'd' type to FORMAT_TO_STRUCT.
mday299 Sep 4, 2015
c340616
ms5611: reduced OSR to 1024
tridge Sep 22, 2015
586b693
otp: Add a system command for writing/viewing OTP, see docs below...
geeksville Mar 8, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,6 @@ unittests/build
xcode
src/platforms/posix/px4_messages/
src/platforms/qurt/px4_messages/
makefiles/config_px4fmu-v2_APM.mk
makefiles/nuttx/config_px4fmu-v1_APM.mk
makefiles/nuttx/config_px4fmu-v2_APM.mk
21 changes: 0 additions & 21 deletions .gitmodules

This file was deleted.

24 changes: 8 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ $(FIRMWARES): $(BUILD_DIR)%.build/firmware.px4: generateuorbtopicheaders checksu
@$(ECHO) %%%% Building $(config) in $(work_dir)
@$(ECHO) %%%%
$(Q) $(MKDIR) -p $(work_dir)
$(Q) $(MAKE) -r -C $(work_dir) \
$(Q)+ $(MAKE) -r -C $(work_dir) \
-f $(PX4_MK_DIR)firmware.mk \
CONFIG=$(config) \
WORK_DIR=$(work_dir) \
Expand Down Expand Up @@ -178,24 +178,16 @@ NUTTX_ARCHIVES = $(foreach board,$(BOARDS),$(ARCHIVE_DIR)$(board).export)
.PHONY: archives
archives: checksubmodules $(NUTTX_ARCHIVES)

# We cannot build these parallel; note that we also force -j1 for the
# sub-make invocations.
ifneq ($(filter archives,$(MAKECMDGOALS)),)
.NOTPARALLEL:
endif

J?=1

$(ARCHIVE_DIR)%.export: board = $(notdir $(basename $@))
$(ARCHIVE_DIR)%.export: configuration = nsh
$(NUTTX_ARCHIVES): $(ARCHIVE_DIR)%.export: $(NUTTX_SRC)
@$(ECHO) %% Configuring NuttX for $(board)
$(Q) (cd $(NUTTX_SRC) && $(RMDIR) nuttx-export)
$(Q) $(MAKE) -r -j$(J) -C $(NUTTX_SRC) -r $(MQUIET) distclean
$(Q)+ $(MAKE) -C $(NUTTX_SRC) -r $(MQUIET) distclean
$(Q) (cd $(NUTTX_SRC)/configs && $(COPYDIR) $(PX4_BASE)nuttx-configs/$(board) .)
$(Q) (cd $(NUTTX_SRC)tools && ./configure.sh $(board)/$(configuration))
@$(ECHO) %% Exporting NuttX for $(board)
$(Q) $(MAKE) -r -j$(J) -C $(NUTTX_SRC) -r $(MQUIET) CONFIG_ARCH_BOARD=$(board) export
$(Q)+ $(MAKE) -C $(NUTTX_SRC) -r $(MQUIET) CONFIG_ARCH_BOARD=$(board) export
$(Q) $(MKDIR) -p $(dir $@)
$(Q) $(COPY) $(NUTTX_SRC)nuttx-export.zip $@
$(Q) (cd $(NUTTX_SRC)/configs && $(RMDIR) $(board))
Expand All @@ -212,11 +204,11 @@ BOARD = $(BOARDS)
menuconfig: $(NUTTX_SRC)
@$(ECHO) %% Configuring NuttX for $(BOARD)
$(Q) (cd $(NUTTX_SRC) && $(RMDIR) nuttx-export)
$(Q) $(MAKE) -r -j$(J) -C $(NUTTX_SRC) -r $(MQUIET) distclean
$(Q)+ $(MAKE) -C $(NUTTX_SRC) -r $(MQUIET) distclean
$(Q) (cd $(NUTTX_SRC)/configs && $(COPYDIR) $(PX4_BASE)nuttx-configs/$(BOARD) .)
$(Q) (cd $(NUTTX_SRC)tools && ./configure.sh $(BOARD)/nsh)
@$(ECHO) %% Running menuconfig for $(BOARD)
$(Q) $(MAKE) -r -j$(J) -C $(NUTTX_SRC) -r $(MQUIET) menuconfig
$(Q)+ $(MAKE) -C $(NUTTX_SRC) -r $(MQUIET) menuconfig
@$(ECHO) %% Saving configuration file
$(Q)$(COPY) $(NUTTX_SRC).config $(PX4_BASE)nuttx-configs/$(BOARD)/nsh/defconfig
else
Expand Down Expand Up @@ -287,7 +279,7 @@ testbuild:

nuttx posix qurt:
ifeq ($(GOALS),)
make PX4_TARGET_OS=$@ $(GOALS)
+$(MAKE) PX4_TARGET_OS=$@ $(GOALS)
else
export PX4_TARGET_OS=$@
endif
Expand All @@ -296,7 +288,7 @@ posixrun:
Tools/posix_run.sh

qurtrun:
make PX4_TARGET_OS=qurt sim
$(MAKE) PX4_TARGET_OS=qurt sim

#
# Unittest targets. Builds and runs the host-level
Expand Down Expand Up @@ -325,7 +317,7 @@ clean:
distclean: clean
@echo > /dev/null
$(Q) $(REMOVE) $(ARCHIVE_DIR)*.export
$(Q) $(MAKE) -C $(NUTTX_SRC) -r $(MQUIET) distclean
$(Q)+ $(MAKE) -C $(NUTTX_SRC) -r $(MQUIET) distclean
$(Q) (cd $(NUTTX_SRC)/configs && $(FIND) . -maxdepth 1 -type l -delete)

#
Expand Down
1 change: 0 additions & 1 deletion NuttX
Submodule NuttX deleted from 678eea
1 change: 0 additions & 1 deletion Tools/gencpp
Submodule gencpp deleted from 26a86f
1 change: 0 additions & 1 deletion Tools/genmsg
Submodule genmsg deleted from 72f038
1 change: 1 addition & 0 deletions Tools/sdlog2/sdlog2_dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class SDLog2Parser:
"h": ("h", None),
"H": ("H", None),
"i": ("i", None),
"d": ("d", None),
"I": ("I", None),
"f": ("f", None),
"n": ("4s", None),
Expand Down
8 changes: 4 additions & 4 deletions makefiles/firmware.mk
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ $(MODULE_OBJS): mkfile = $(patsubst %module.pre.o,%module.mk,$(relpath))
$(MODULE_OBJS): workdir = $(@D)
$(MODULE_OBJS): $(GLOBAL_DEPS) $(NUTTX_CONFIG_HEADER)
$(Q) $(MKDIR) -p $(workdir)
$(Q) $(MAKE) -r -f $(PX4_MK_DIR)module.mk \
$(Q)+ $(MAKE) -r -f $(PX4_MK_DIR)module.mk \
-C $(workdir) \
MODULE_WORK_DIR=$(workdir) \
MODULE_OBJ=$@ \
Expand All @@ -246,7 +246,7 @@ $(MODULE_CLEANS): relpath = $(patsubst $(WORK_DIR)%,%,$@)
$(MODULE_CLEANS): mkfile = $(patsubst %clean,%module.mk,$(relpath))
$(MODULE_CLEANS):
@$(ECHO) %% cleaning using $(mkfile)
$(Q) $(MAKE) -r -f $(PX4_MK_DIR)module.mk \
$(Q)+ $(MAKE) -r -f $(PX4_MK_DIR)module.mk \
MODULE_WORK_DIR=$(dir $@) \
MODULE_MK=$(mkfile) \
clean
Expand Down Expand Up @@ -289,7 +289,7 @@ $(LIBRARY_LIBS): mkfile = $(patsubst %library.a,%library.mk,$(relpath))
$(LIBRARY_LIBS): workdir = $(@D)
$(LIBRARY_LIBS): $(GLOBAL_DEPS) $(NUTTX_CONFIG_HEADER)
$(Q) $(MKDIR) -p $(workdir)
$(Q) $(MAKE) -r -f $(PX4_MK_DIR)library.mk \
$(Q)+ $(MAKE) -r -f $(PX4_MK_DIR)library.mk \
-C $(workdir) \
LIBRARY_WORK_DIR=$(workdir) \
LIBRARY_LIB=$@ \
Expand All @@ -306,7 +306,7 @@ $(LIBRARY_CLEANS): relpath = $(patsubst $(WORK_DIR)%,%,$@)
$(LIBRARY_CLEANS): mkfile = $(patsubst %clean,%library.mk,$(relpath))
$(LIBRARY_CLEANS):
@$(ECHO) %% cleaning using $(mkfile)
$(Q) $(MAKE) -r -f $(PX4_MK_DIR)library.mk \
$(Q)+ $(MAKE) -r -f $(PX4_MK_DIR)library.mk \
LIBRARY_WORK_DIR=$(dir $@) \
LIBRARY_MK=$(mkfile) \
clean
Expand Down
18 changes: 5 additions & 13 deletions makefiles/firmware_nuttx.mk
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ $(FIRMWARES): $(BUILD_DIR)%.build/firmware.px4: generateuorbtopicheaders checksu
@$(ECHO) %%%% Building $(config) in $(work_dir)
@$(ECHO) %%%%
$(Q) $(MKDIR) -p $(work_dir)
$(Q) $(MAKE) -r -C $(work_dir) \
$(Q)+ $(MAKE) -r -C $(work_dir) \
-f $(PX4_MK_DIR)firmware.mk \
CONFIG=$(config) \
WORK_DIR=$(work_dir) \
Expand Down Expand Up @@ -96,24 +96,16 @@ NUTTX_ARCHIVES = $(foreach board,$(BOARDS),$(ARCHIVE_DIR)$(board).export)
.PHONY: archives
archives: checksubmodules $(NUTTX_ARCHIVES)

# We cannot build these parallel; note that we also force -j1 for the
# sub-make invocations.
ifneq ($(filter archives,$(MAKECMDGOALS)),)
.NOTPARALLEL:
endif

J?=1

$(ARCHIVE_DIR)%.export: board = $(notdir $(basename $@))
$(ARCHIVE_DIR)%.export: configuration = nsh
$(NUTTX_ARCHIVES): $(ARCHIVE_DIR)%.export: $(NUTTX_SRC)
@$(ECHO) %% Configuring NuttX for $(board)
$(Q) (cd $(NUTTX_SRC) && $(RMDIR) nuttx-export)
$(Q) $(MAKE) -r -j$(J) -C $(NUTTX_SRC) -r $(MQUIET) distclean
$(Q)+ $(MAKE) -C $(NUTTX_SRC) -r $(MQUIET) distclean
$(Q) (cd $(NUTTX_SRC)/configs && $(COPYDIR) $(PX4_BASE)nuttx-configs/$(board) .)
$(Q) (cd $(NUTTX_SRC)tools && ./configure.sh $(board)/$(configuration))
@$(ECHO) %% Exporting NuttX for $(board)
$(Q) $(MAKE) -r -j$(J) -C $(NUTTX_SRC) -r $(MQUIET) CONFIG_ARCH_BOARD=$(board) export
$(Q)+ $(MAKE) -C $(NUTTX_SRC) -r $(MQUIET) CONFIG_ARCH_BOARD=$(board) export
$(Q) $(MKDIR) -p $(dir $@)
$(Q) $(COPY) $(NUTTX_SRC)nuttx-export.zip $@
$(Q) (cd $(NUTTX_SRC)/configs && $(RMDIR) $(board))
Expand All @@ -130,11 +122,11 @@ BOARD = $(BOARDS)
menuconfig: $(NUTTX_SRC)
@$(ECHO) %% Configuring NuttX for $(BOARD)
$(Q) (cd $(NUTTX_SRC) && $(RMDIR) nuttx-export)
$(Q) $(MAKE) -r -j$(J) -C $(NUTTX_SRC) -r $(MQUIET) distclean
$(Q) $(MAKE) -C $(NUTTX_SRC) -r $(MQUIET) distclean
$(Q) (cd $(NUTTX_SRC)/configs && $(COPYDIR) $(PX4_BASE)nuttx-configs/$(BOARD) .)
$(Q) (cd $(NUTTX_SRC)tools && ./configure.sh $(BOARD)/nsh)
@$(ECHO) %% Running menuconfig for $(BOARD)
$(Q) $(MAKE) -r -j$(J) -C $(NUTTX_SRC) -r $(MQUIET) menuconfig
$(Q) $(MAKE) -C $(NUTTX_SRC) -r $(MQUIET) menuconfig
@$(ECHO) %% Saving configuration file
$(Q)$(COPY) $(NUTTX_SRC).config $(PX4_BASE)nuttx-configs/$(BOARD)/nsh/defconfig
else
Expand Down
1 change: 0 additions & 1 deletion mavlink/include/mavlink/v1.0
Submodule v1.0 deleted from 645a0e
2 changes: 1 addition & 1 deletion nuttx-configs/px4fmu-v1/nsh/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ CONFIG_SIG_SIGWORK=4
CONFIG_MAX_TASKS=32
CONFIG_MAX_TASK_ARGS=10
CONFIG_NPTHREAD_KEYS=4
CONFIG_NFILE_DESCRIPTORS=42
CONFIG_NFILE_DESCRIPTORS=50
CONFIG_NFILE_STREAMS=8
CONFIG_NAME_MAX=32
CONFIG_PREALLOC_MQ_MSGS=4
Expand Down
2 changes: 1 addition & 1 deletion nuttx-configs/px4fmu-v2/nsh/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ CONFIG_SIG_SIGWORK=4
CONFIG_MAX_TASKS=32
CONFIG_MAX_TASK_ARGS=10
CONFIG_NPTHREAD_KEYS=4
CONFIG_NFILE_DESCRIPTORS=42
CONFIG_NFILE_DESCRIPTORS=50
CONFIG_NFILE_STREAMS=8
CONFIG_NAME_MAX=32
CONFIG_PREALLOC_MQ_MSGS=4
Expand Down
8 changes: 4 additions & 4 deletions src/drivers/batt_smbus/batt_smbus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ class BATT_SMBUS : public device::I2C
// internal variables
bool _enabled; ///< true if we have successfully connected to battery
work_s _work; ///< work queue for scheduling reads
RingBuffer *_reports; ///< buffer of recorded voltages, currents
ringbuffer::RingBuffer *_reports; ///< buffer of recorded voltages, currents
struct battery_status_s _last_report; ///< last published report, used for test()
orb_advert_t _batt_topic; ///< uORB battery topic
orb_id_t _batt_orb_id; ///< uORB battery topic ID
Expand All @@ -199,7 +199,7 @@ void batt_smbus_usage();
extern "C" __EXPORT int batt_smbus_main(int argc, char *argv[]);

BATT_SMBUS::BATT_SMBUS(int bus, uint16_t batt_smbus_addr) :
I2C("batt_smbus", BATT_SMBUS_DEVICE_PATH, bus, batt_smbus_addr, 400000),
I2C("batt_smbus", BATT_SMBUS0_DEVICE_PATH, bus, batt_smbus_addr, 100000),
_enabled(false),
_work{},
_reports(nullptr),
Expand Down Expand Up @@ -239,7 +239,7 @@ BATT_SMBUS::init()

} else {
// allocate basic report buffers
_reports = new RingBuffer(2, sizeof(struct battery_status_s));
_reports = new ringbuffer::RingBuffer(2, sizeof(struct battery_status_s));

if (_reports == nullptr) {
ret = ENOTTY;
Expand Down Expand Up @@ -626,7 +626,7 @@ batt_smbus_main(int argc, char *argv[])
exit(0);
}

// need the driver past this point
/* need the driver past this point */
if (g_batt_smbus == nullptr) {
warnx("not started");
batt_smbus_usage();
Expand Down
10 changes: 8 additions & 2 deletions src/drivers/drv_accel.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ ORB_DECLARE(sensor_accel);
/** return the accel internal sample rate in Hz */
#define ACCELIOCGSAMPLERATE _ACCELIOC(1)

/** set the accel internal lowpass filter to no lower than (arg) Hz */
/** set the software low-pass filter cut-off in Hz */
#define ACCELIOCSLOWPASS _ACCELIOC(2)

/** return the accel internal lowpass filter in Hz */
/** get the software low-pass filter cut-off in Hz */
#define ACCELIOCGLOWPASS _ACCELIOC(3)

/** set the accel scaling constants to the structure pointed to by (arg) */
Expand All @@ -126,4 +126,10 @@ ORB_DECLARE(sensor_accel);
/** get the result of a sensor self-test */
#define ACCELIOCSELFTEST _ACCELIOC(9)

/** set the hardware low-pass filter cut-off no lower than (arg) Hz */
#define ACCELIOCSHWLOWPASS _ACCELIOC(10)

/** get the hardware low-pass filter cut-off in Hz*/
#define ACCELIOCGHWLOWPASS _ACCELIOC(11)

#endif /* _DRV_ACCEL_H */
6 changes: 6 additions & 0 deletions src/drivers/drv_gpio.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,10 @@

#define GPIO_PERIPHERAL_RAIL_RESET GPIOC(14)

/** configure the board GPIOs in (arg) as outputs, initially low */
#define GPIO_SET_OUTPUT_LOW GPIOC(15)

/** configure the board GPIOs in (arg) as outputs, initially high */
#define GPIO_SET_OUTPUT_HIGH GPIOC(16)

#endif /* _DRV_GPIO_H */
10 changes: 8 additions & 2 deletions src/drivers/drv_gyro.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ ORB_DECLARE(sensor_gyro);
/** return the gyro internal sample rate in Hz */
#define GYROIOCGSAMPLERATE _GYROIOC(1)

/** set the gyro internal lowpass filter to no lower than (arg) Hz */
/** set the software low-pass filter cut-off in Hz */
#define GYROIOCSLOWPASS _GYROIOC(2)

/** set the gyro internal lowpass filter to no lower than (arg) Hz */
/** get the software low-pass filter cut-off in Hz */
#define GYROIOCGLOWPASS _GYROIOC(3)

/** set the gyro scaling constants to (arg) */
Expand All @@ -122,4 +122,10 @@ ORB_DECLARE(sensor_gyro);
/** check the status of the sensor */
#define GYROIOCSELFTEST _GYROIOC(8)

/** set the hardware low-pass filter cut-off no lower than (arg) Hz */
#define GYROIOCSHWLOWPASS _GYROIOC(9)

/** get the hardware low-pass filter cut-off in Hz*/
#define GYROIOCGHWLOWPASS _GYROIOC(10)

#endif /* _DRV_GYRO_H */
60 changes: 60 additions & 0 deletions src/drivers/drv_irlock.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/****************************************************************************
*
* Copyright (c) 2012-2015 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
* 3. Neither the name PX4 nor the names of its contributors may be
* used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
****************************************************************************/

/**
* @file drv_irlock.h
*
* IR-Lock device API
**/

#pragma once

#include <stdint.h>
#include <sys/ioctl.h>

#include "drv_sensor.h" // include sensor driver interfaces

#define IRLOCK_BASE_DEVICE_PATH "/dev/irlock"
#define IRLOCK0_DEVICE_PATH "/dev/irlock0"

#define IRLOCK_OBJECTS_MAX 5 /** up to 5 objects can be detected/reported **/

/** irlock_s structure returned from read calls **/
struct irlock_s {
uint64_t timestamp; /** microseconds since system start **/
uint16_t target_num; /** target number prioritised by size (largest is 0) **/
float angle_x; /** x-axis angle in radians from center of image to center of target **/
float angle_y; /** y-axis angle in radians from center of image to center of target **/
float size_x; /** size in radians of target along x-axis **/
float size_y; /** size in radians of target along y-axis **/
};
Loading