Commit Graph
96 Commits
Author SHA1 Message Date
Andrew Tridgell 82aca3d65c FMUv4: enable RSSI analog input pin 2016-05-01 14:22:58 +02:00
Andrew Tridgell 6552f925f8 px4fmu: allow control of safety state on FMUv4
allows for MAVLink control of safety state
2016-04-25 17:25:47 +02:00
Andrew Tridgell 9daf6c336b px4iofirmware: removed unused PX4IO_P_CONFIG_CONTROL_GROUP_COUNT 2016-04-18 18:44:05 +02:00
Andrew Tridgell 3bad8131cf px4io: don't call io_set_rc_config when rc config disabled 2016-04-18 18:44:05 +02:00
Andrew Tridgell cc0fbdd549 px4fmu: added SET_MODE ioctl
this gives control over timer capture driver
2016-04-18 11:45:44 +02:00
Andrew Tridgell e60f2c3f41 drv_pwm: added new PWM_SERVO_SET_MODE ioctl 2016-04-18 11:45:44 +02:00
Andrew Tridgell c66fab01e5 drv_pwm: expand range of PWM ioctl indexes
we had run out of them. _IOC_MASK is 0xFF, so we can add an extra 16
without an issue
2016-04-18 11:45:13 +02:00
Andrew Tridgell fde635ef5a px4iofirmware: fixed display of sbus rate in px4io status 2016-04-18 11:43:24 +02:00
Andrew Tridgell c5f5b9f53c drv_pwm_output: added IOCTL for SBUS rate 2016-04-18 11:43:24 +02:00
Andrew Tridgell 30ce7fdd48 px4io: display SBUS rate in px4io status 2016-04-18 11:43:24 +02:00
Andrew Tridgell 6290e621d4 px4io: added control for setting SBUS rate 2016-04-18 11:43:24 +02:00
Andrew Tridgell f19761d278 px4iofirmware: support setting the SBUS output frame rate
this allows for helicopters and multicopters with SBUS output
2016-04-18 11:43:24 +02:00
Andrew Tridgell 58122ed33d sbus: added support for changing SBUS output rate 2016-04-18 11:43:24 +02:00
Andrew Tridgell 05790ff540 px4fmu: prevent checking of safety switch parameter in main loop 2016-04-18 11:41:01 +02:00
Andrew Tridgell 3fda934d1b px4io: on config error ask IO to reboot to bootloader
this allows us to update fw when core config settings have changed,
such as the actuators/servos change that happened recently
2016-04-18 11:40:07 +02:00
Andrew Tridgell 85e8cd89b6 px4io: set reasonable default voltage scaling
needed for when px4 param system not available in ardupilot
2016-04-18 11:39:37 +02:00
Andrew Tridgell 5928569321 px4fmu: fixed signed/unsigned comparison 2016-04-18 11:39:06 +02:00
Andrew Tridgell 9984555faa motor_test: fixed build
this is C, not C++
2016-04-18 11:37:43 +02:00
Andrew Tridgell 05c282e761 stm32: fixed build errors with more warnings enabled
needed for ArduPilot build
2016-04-18 11:36:28 +02:00
Andrew Tridgell 091515956d dsm: fixed shadowed variables errors 2016-04-18 11:35:21 +02:00
Andrew Tridgell fc6b074d40 irlock: fixed header for other than FMUv2 2016-04-18 11:34:24 +02:00
Andrew Tridgell 943e6ffbc9 px4iofirmware: blink blue LED more rapidly when override is active
this makes it easier for a user to test that override is working
correctly in pre-flight checks. Otherwise override is hard to
distinguish from normal manual mode
2016-04-17 19:10:23 +02:00
Andrew Tridgell 43235a8cff perf: fixed mixup of stdout/stdin 2016-04-17 16:07:44 +02:00
Andrew Tridgell efd4552e37 ms5611: reduced OSR to 1024
this reduces self-heating of the sensor which reduces the amount of
altitude change when warming up. Apparently some individual sensors
are severely affected by this.

Unfortunately it raises the noise level, but Paul is confident it
won't be a significant issue
2016-04-17 16:04:44 +02:00
Andrew Tridgell b8a60f2501 pwm: change default_value for all boards from 1000 to 0
the value '1000' is not really magic, and it was resulting in sending
a single 1ms pulse on all IO channels for a brief instant on
startup. With some servos this led to the control surfaces being at
extremes (and straining) on startup. It may also contribute to making
ESC calibration harder on multi-rotors

In the worst case it could cause a IC motor with reverse throttle to
go full throttle on startup

A logic analyser shows the problem very clearly. Changing the
default_value fields to 0 from 1000 fixes the issue and no pulses are
generated until an explicit value suitable for the airframe is
provided via one of the many methods PWM output values can be
generated

Conflicts:
	src/drivers/boards/px4fmu-v4/px4fmu_pwm_servo.c
	src/lib/ecl
2016-01-29 08:57:20 +01:00
Andrew Tridgell d290487382 circuit_breaker: prevent param fetch failure from disabling safety switch
if the param get failed then an uninitialised stack variable was used
for the safety disable on boot. In ArduPilot that value happened to
equal the correct magic due to stack passing from caller. This forced
safety off on boot
2015-12-04 21:22:25 +01:00
Andrew Tridgell 46631b5c8a mpu6000: work around apparent ICM20608 bug
undocumented register 0x11 sometimes starts with value 0, which gives
an offset on the Y accel axis of 2.7m/s/s. It sometimes boots with
0xc9, which gives a zero offset. Force it to 0xc9 to get consistently
correct behaviour
2015-11-28 09:13:15 +01:00
Andrew Tridgell 4eaa18e6f9 perf_counter: fixed write to correct fd for perf output
this fixes perf output for nsh over MAVLink
2015-08-28 21:57:09 +02:00
Andrew Tridgell 41b3452e22 ll40ls: added support for 'blue label' lidars
the key is splitting up read_reg() into two transfers
2015-08-17 09:18:38 +02:00
Andrew Tridgell 210bb9e996 px4fmu-v2: added mpu9250 driver to the build 2015-08-17 09:17:14 +02:00
Andrew Tridgell f77620c3f4 mpu6000: check WHOAMI register
this prevents a mpu9250 being seen as a mpu6000
2015-08-17 09:17:07 +02:00
Andrew Tridgell 0e6cdecfad drv_sensor: added MPU9250 sensor defines 2015-08-17 09:16:58 +02:00
Andrew Tridgell 39e0a487bb mpu9250: first cut at a MPU9250 driver 2015-08-17 09:16:47 +02:00
Andrew Tridgell 5e27b7bc31 ms5611: fixed the i2c device on NuttX. This was left-over debugging noise from the POSIX bringup. 2015-06-27 15:11:03 +02:00
Andrew Tridgell db8dd000e3 l3gd20: follow same pattern as lsm303d for duplicate rejection 2015-05-07 15:16:34 +10:00
Andrew Tridgell a710159263 mpu6000: sample at 200usec faster rate to avoid aliasing
this runs the mpu6000 200usec faster than requested then detects and
disccards duplicates by comparing accel values. This avoids a nasty
aliasing issue due to clock drift between the stm32 and mpu6000
2015-05-07 15:16:32 +10:00
Andrew Tridgell 3ac95fb581 lsm303d: run sampling 200usec faster to avoid aliasing
this runs the sampling of the accelerometer 200usec faster than
requested and then throw away duplicates using the accelerometer
status register data ready bit. This avoids aliasing due to drift in
the stm32 clock compared to the lsm303d clock
2015-05-07 15:16:29 +10:00
Andrew Tridgell 219d661888 hmc5883: read the temperature every 10 samples when enabled 2015-04-08 17:45:54 +02:00
Andrew Tridgell 02639411ba hmc5883: added -T option to enable temperature compensation
this also fixes the behaviour of the -C option
2015-04-08 17:45:54 +02:00
Andrew Tridgell e17936e237 hmc5883: try to cope with genuine 5883 parts
if we can't read the temperature registers 10 times then disable the
feature.
2015-04-08 17:45:54 +02:00
Andrew Tridgell 156a7915ae hmc5883: added support for temperature compensation
added "hmc5883 tempon" and "hmc5883 tempoff" to enable/disable
2015-04-08 17:45:53 +02:00
Andrew Tridgell dea97dd277 drv_mag: added ioctl to control temperature compensation 2015-04-08 17:45:53 +02:00
Andrew Tridgell a4bece7595 uavcan-baro: use RingBuffer for read() support 2015-04-04 10:20:51 +02:00
Andrew Tridgell 9442fc13e4 mpu6000: show temperature in "mpu6000 info" 2015-03-17 13:44:53 +11:00
Andrew Tridgell 374c50cab8 lsm303d: support temperature readings in lsm303d
these are read at the same rate as the mag
2015-03-17 13:44:51 +11:00
Andrew Tridgell 9d8931328b Tools: added boot_now.py script 2015-03-14 21:12:24 +11:00
Andrew Tridgell 2c2359dcf0 px_uploader.py: added --boot-delay option
this sets the bootloader delay
2015-03-14 21:12:21 +11:00
Andrew Tridgell 9efeb4cf0b FMUv2: added bootloader delay signature to text
this allows for a configurable bootloader delay
2015-03-14 21:12:19 +11:00
Andrew Tridgell 332d42b105 px_uploader: print chip version 2015-03-07 09:46:27 +01:00
Andrew Tridgell d9b4f5b170 px_loader: added --force option
this can be used to override the board type check. Useful when
changing bootloaders
2015-03-07 09:45:51 +01:00
Andrew Tridgell 8240e90d26 bl_update: fixed stat() check 2015-02-26 08:22:23 +01:00
Andrew Tridgell 9a875c53af px4fmu: added "mode_pwm4" startup mode
this is the default mode ArduPilot uses, and by setting it in the init
script we avoid any pin activity on the two GPIO pins during boot
2015-02-23 19:52:57 +01:00
Andrew Tridgell 41cc04c064 pwm_input: added PWM input driver
this allows for input of PWM signals on the FMUv2 aux5 pins
2015-02-23 19:52:47 +01:00
Andrew Tridgell 322392d853 fmuv2: setup for PWM input on timer4, channel 2 2015-02-23 19:52:38 +01:00
Andrew Tridgell 9d288a9a9a ll40ls: added reset and backoff logic to driver
this adds automatic resets of the lidar when it becomes unresponsive,
and also tries to cope with NACKs from long acquisition times. It also
adds a "ll40ls regdump" command, and fixes "ll40ls reset" to reset the
sensor.

The default acquisition period is changed to 50ms, with backoff to
100ms on a NACK

Note that there are still times when the sensor can get into an
unrecoverable state.

Thanks to Austin, Dennis and Bob from PulseLight for assistance in
tracking down the problems.
2015-02-20 09:10:24 +01:00
Andrew Tridgell 91aab00fa0 build: avoid wiping an existing PYTHONPATH variable 2015-02-16 22:54:32 +01:00
Andrew Tridgell 618d51dab1 hmc5883: fixed build errors with gcc 2.7.4 and -O3 2015-02-16 06:54:05 +01:00
Andrew Tridgell 4c8ac04877 PX4: better error msg in python uorb generation error 2015-02-16 06:52:21 +01:00
Andrew Tridgell 36870cf44b Tools: improve python package error message 2015-02-16 06:52:00 +01:00
Andrew Tridgell 1b8a830a38 i2c: prevent double free of _dev pointer
this caused heap corruption
2015-02-14 11:16:02 +01:00
Andrew Tridgell 0801dbda38 l3gd20: checking status only makes sense if we have DRDY
it makes no sense on the external SPI bus
2015-02-11 12:48:59 +01:00
Andrew Tridgell e0ac0c4a4b l3gd20: fixed "l3gd20 test"
don't reset after test, and leave us in correct polling mode
2015-02-11 12:48:52 +01:00
Andrew Tridgell fc40a5c641 systemcmds: added usb_connected command
this is used in APM startup to see if we should start nsh on usb when
no microSD is inserted
2015-02-11 17:36:07 +11:00
Andrew Tridgell 52bff67076 ms5611: removed debug code 2015-02-01 22:13:09 +01:00
Andrew Tridgell 2f25469bbe px4fmu-v1: removed baro I2C address in board_config.h
the ms5611 can be on two addresses. The driver handles this, not the
board config
2015-02-01 13:09:55 +01:00
Andrew Tridgell 04a9050410 ms5611: allow for all 4 bus combinations in ms5611 driver
this uses the same table driven approach as the hmc5883 driver, and
allows for a ms5611 baro on any of the 4 bus combinations. A simple
"ms5611 start" will start all baros that are found.
2015-02-01 13:09:44 +01:00
Andrew Tridgell 9b10395e94 hmc5883: fixed DEVIOCGDEVICEID ioctl
we need to pass the ioctl through to the bus interface

thanks to Jon Challinger for noticing this bug
2015-01-20 15:08:22 +11:00
Andrew Tridgell 0af6303d0b hmc5883: fixed mixup of internal and external hmc5883 I2C bus options 2015-01-20 14:30:46 +11:00
Andrew Tridgell 54a22aed94 hmc5883: fixed handling of 3 bus options
use a table of possible bus options. This prevents us starting two
drivers on the same bus
2015-01-09 19:42:27 +11:00
Andrew Tridgell 500ac1443b lsm303d: detect large fixed values and report an error
we have logs where the lsm303d gets large fixed values for long
periods. This will detect that error case and raise error_count so the
higher level sensor integration code can choose another sensor
2015-01-02 16:47:48 +11:00
Andrew Tridgell 7b6620b319 ll40ls: fixed exit code on external sensor startup failure 2015-01-01 13:06:46 +01:00
Andrew Tridgell 8470105f9e lsm303d: fixed build warning 2015-01-01 10:04:09 +11:00
Andrew Tridgell 7864958f1c l3gd20: fixed build warning 2015-01-01 10:04:07 +11:00
Andrew Tridgell 82b9e08e4c mpu6000: removed unsafe printf in interrupt context
instead delay 3ms between register writes. This seems to give a quite
high probability of correctly resetting the sensor, and does still
reliably detect the sensor going bad, which is the most important
thing in this code
2015-01-01 08:51:57 +11:00
Andrew Tridgell b5f6fedfa8 lsm303d: show all perf counters in "info" 2015-01-01 08:51:54 +11:00
Andrew Tridgell 083d9e3e69 lsm303d: check DRDY after check_registers()
this allows recovery from a state where DRDY is not set
2015-01-01 08:51:52 +11:00
Andrew Tridgell 1de7fab974 lsm303d: removed unsafe printf in interrupt context 2015-01-01 08:51:49 +11:00
Andrew Tridgell e4318345f3 lsm303d: added two more checked registers
these are key for DRDY behaviour
2015-01-01 08:51:47 +11:00
Andrew Tridgell 2ac3a6fcf4 l3m303d: added testerror command
useful for testing error handling
2015-01-01 08:51:44 +11:00
Andrew Tridgell 5c1da70d0c l3gd20: fixed reporting of error count 2015-01-01 08:51:42 +11:00
Andrew Tridgell 1bb3974c84 l3gd20: check DRDY after check_registers() is called
this allows us to recover from an error that disables data ready
2015-01-01 08:51:40 +11:00
Andrew Tridgell 8db2066151 l3gd20: removed printf in interrupt context
this is not safe
2015-01-01 08:51:37 +11:00
Andrew Tridgell 353ea9beac l3gd20: added testerror command
useful for testing error handling
2015-01-01 08:51:34 +11:00
Andrew Tridgell a8cea3a4da l3gd20: use the I2C disable bit on l3gd20H
this seems to prevent a mpu6000 reset from causing an issue on the
l3gd20H
2014-12-30 20:55:57 +01:00
Andrew Tridgell b455d647b2 l3gd20: added "l3gd20 regdump" command 2014-12-30 20:55:57 +01:00
Andrew Tridgell 4a81384b2d mpu6000: make register fixup much closer to a reset()
this may help automatic reset on the faulty boards
2014-12-30 20:55:57 +01:00
Andrew Tridgell e537de20e3 mpu6000: wait for 10ms after a full reset
this prevents the mpu6000 getting in a really weird state!
2014-12-30 20:55:57 +01:00
Andrew Tridgell 333039d3db mpu6000: added "mpu6000 testerror" command
used to generate a error case for reset testing
2014-12-30 20:55:57 +01:00
Andrew Tridgell b157466608 mpu6000: monitor some more registers 2014-12-30 20:55:57 +01:00
Andrew Tridgell e5d3c80686 mpu6000: added factory self-test function
this follows the factory calibration self-test method in the datasheet
to see if the sensor still has the same calibration it had in the factory
2014-12-30 20:55:57 +01:00
Andrew Tridgell ca47952281 l3gd20: added register checking
this checks at runtime that key registers have correct values
2014-12-30 20:55:57 +01:00
Andrew Tridgell ae3a92569d mpu6000: try resetting the mpu6000 up to 5 times
this mirrors the ardupilot driver. We have seen situations where the
mpu6000 on the Pixhawk comes up in SLEEP mode, despite a reset
2014-12-30 20:55:57 +01:00
Andrew Tridgell 03c40d5d91 lsm303d: replace old register checking with new check_registers() method
this uses the same method as is now used in the MPU6000 to check that
the sensor retains its correct values

Conflicts:
	src/drivers/lsm303d/lsm303d.cpp
2014-12-30 20:55:57 +01:00
Andrew Tridgell 3e06a65516 mpu6000: monitor some key registers for correct values
this will catch both bad SPI bus comms and a sensor that has been
reset causing incorrect configuration.
2014-12-30 20:55:57 +01:00
Andrew Tridgell 2bcf4385f6 build: use unqualified com port names on windows
the qualified names were not working with current versions of python
2013-08-21 15:00:19 +02:00
Andrew Tridgell 43eca3eb0e build: use unqualified com port names on windows
the qualified names were not working with current versions of python
2013-07-10 15:36:58 +10:00