12236 Commits

Author SHA1 Message Date
bazooka joe
fb3a91cc4f added circuit_breaker_enabled_by_val()
added and using circuit_breaker_enabled_by_val() where possible instead of circuit_breaker_enabled() which search for cbrk parameters by name, which is extensive process.
2019-09-22 13:55:40 -04:00
cclauss
c18104d48b Use print() function in both Python 2 and Python 3
Legacy __print__ statements are syntax errors in Python 3 but __print()__ function works as expected in both Python 2 and Python 3.
2019-09-22 13:54:24 -04:00
Daniel Agar
fe4f6c186e Mavlink: ifdef networking code 2019-09-21 13:46:01 -04:00
bresch
0153e1b126 Matrix - Explicitly cast array[3] to Vector3f
Use .xy() for Vector2 -> Vector3 assignment
2019-09-19 17:31:49 +02:00
bresch
e9ab6a75ba MC rate control - Scale the integrator with K during the integration
part to avoid having to scale its saturation separately. This is
required to avoid premature saturation of the integrator when using
the K term.
Also remove double saturation of the integrator
2019-09-19 14:05:28 +02:00
bresch
67e528ec0c Takeoff - allow publishing NAN longitude and latitude
A NAN is interpreted in the FlightTaskAuto as a non-valid global coordinate and sets a local position.
If a zero is sent instead, the global coordinate is recognized as valid and will be executed.
This is a problem when the global position is gained for the first time after takeoff and that a valid global reference did not exist before
2019-09-19 14:03:58 +02:00
Nico van Duijn
549a962553 EKF2: move handling of invalid range into ECL (#12988)
* ekf2: Move handling of invalid range finder data inside ecl library

The ecl library EKF is able to use vehicle motion and in-air status to better determine when the default on-ground range finder reading can be used.
The description for the EKF2_MIN_RNG parameter has been updated to make its use clearer.
2019-09-19 11:29:34 +02:00
Matthias Grob
fa13f63db6 ekf2: temporarily hardcode new quality information to unkown
until priseborough's and nicovanduijn's pr #12950
2019-09-18 22:01:36 -04:00
Julian Kent
2d4ecab3b0 Remove unsafe access to .data() and _data in Matrix 2019-09-18 22:01:36 -04:00
Daniel Agar
494f35d5f4
Mavlink: wait for boot complete before sending or receiving anything 2019-09-18 09:07:55 -04:00
Maximilian Laiacker
72e93a9c36 fixed total flight time counting bug
After landing it can happen that a second take off is detected and then the _takeoff_time is rest, resulting in a wrong total flight time counter. With this fix the flight time is reliably counted from the first take off until the vehicle is disarmed. Normally the vehicle will not spend much time armed after landing, if it does the flight time will be off but this is the same as before this fix. This fix was tested in several flight experiments.
2019-09-17 14:52:27 +02:00
Daniel Agar
c13835c0f0 replay module split replay_main.cpp into separate compilation units 2019-09-17 14:33:04 +02:00
Silvan Fuhrer
702c6f6df4 FW pos C: fix altitude control for VTOL/FW by also publishing attitude sp if in altitude, not only if position or velocity controlled
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-09-10 13:20:07 -04:00
Silvan Fuhrer
92b824e218 VTOL attitude controller: run update_vtol_state only if mc or fw att sp changed, such that pusher support in hover works again
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-09-10 13:52:33 +02:00
Silvan Fuhrer
1b2403a87f VTOL land detector: trigger land detector in fixed-wing mode if disarmed.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-09-10 13:46:43 +02:00
Patrick Servello
47e668eb86 simulator and dumpfile fix minor resource leaks
* Certain conditional branches returned before closing the file handler.
2019-09-09 13:24:07 -04:00
Tanja Baumann
f3c5ca6015 Collision Prevention: support multiple sensors and frames (#12883)
* build internal sensor map

* Extend testing coverage

* Update matrix library
2019-09-06 08:38:56 +02:00
Julien Lecoeur
7bea81f02c Add board orientation ROLL_90_YAW_270 2019-09-05 20:41:32 -07:00
JaeyoungLim
09dab07071 Enable support for global position setpoints with SET_POSITION_TARGET_GLOBAL_INT (#12819) 2019-09-03 11:21:41 +02:00
Daniel Agar
9bc19fd732 IMU_GYRO_RATEMAX add common options 2019-09-02 23:53:26 -05:00
Daniel Agar
f280977ed0
mavlink: update orb_publish to uORB::Publication<> 2019-09-02 23:51:54 -05:00
Daniel Agar
20e6adc4ca
sensors: update orb_publish to uORB::Publication<> 2019-09-02 20:44:03 -04:00
Daniel Agar
c8f77d438d
load_mon: update orb_publish to uORB::Publication<> 2019-09-02 20:41:34 -04:00
Daniel Agar
4d9f2bf776
add IMU_GYRO_RATEMAX to optionally limit gyro control publication rate 2019-09-02 20:06:50 -04:00
Daniel Agar
7162000e80 fw_pos_control_l1: update orb_publish to uORB::Publication<> 2019-09-02 16:20:44 -04:00
Daniel Agar
e83026f106 fw_att_control: update orb_publish to uORB::Publication<> 2019-09-02 16:20:44 -04:00
Daniel Agar
6938955b8d
vtol_att_control: limit state updates to input availability and always publish both FW/MC actuator controls 2019-09-02 14:13:33 -04:00
Daniel Agar
06cf801121
SENS_BARO_QNH set reboot_required
- fixes https://github.com/PX4/Firmware/issues/12866
2019-09-02 13:40:34 -04:00
Julien Lecoeur
47355333ad Clarify comment 2019-09-02 10:47:40 -04:00
Julien Lecoeur
ced201bdb5 IO: respect actuator_armed.prearmed flag 2019-09-02 10:47:40 -04:00
Julien Lecoeur
9c50f5ea08 Add parameter COM_PREARM_MODE
Condition to enter the prearmed state, an intermediate state between disarmed and armed
 * in which non-throttling actuators are active.
 *
 * @value 0 Disabled
 * @value 1 Safety button
 * @value 2 Always
2019-09-02 10:47:40 -04:00
Mark Sauder
60e5e0821a land_detector: Add and max_altitude and timestamp validity checks to MulticopterLandDetector class. (#12681)
* Rename local camelCase vars to snake_case and control_mode -> vehicle_control_mode to match typdef with established class convention.
2019-09-02 00:30:46 -04:00
Daniel Agar
c180d63441 delete accidental systemlib/param/param_new.c 2019-09-01 20:42:41 -04:00
Daniel Agar
891aae0377
commander increase cpu overload threshold
* the large 20% margin is no longer appropriate now that nearly all work in the system is
scheduled (moved out of ISRs) and represented in the load percentage
 * closes https://github.com/PX4/Firmware/issues/12753
2019-09-01 14:55:05 -04:00
Silvan Fuhrer
ff6577ce5f EKF and AirspeedSelector: publish multiple wind estimate topic instances and log them all
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-09-01 14:05:06 -04:00
Beat Küng
a2ebbe9066 pwm_limit: rename to output_limit
As there is nothing pwm-specific about it.
2019-08-31 10:05:00 -04:00
Beat Küng
1bee984bb0 MC_AIRMODE: move parameter definition to mixer_module
Makes sure that the parameter is included for the builds that need it.
2019-08-31 10:05:00 -04:00
Daniel Agar
78ef8aab2d STACK_MAIN increase default 1024 -> 2048 2019-08-30 19:11:51 -07:00
kritz
9ed2daef48 Fixing and simplifying mavlink odometry handling (#12793)
* Fixing and simplify mavlink odometry
2019-08-30 06:33:13 -07:00
Beat Küng
43fdcd7876 px4_middleware: remove that header and move px4::init to px4_init.h
delete include:
for i in $(grep -rl 'px4_middleware.h' src platforms); do sed -i '/#include <px4_middleware.h/d' $i; done
2019-08-30 07:59:44 +02:00
Beat Küng
f8e0441e7b src/platforms/common: move to platforms/common
Script to update include paths:
for i in $(grep -rl 'include <px4_work_queue' src platforms); do sed -i 's/#include <px4_work_queue/#include <px4_platform_common\/px4_work_queue/' $i; done
2019-08-30 07:59:44 +02:00
Beat Küng
ab43a83bed platform: restructure (NuttX) architecture-specific code
updated: tone_alarm, px4io_serial, px4_micro_hal
2019-08-30 07:59:44 +02:00
roangel
1e510f5a44 [FlightTasks] Added class enum for FlightTasks errors (#12822) 2019-08-29 14:48:52 +02:00
Daniel Agar
aebf244464 mc_pos_control: takeoff fix implicit switch fallthrough 2019-08-28 18:16:28 -04:00
roangel
e50dd7c364 replay: close replay log file after replay is finished, then exit (#11264) 2019-08-28 08:13:50 +02:00
JaeyoungLim
950dbc1d2e Rover: Enable Offboard support for Rover position control 2019-08-21 12:04:19 -04:00
Julien Lecoeur
7fa885c7b3 Document the behaviour of TERMINATE and LOCKDOWN in comments 2019-08-21 07:56:20 -07:00
Julien Lecoeur
85c2e7d65d Offboard failsafe actions: cleanup and move to dedicated functions 2019-08-21 07:56:20 -07:00
Julien Lecoeur
84eeacfb38 Offboard failsafe actions: add DISABLED, LOCKDOWN and TERMINATE options 2019-08-21 07:56:20 -07:00
Julien Lecoeur
4c9288d993 Commander: cleanup COM_POSCTL_NAVL parameter
- move to px4::params
- use enum
2019-08-21 07:56:20 -07:00