Commit Graph

1395 Commits

Author SHA1 Message Date
Lorenz Meier 070a73ad63 Commander: Switch into right mode in various corner conditions
* If you move in LAND, AUTO or HOLD the sticks the system will give control back to the pilot
  * If you do not connect any RC the system will default to HOLD and will allow you tablet control
  * If you gain position lock for the first time the system will re-evaluate the mode switch (so if you dropped down to alt hold it will now go into position)
  * If the system breaches the Geofence it will now always drop back to POSCTRL if the sticks are moved
2017-02-17 09:13:13 +01:00
aivian 7a77e27a79 fixed wing offboard attitude setpoint fix (#6112) 2017-02-15 23:51:50 -05:00
Lorenz Meier 081c40c6fa Commander: Fix level cal command 2017-02-15 22:16:20 +01:00
ChristophTobler 0263ab8cd2 enable takeoff in gps denied areas and minor requested changes 2017-02-13 21:11:25 +01:00
ChristophTobler 1f7fdb2386 allow local position for takeoff (e.g. flow) 2017-02-13 21:11:25 +01:00
Daniel Agar feda5caac2 commander state machine helper fix style and remove unused 2017-02-12 10:29:59 +01:00
Daniel Agar d0b188f585 commander FW don't allow FOLLOW or OFFBOARD 2017-02-12 10:29:59 +01:00
David Sidrane 473c211eb0 gyro_calibration uses simpler common bord indentity api 2017-02-04 22:27:04 +01:00
Simone Guscetti b182a5eeca Added the vehicle_status_flags publisher with the conversion in a bit field in commander 2017-02-04 21:13:59 +01:00
Lorenz Meier bf448fce71 Commander: Update call for new power management interface 2017-02-04 21:06:21 +01:00
Lorenz Meier a92931fe84 Commander: Switch system off if in undervoltage condition and disarmed.
This is necessary to not have systems deep-discharge the battery while sitting idle. While at it we also deny arming in low battery conditions to ensure people who just landed with a low battery do not take off again and fail to get a successful RTL.
2017-02-04 21:06:21 +01:00
Beat Küng b89b76fbe6 gyro_calibration: use param_notify_changes 2017-02-03 13:57:48 +01:00
Beat Küng 3eecd16309 accelerometer_calibration: use param_notify_changes 2017-02-03 13:57:48 +01:00
Simone Guscetti fe53e3a0d5 commander: add status_changed when battery is low 2017-02-03 13:53:51 +01:00
Beat Küng b6f3cf9425 events: refactor temperature_calibration command to take options and use a single vehicle_command
This makes it easier to start calibration for all sensors at once.
2017-02-02 23:54:06 +01:00
Daniel Agar b33d49c77d state_machine_helper use static_assert 2017-02-01 22:15:50 -05:00
Daniel Agar 6631e72d6f clang-tidy modernize-redundant-void-arg 2017-02-01 22:15:50 -05:00
Daniel Agar e927f3e040 clang-tidy modernize-use-nullptr 2017-02-01 22:15:50 -05:00
Beat Küng c0fd3afc8c accelerometer_calibration: only notify system once (after last scale change) 2017-02-01 08:40:23 +01:00
Paul Riseborough bdbc4f4d65 commander: fix bug in gyro calibration
If the same gyro data was contained in two uORB instances, the thermal offset coefficient was being corrected twice.

TODO should fix what was causing data from the same sensor to appear on two uORB topics.
2017-02-01 08:40:23 +01:00
Paul Riseborough 6e841f6cbd commander: fix bugs in handling of thermal compensation during access cal 2017-02-01 08:40:23 +01:00
Beat Küng 4763a119bc calibration: make sure to notify the system when temp calibration changes
This is needed so that temperature compensation reads in the updated values
and publishes the updated sensor_correction topic.
2017-02-01 08:40:23 +01:00
Beat Küng 7ebe2ac017 gyro_calibration: take into account temperature compensation when storing the scale 2017-02-01 08:40:23 +01:00
Beat Küng fbef2b7a6a accelerometer_calibration: avoid using accel_mapping
This is not needed, as s is an uORB instance and accel_offset_0
contains data from uORB instance 0.
2017-02-01 08:40:23 +01:00
Beat Küng fdb75dbba2 accelerometer_calibration: simplify & fix if temp compensation is enabled
if compensation enabled, scale & offsets for the drivers should be reset,
but actually only the params were reset and accel_scale was still applied
to the driver via ioctl.
2017-02-01 08:40:23 +01:00
Beat Küng d0ea4e8876 accelerometer_calibration: cleanup 2017-02-01 08:40:23 +01:00
Beat Küng 69fd8447ae accelerometer_calibration: make sure to initialize sensor_correction properly 2017-02-01 08:40:23 +01:00
Beat Küng 51def4fc60 gyro_calibration: make sure to initialize sensor_correction properly
if it's not published yet or published with low frequency, this makes sure
we have valid data.

also:
- _sensor_correction -> sensor_correction
- remove unnecessary init of sensor_correction_sub
2017-02-01 08:40:23 +01:00
Paul Riseborough fb774bef67 commander: enable accel cal to adjust thermal compensation parameters 2017-02-01 08:40:23 +01:00
Paul Riseborough 62694d92d2 commander: rework IMU cal for compatibility with temperature compensation 2017-02-01 08:40:23 +01:00
pixhawk ef2a5599a1 mag_calibration: Make sure calibration fails if any mag fails; More checks on calibration results 2017-02-01 08:38:26 +01:00
pixhawk fded02220b calibration_routines: use PX4_ISFINITE() instead of isnan() 2017-02-01 08:38:26 +01:00
pixhawk 5c96c8c1b3 Removed std::fill_n since it is not supported 2017-02-01 08:38:26 +01:00
pixhawk 9fe65d0957 Fix array initialization bug 2017-02-01 08:38:26 +01:00
Siddharth Bharat Purohit 2c831c314e commander: correct mag cal offset direction 2017-02-01 08:38:26 +01:00
Siddharth Bharat Purohit c6f8bcf8b3 commander: use mathlib matrix_alg functions 2017-02-01 08:38:26 +01:00
Siddharth Bharat Purohit 78b8deda15 commander: add ellipsoid 9 param fit for magnetometer corrections 2017-02-01 08:38:26 +01:00
Siddharth Bharat Purohit c9ac15f0dd commander: fix code style 2017-02-01 08:38:26 +01:00
Siddharth Bharat Purohit f811777789 commander: add new math for sphere fit for compass calibration 2017-02-01 08:38:26 +01:00
Beat Küng c1e2aeff0b commander: ignore PREFLIGHT_CALIBRATION for temperature calibration param 2017-01-25 22:43:29 +01:00
David Sidrane 63e3bbde07 gyro_calibration is using board_get_uuid_raw32 instead of mcu_unique_id 2017-01-25 07:43:11 +01:00
Julian Oes 4ceba407f2 commander: raise stack size
A stack usage of 3000 bytes was observed, therefore it's safer to raise
the commander's stack size by 400 bytes.
2017-01-21 16:04:43 +01:00
David Sidrane 1c3ebadb85 Removed unused defines AVIONICS_ERROR_VOLTAGE and AVIONICS_WARN_VOLTAGE 2017-01-21 11:45:36 +01:00
Chris Lovett 33a307873a Enable rc mode change switch to override offboard mode. This is a safety feature, in case offboard control goes crazy, user can always regain control by switching modes to stabilize, or alt hold or position hold, however they have configured the mode change RC switch. 2017-01-18 18:15:58 +01:00
Lorenz Meier a13082bfed commander: Widen pre-flight check for airspeed 2017-01-16 08:26:37 -08:00
wangxdflight b693e29d64 enable px4 flight for excelsior(legacy) 2017-01-16 08:25:58 -08:00
Daniel Agar df5d0ba8b9 airspeed cal more descriptive error message (#6324) 2017-01-13 17:26:27 -05:00
Beat Küng 48c5ec54bb commander: make sure all code paths return an (n)ack to MAV_CMD_PREFLIGHT_CALIBRATION 2017-01-11 16:25:04 +01:00
Daniel Agar 5ec546f735 Makefile add scan-build target 2017-01-02 10:14:41 +01:00
Lorenz Meier 8416505a67 Commander: Header cleanup 2016-12-27 21:00:51 +01:00