3423 Commits

Author SHA1 Message Date
Lorenz Meier
24ffada340 MPU9250: Hold off from reboot a little longer. Fixes #7555 2017-07-08 16:38:18 +02:00
Lorenz Meier
9cd93dcf03 MPU9250: Fix boot on Pixhawk Mini
This requires further investigation. Hotfix.
2017-07-08 16:31:12 +02:00
David Sidrane
f722614ec0 mpu9250:Stop per counter on failed read 2017-07-08 15:37:46 +02:00
David Sidrane
fbf6532c25 mpu9250:reset the mag on the reset operation
This commit fixed a bug were the mag was orphened on a reset.
   That resulted in MAG timeouts on reset or test operations and
   left the mag in a broken state.
2017-07-08 15:37:46 +02:00
David Sidrane
8bd044e80e mpu9250:mag rework the setup to veify HW first
If the setup is unsucessful fo not register the devices or
   allocate resources.
2017-07-08 15:37:46 +02:00
David Sidrane
aec109ac2c mpu9250:mag restructure to have proper retires for setup
We want to setup the mag interface with retries and report
  failurs.

  Move retry logic to contol point, instead of hiding re-reading
  the ID in ak8963_check_id.

  Allow it to fail once to overcome a read of 0 on firt read.
  after 2 failure report error to console and reset the
  mpu9250's I2C master (SPI to I2C bridge)

  The same retry logic is used on the ak8963_read_adjustments
  with a reset of the I2C master module after 5 fails. If it
  fails fter 10 retires. Disabel the mad and report the failure
  on the console, stating it is disabled.
2017-07-08 15:37:46 +02:00
David Sidrane
270dd5282a mpu9250:Add modify checked register api
Provide an API for the mag to use read-modify-write
2017-07-08 15:37:46 +02:00
David Sidrane
ef67b75057 mpu9250:Added comment on BYPASSING the internal i2c master bridge 2017-07-08 15:37:46 +02:00
David Sidrane
c3addd931c mpu9250:Issue error on console when a device fails to take initialization
On initialization, if after 3 retries to re-init the mpu9250 from
   the checked registers values, it fails. Ensure thath the fact the
   driver is exitting is logged to console.
2017-07-08 15:37:46 +02:00
David Sidrane
3272cc62d4 mpu9250: Do a reasonable post chip init validations, reporting errors
Check that the mpu9250's configured registers match the settings
   written to them. Attempt to fix any that do not up to 3 times.
   printing erros to the console on mismatches and returning
   faliure if after 3 attempts the any of the values are
   still wrong.
2017-07-08 15:37:46 +02:00
David Sidrane
7e293ab1d3 mpu9250:Fix errant comment 2017-07-08 15:37:46 +02:00
David Sidrane
5a53d92f22 mpu9250:Remove foklore delays
Remove delays on each register write in the
   reset function. Leaving only the delay
   following chip reset prior to configurations.
2017-07-08 15:37:46 +02:00
David Sidrane
b4d23a3f2c mpu9250:Rmove magic number, add ACCEL_RANGE_G 2017-07-08 15:37:46 +02:00
Julian Oes
9854fc0d84 Set timestamp with vehicle commands
The vehicle_command uORB messages had the timestamp unset at 0.
2017-07-08 11:52:23 +02:00
David Sidrane
6eff7deb7e Extend the delay ensure post reset pulse delayed.
Given the original poster's comment that "It happens very consistently for us." I suspect the motor spin observed in https://github.com/PX4/Firmware/issues/7457 is not caused by the original issue of slow decay on the PWM pins at reset, but the post reset pulse of 3.1 Ms arriving in a window that the ESC considers it valid.

The results from testing, indicated that the if the PWM pins were clamped low for > 300 Ms, prior to reset the motors did not spin. This would delay the the post reset pulse of 3.1 Ms out by > 300 Ms. 

This change delays the reset and therefore the pulse by at least 400 Ms.
2017-07-08 10:51:43 +02:00
David Sidrane
65d8b5c9cd px4fmu-v4:Insure the discharge of the pins PWM pins on rest.
On resets invoked from system (not boot) insure we establish a low
  output state (discharge the pins) on PWM pins before they become
  inputs.
2017-07-08 10:51:43 +02:00
Lorenz Meier
f7ba70a032 MPU6K driver: Ensure that default range is always 16g by default 2017-07-06 22:15:53 +02:00
Daniel Agar
eb067291bf airspeed sensors apply offset separately 2017-07-06 10:05:07 -04:00
Daniel Agar
c45d369004 ms5525 use int64 for calculation 2017-07-06 10:05:07 -04:00
Daniel Agar
95eaac6876 bmp280 properly cleanup if failed 2017-07-06 10:05:07 -04:00
Daniel Agar
32068dcd17 px4io increase stack 2017-07-06 10:05:07 -04:00
Daniel Agar
73d9358b1d meas_airspeed rename to ms4525_airspeed 2017-07-06 10:05:07 -04:00
Daniel Agar
7029be87c0 MS5525 differential pressure driver 2017-07-06 10:05:07 -04:00
Nicolae Rosia
2092770361 Integrator: fix comparison
Signed-off-by: Nicolae Rosia <nicolae.rosia@gmail.com>
2017-07-06 08:48:44 +02:00
Daniel Agar
af5256c454 GPS ublox add dynamic model parameter 2017-06-30 08:02:25 +02:00
Daniel Agar
40d40330b8 delete unused pio 2017-06-29 03:23:39 -10:00
David Sidrane
fc25213811 auav-x21:Delete PX4_I2C_BUS_ONBOARD 2017-06-29 07:59:56 +05:30
Julien Lecoeur
7929287f73 Fix -Werror=format-truncation on GCC 7
Fix formatting

Check snprintf return for error AND overflow
2017-06-26 15:50:44 +02:00
Julien Lecoeur
06c6a0cdec Fix -Werror=implicit-fallthrough errors on GCC7 2017-06-26 15:50:44 +02:00
Daniel Agar
ca480ff868 ms4525 treat max temperature as an error 2017-06-24 22:40:51 +02:00
Daniel Agar
6a443765a5 cmake only include mavlink where used 2017-06-19 20:24:09 +02:00
Beat Küng
410e822775 px4fmu-v4pro board_config: swap BRICK1 with BRICK2
problem: previously when connecting power to Power 1, commander refused
to arm (no power source error), and when connecting to Power 2, arming
works, but power consumption was not measured (& shown in QGC).
Swapping Brick1 with Brick2 makes sure both works when connecting to
power 1.

Ideally we will have support for both power sources (including fail-over)
2017-06-19 16:52:41 +02:00
Lorenz Meier
0a8b9061cf SDP3x driver: Minor cleanup in driver 2017-06-19 09:26:27 +02:00
Beat Küng
90df55123b lps25h_spi.cpp: remove MAGIOCGEXTERNAL ioctl
Because it's a baro driver, not a mag.
2017-06-14 19:53:07 +02:00
Beat Küng
ce7d8d2270 sensor_mag.msg: add is_external flag & set it in the mag drivers
With this we don't have to use the ioctl MAGIOCGEXTERNAL, which does not
work on POSIX (eg. RPi).
2017-06-14 19:53:07 +02:00
Beat Küng
19cdbcfd4f sdp3x_airspeed: fix shadowing warning for crc 2017-06-14 19:53:07 +02:00
Nicolae Rosia
a50a87928f navio_adc: add override flag to init
Signed-off-by: Nicolae Rosia <nicolae.rosia@gmail.com>
2017-06-13 08:16:37 +02:00
Daniel Agar
846435cd97 BlockParam<int> -> BlockParam<int32_t> for qurt 2017-06-12 12:18:53 -04:00
Daniel Agar
4937449890 move parameter unittest into systemcmds 2017-06-12 12:18:53 -04:00
Lorenz Meier
d104f984d4 Sensors: print airspeed validator status 2017-06-11 11:19:25 +02:00
Lorenz Meier
77ee8d5fb9 SDP3X: Lowpass the signal significantly less as it is far less noisy 2017-06-11 11:19:25 +02:00
Lorenz Meier
c6cece52d3 Sensirion SDP3X airspeed / differential pressure sensor driver 2017-06-11 11:19:25 +02:00
Nicolae Rosia
6ddc0b3fef linux_gpio: open fd once, and reuse it
Signed-off-by: Nicolae Rosia <nicolae.rosia@gmail.com>
2017-06-06 09:59:49 +02:00
Nicolae Rosia
92ac6f0c89 navio_adc: open fd once and reuse it
Signed-off-by: Nicolae Rosia <nicolae.rosia@gmail.com>
2017-06-06 09:59:49 +02:00
Lorenz Meier
ad05a6a7ec PCA9685 driver: Fix define 2017-06-04 12:52:18 +02:00
Fredmcc
96cffd4077 Fixed some formatting 2017-06-04 04:43:07 +08:00
Fredmcc
4ffbaed500 Fixed GPS Date on frsky SPort 2017-06-04 04:43:07 +08:00
Fredmcc
90a05a0f55 Fixed SPort heading scale and sourced from vehicle_local_pos 2017-06-04 04:43:07 +08:00
Fredmcc
5290e6cfe1 Fixed SPort scale for GPS coords and Altitude 2017-06-04 04:43:07 +08:00
davidaroyer
7b5753f426 drivers: use relative path for ocpoc pwm out mixer file 2017-06-04 04:24:50 +08:00