22664 Commits

Author SHA1 Message Date
Daniel Agar
f11bb401f4 CMD_MISSION_START allow first_item=-1 to leave index unchanged 2017-07-08 19:49:52 +02:00
Lorenz Meier
49bbd0e58d Navigator: Be less verbose 2017-07-08 19:36:58 +02:00
Lorenz Meier
d80be2e4ff MAVLink: better output handling 2017-07-08 19:36:58 +02:00
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
Lorenz Meier
90fdc544fd MAVLink app: Code style fix 2017-07-08 15:34:36 +02:00
Lorenz Meier
ddf32e14de MAVLink app: More print improvements 2017-07-08 15:23:46 +02:00
Lorenz Meier
d15dd061f9 MAVLink app: More debug string formatting 2017-07-08 14:36:08 +02:00
Lorenz Meier
e8aa5a3172 MAVLink app: Fix non-enabled debug string output 2017-07-08 14:23:46 +02:00
Lorenz Meier
6f368f34d1 MAVLink: Remove non-required safety check 2017-07-08 13:59:35 +02:00
Lorenz Meier
8d8174ea0c MAVLink command retransmission: Reduce RAM footprint and make debug output optional 2017-07-08 12:46:28 +02:00
Julian Oes
a13f23f244 timestamped_list: use const ref 2017-07-08 11:52:23 +02:00
Julian Oes
7e1e98b258 timestamped_list: fix comment syntax 2017-07-08 11:52:23 +02:00
Julian Oes
1576094d9f mavlink_command_sender: use const ref 2017-07-08 11:52:23 +02:00
Julian Oes
893b7b5d46 mavlink_command_sender: instantiate in initialize 2017-07-08 11:52:23 +02:00
Julian Oes
c66af00753 mavlink_command_sender: fix NuttX build 2017-07-08 11:52:23 +02:00
Julian Oes
e6d31f951c mavlink_command_sender: fix logic after first test
- change/add a few printfs so they make more sense
- don't accidentally ignore command_acks
- don't forward commands to the same component id, and don't forward
  commands that are broadcast to all components (target component 0)
2017-07-08 11:52:23 +02:00
Julian Oes
af0107ae0a mavlink: add class for command retransmission
This adds a class to allow for retransmission of outgoing commands.
The sent commands are kept in a timestamped list to check if they are
acked as required by the mavlink protocol.
If they are not acked within a timeout, they can be retransmitted.
2017-07-08 11:52:23 +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
Julian Oes
d64b7706f5 check_code_style_all: accept astyle version 3.0.1 2017-07-08 11:52:23 +02:00
ChristophTobler
a5e435808f mavlink log if camera unsuccessful 2017-07-08 11:52:23 +02:00
Lorenz Meier
b42c1123a2 ROMFS: Add flaps and gear mixers to all standard planes
It makes sense to have this for all standard planes and our default PWM outputs for MAIN are always 6 wide, so this should scale to all known HW platforms.
2017-07-08 11:50:48 +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
Jan Liphardt
38fa6dcad5 Clipping of the battery current due to Int*Float
Note that Type buf_adc[i].am_data = int32_t, but everything else are floats. Suggest (float)(buf_adc[i].am_data), precisely as was done a few lines later for the voltage.
2017-07-08 10:23:36 +02:00
Matthias Grob
60c760280e mc_pos_control: fix comment typo "hight" 2017-07-07 18:25:35 +02:00
Matthias Grob
b511ccd9fe mc_pos_control: integrate complete order and limits of velocity setpoint calculation
- one warn_rate_limited was missing
- vel_sp_slewrate was in the wrong order for smooth slowdown/speedup on takeoff and landing
- slow_land_gradual_velocity_limit was replaced by calls to math::gradual
- smooth takeoff speed got controllable by user input
- comments were corrected
- an additional check for the sanity of velocity setpoints was added
2017-07-07 18:25:35 +02:00
Matthias Grob
1d7f760a96 mathlib, mc_pos_control: rename functions file and add gradual linear function 2017-07-07 18:25:35 +02:00
Dennis Mannhart
1c2d54397f mc_pos_control: move constraints to the end 2017-07-07 18:25:35 +02:00
Dennis Mannhart
2758a4a6fa mc_pos_control: add warn_rate limit function 2017-07-07 18:25:35 +02:00
Beat Küng
c8b9f8afa8 F7 nuttx configs: increase CONFIG_STM32F7_BBSRAM_FILES to 5 2017-07-07 17:06:48 +02:00
Beat Küng
9141bf8386 replay: handle INFO_MULTIPLE & FLAG_BITS ULog messages 2017-07-07 17:06:48 +02:00
Beat Küng
c775b07b43 logger: use INFO_MULTIPLE for top & perf output 2017-07-07 17:06:48 +02:00
Beat Küng
209f220288 hardfault_log: move hardfault_store_ulog_filename to logger module 2017-07-07 17:06:48 +02:00
Beat Küng
eac657f4b3 hardfault_log: append crash log to last ULog file upon commit
This keeps the separate .txt around, since it's possible that the ULog file
gets corrupt during the crash.
2017-07-07 17:06:48 +02:00
Beat Küng
b515873bee ULog: add INFO_MULTIPLE & FLAG_BITS messages
This requires support in the parsers, and thus the ULog file version is
increased.
As long as no data is appended, both, existing pyulog & FlightPlot, can
still read the new logs (they will output a warning).
The replay module will print an error, but still continue.
2017-07-07 17:06:48 +02:00
Beat Küng
1be089cf0c BBSRAM: add another partition and store the last ulog path 2017-07-07 17:06:48 +02:00
Beat Küng
18ea5ec1f8 logger: add git branch name to the log 2017-07-07 17:06:48 +02:00
Lorenz Meier
91144f502f EKF2 build fix 2017-07-07 08:29:10 +02:00