66 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
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
Julien Lecoeur
4c9288d993 Commander: cleanup COM_POSCTL_NAVL parameter
- move to px4::params
- use enum
2019-08-21 07:56:20 -07:00
Jimmy Johnson
963467b4df splitting preflight and land disarm times into 2 parameters 2019-08-14 14:17:33 +02:00
Claudio Micheli
2eb9fb9ed6 Commander: move esc_status as local variable.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli
187a025dfe Commander: added esc_status prearm checks
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Daniel Agar
a917f22b65
sensors: create vehicle_acceleration module (#12597) 2019-08-07 05:05:48 -04:00
Daniel Agar
e69398c09f introduce uORB::PublicationQueued and transition most orb_advertise_queue usage 2019-08-04 10:08:09 -04:00
Daniel Agar
4e360064d9
commander refactor and cleanup offboard control mode 2019-06-15 20:45:26 -04:00
Daniel Agar
79d4c09d59
uORB::Publication simplify and cleanup
- base class is now template
 - drop linked list
 - virtualization no longer required
2019-06-12 08:48:19 -04:00
bresch
d3c9436f84 flight termination - rename in_flight_termination to flight_termination_triggered 2019-06-05 16:53:08 +02:00
bresch
ba93f9b983 FailureDetector - Update failure detector logic in commander. 2019-06-05 16:53:08 +02:00
Thomas Gubler
d8a4d70fce Add Param "User Flight Profile"
This param has no effect within the Firmware.

The param can be used for example:

* in log post processing to have context about the flight
* in ground stations to adapt the UI automatically
2019-06-05 06:45:43 -07:00
Daniel Agar
3faab909d7 commander move most orb subscriptions to uORB::Subscription 2019-06-04 18:44:51 -04:00
bresch
2307c7c390 Geofence - Rename _warning_action_on to _geofence_warning_action_on
since it is only set by the geofence logic. Simplify conditions in IF
statements.
2019-06-04 08:35:56 +02:00
bresch
f8f967f073 Geofence - Change from "re-engage geofence failsafe every 10s when
outside the fence" to "engage geofence failsafe on transition". This
way, the pilot is not stucked in the non flight zone and can switch to
a manual mode and fly back or trigger RTL.
2019-06-04 08:35:56 +02:00
bresch
427b2e6636 Geofence - Do not trigger geofence failsafe while in low battery
failsafe action.
Also move geofence flags from static variables declared into the if
statement to private members of the class.
2019-06-04 08:35:56 +02:00
Daniel Agar
2c63e335e9 uORB::Subscription subscribe directly to uORB device node object 2019-06-03 17:06:21 -04:00
Julian Oes
7b9562e3b1 hysteresis: move out of systemlib, move to gtest
This moves the hysteresis test out of the systemlib and makes it its own
small library. Since it still depends on hrt_absolute_time this does not
link yet. My attempt to get all link dependencies together failed.
2019-05-27 09:57:50 +02:00
Daniel Agar
9bad61b86b
Improve robustness to bad and lost airspeed data (#11846) 2019-04-30 03:08:23 -04:00
bresch
2ca8ddd8af Parameter update - Rename variables in modules/commander
using parameter_update.py script
2019-04-03 15:38:50 +02:00
Claudio Micheli
0eb4942f66 Commander: renamed print_msg_once variable into a more self-explanatory one.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-27 09:56:32 +01:00
Claudio Micheli
be6f753022 Fixed CI errors. changed _print_msg_once into private class member.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-27 09:56:32 +01:00
Claudio Micheli
e14e5b9d73 Commander: Changed COM_ONB_BOOT_T parameter to COM_OA_BOOT_T.
Since the time out is only Obstacle-Avoidance related, the new naming is more self explanatory.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-27 09:56:32 +01:00
Claudio Micheli
3b5ef82193 Commander: Added COM_ONB_BOOT_T parameter.
Since onboard controllers bootup times are hardware dependent, it makes sense to have the possibility to adapt timeout time according to the specific HW.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-27 09:56:32 +01:00
Beat Küng
6672284871 commander: fix status init & some status update changes 2019-03-12 11:24:33 +01:00
Claudio Micheli
697566177c Commander: Properly initialized another boolean variable.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli
908cdaa574 Onboard controller loss parameter cleanup.
Since Timeout from onboard controller is something that does not require a lot of modifications there is no sense to having it parametrized.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli
fb990d7de3 Removed subscribtion to multiple _telemetry_status instances.
Since commander handles all telemetry_status the same there is no need to subscribe to multiple instances.


Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli
a53594135b Commander: changed "datalink regain" logic.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli
788e28fbb1 Commander: datalink heartbeat variables refactoring.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli
a84a1e1b5a Commander: mavlink messages cleanup. header variables refactoring.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli
14415b29c1 Removed hardcoded onboard controller timeouts thresholds.
Added COM_ONB_LOSS_T and COM_ONB_REG_T parameters to specify thresholds that triggers "onboard link lost" and "onboard link regained".


Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
Claudio Micheli
1fc055a51f Fixed some issues for datalink loss & regain (GCS HEARTBEAT).
Major changes:
- Prevent  "HIGH LATENCY DATA LINK LOST" message to appear if iridium telemetry is not used.
- Prevent "DATA LINK LOSS" mavlink messages flooding when QGC is open and then closed.
- Changed "DATA LINK REGAINED" condition (use _datalink_last_heartbeat_gcs insthead of _datalink_lost)



Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-03-12 11:24:33 +01:00
baumanta
d42b9205f9 Rename parameter MPC_OBS_AVOID to COM_OBS_AVOID and change the location to commander. 2019-03-12 11:24:33 +01:00
baumanta
a98f5d2ab2 suggestion for treating obstacle avoidance heartbeats 2019-03-12 11:24:33 +01:00
Daniel Agar
6dec451bab HEARTBEAT and commander failsafe handling cleanup 2019-03-12 11:24:33 +01:00
Daniel Agar
88fd8147fd commander auto disarm if kill switch engaged for 5 seconds
- closes #10133
2019-02-20 18:37:20 +01:00
Alessandro Simovic
6e5bd1ad70 commander: remove duplicate includes 2019-01-28 12:05:36 +01:00
Beat Küng
447ed18ab4 commander: use C API for MC_AIRMODE & RC_MAP_ARM_SW to remove multirotor modules dependency 2018-12-13 09:50:07 +01:00
Beat Küng
24dc316973 commander: enforce yaw-airmode to have an arming switch mapped
Yaw airmode w/o arming switch is most likely not what you want and will
lead to surprising results.
2018-12-13 09:50:07 +01:00
Daniel Agar
d4f713b286 commander cleanup home position handling 2018-11-25 21:00:51 +00:00
CarlOlsson
c826140c2b commander: update comment to make post takeoff ekf quality test logic more clear 2018-10-22 09:26:06 -04:00
Matthias Grob
c87e124f13 commander: refactor COM_DISARM_LAND to param wrapper
after review comment request from @dagar. Thanks!
2018-08-30 08:05:13 +02:00
bresch
c4c8e8d2db Failure Detector - Various cleanup and style changes.
- use pragma once guard in FailureDetector.hpp
- send Commander parent to ModuleParams and remove update_params() method
- simplify attitude checks
- FailureDetector::get_status() (previously named "get") is now a constant method that returns a constant reference
2018-08-28 11:23:25 -04:00
bresch
246b3ebc23 FailureDetector - Update failure detector logic in commander. 2018-08-28 11:23:25 -04:00
bresch
7908f75b8b FailureDetector - New class, first working simple implementation. Outputs PX4_ERR messages if roll or pitch is exceeded. 2018-08-28 11:23:25 -04:00
Daniel Agar
6396e486bd commander cleanup battery failsafe handling 2018-08-21 02:38:51 -04:00
Daniel Agar
92bfdea1e3 commander delete non-existant methods and cleanup 2018-08-03 17:38:16 -04:00
Daniel Agar
05ca1defee commander consolidate estimator checks in new method 2018-08-03 17:38:16 -04:00