12172 Commits

Author SHA1 Message Date
Daniel Agar
dacaabe92e
introduce sensor_gyro_control message for vehicle_angular_velocity (#12145) 2019-08-16 13:53:59 -04:00
Mathieu Bresciani
dab66e92d3 Fix typo 2019-08-15 14:31:23 +02:00
Dennis Mannhart
bf25c462b2 Orbit failsafe: switch internal_state to Posctrl such that Manual-Positionctrl is activated after failsafe recovery. This is needed because Orbit can only be invoked via vehicle_command msg. 2019-08-15 14:31:23 +02:00
mcsauder
d4fedca1ee Rename _accel_horz_lp -> _xy_accel_filtered to standardize naming, use time literal, and delete unneeded #includes in the FixedwingLandDetector class. 2019-08-14 23:10:20 -04:00
Martina
0414d59ee9 mavlink_main: stream OBSTACLE_DISTANCE to GCS 2019-08-14 13:32:15 -04:00
Julian Oes
82bee2bf54 mavlink: match commands aimed at any sysid/compid
When we send a command to any sysid or any compid, we need to match an
ack from a specific sysid or compid. If we don't do that, we keep
sending retransmissions and eventually time out.
2019-08-14 13:29:07 -04:00
Julian Oes
a4fb18a6c4 commander: fix arming auth param translation
The int32 param COM_ARM_AUTH is mapped to a packed struct. However, this
struct was not actually packed (anymore) and therefore the values were
applied incorrectly.

I fixed this by applying the packed attribute. By using a union with a
int32_t I could rid of the warning about address-of-packed-member.
2019-08-14 13:29:07 -04:00
mcsauder
9e055e9b21 Implement ModuleParams inheritance in the VtolLandDetector class. Requires PR #12356. 2019-08-14 11:58:14 -04:00
Jimmy Johnson
9e3493bd6e Update commander_params.c
Addressing parameter description syntax
2019-08-14 14:17:33 +02:00
Jimmy Johnson
3ab5932adf updating pre-takeoff and landding values to defaults 2019-08-14 14:17:33 +02:00
Jimmy Johnson
963467b4df splitting preflight and land disarm times into 2 parameters 2019-08-14 14:17:33 +02:00
Mark Owen
e25db01620 Mavlink: Fix forwarding of messages with target system/component id (#12559)
Mavlink does not correctly forward messages that have the target_system or target_component routing fields in the message.

Some investigation revealed that the Mavlink::forward_message function is incorrectly utilizing the mavlink_msg_entry_t.target_system_ofs and mavlink_msg_entry_t.target_component_ofs fields. These offsets are intended to be used relative to the start of the message payload. But, as implemented, these offsets are incorrectly being used relative to the start of the message. This pull-request corrects that problem.

I also correctly made use of the mavlink_msg_entry_t.flags field to determine if a message contains a target_system or target component field. The previous check incorrectly assumed that they would always be non-zero if present.

Signed-off-by: Mark Owen <maowen801@gmail.com>
2019-08-13 07:16:09 -07:00
Beat Küng
166639be3a logger: unconditionally call _writer.notify()
The file writer thread could get into a state where it blocked infinitely
on pthread_cond_wait() (or rather until the logging stops).

This is very rare and the following conditions must be met:
- the buffer is almost empty (<4KB filled), so that the writer thread does
  not write anything.
- an fsync call is scheduled (happens once every second)
- the fsync call takes a long time (several 100ms), during which time the
  complete log buffer fills up.

The main thread would then get into dropout state where it does not call
_writer.notify() anymore.

Notifying the writer thread on every loop update of the main thread fixes
that.

It does not increase resource usage.
2019-08-12 08:07:37 +02:00
Mark Sauder
6abf2203a3 sensors: uniform initialization and whitespace formatting in voted_sensors_update.h 2019-08-10 02:14:22 -04:00
Daniel Agar
6413525645
uORB::PublicationQueued don't unadvertise on destruction (#12674)
* this is a bit of a hack for vehicle_command and vehicle_command_ack usage
2019-08-09 12:45:02 -04:00
Daniel Agar
b5a01532ae
vtol_att_control move to WQ with uORB callback scheduling (#12229)
* add perf counters for cycle time and interval
2019-08-09 12:44:11 -04:00
jie.zhang
decb9a8982 mc_pos_control_main: Fixed missing semicolon 2019-08-09 17:00:43 +02:00
Julian Kent
d70b024ec7
GTest functional tests that include parameters and uORB messaging (#12521)
* Add kdevelop to gitignore

* Add test stubs

* Rename px4_add_gtest to px4_add_unit_gtest

* Add infrastructure to run functional tests

* Add example tests with parameters and uorb messages

* Fix memory issues in destructors in uORB manager and CDev

* Add a more real-world test of the collision prevention
2019-08-09 15:10:09 +02:00
bresch
b1698b78bc AutoSmoothVel - scale down acc_hor using traj_p parameter in the computation of the maximum waypoint entrance speed 2019-08-09 12:04:48 +02:00
Silvan Fuhrer
07895cd3b6 Airspeed Selector: resolve conflics for wind estimate topic publishing after rebase
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-09 10:55:05 +02:00
Silvan Fuhrer
cedf14e2ba Airspeed Selector: repurpose wind estimator into an airspeed (selection, validation) module.
This new airspeed module does:
  -runns an airspeed validator for every airspeed sensor present, which checks measurement validity and estimates an airspeed scale
  -selects another airspeed sensor if for the current one a failure is detected
  -estimates airspeed with groundspeed-windspeed if no valid airspeed sensor is present
  -outputs airspeed_validated topic

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-09 10:55:05 +02:00
Silvan Fuhrer
248e1818e2 Airspeed Selector: changes in airspeed library to account for new EAS state (equivalent airspeed)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-09 10:55:05 +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
09d79b221f Simplified esc_status healthiness logic.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli
75c336c00c uavcan_main: replaced printf messages with PX4_INFO
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-08-09 09:41:17 +02:00
Claudio Micheli
1e04d718f6 uavcan escs: Modified esc_status reporting to have _rotor_count published.
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
Mark Sauder
056c8000a1 MultiCopterLandDetector: Implement ModuleParams inheritance (#12356) 2019-08-09 07:57:42 +02:00
Daniel Agar
e8a11086eb create uORB::PublicationMulti for multi publications 2019-08-08 21:01:56 -04:00
Daniel Agar
0a0c404a08 mavlink receiver move to uORB::Publication 2019-08-08 21:01:56 -04:00
Daniel Agar
c6aaa606da
sensors angular velocity and acceleration publishers fix auto usage
- if the primary gyro or accel change this will cause the callback to be registered multiple times
2019-08-08 11:36:27 -04:00
Daniel Agar
c66fc85630
fw_pos_control_l1: move to WQ with uORB callback scheduling 2019-08-07 23:13:21 -04:00
Daniel Agar
cab0aee2a0
fw_att_control: move to WQ with uORB callback scheduling 2019-08-07 22:54:44 -04:00
Daniel Agar
e43e37cc46 fw_pos_control_l1 add new simple min groundspeed 2019-08-07 18:50:42 +02:00
Matthias Grob
161429f8c6 voted_sensors_update: refactor to camelCase function names 2019-08-07 18:44:39 +02:00
Matthias Grob
89a0a3acb6 PreflightCheck: improve output in case of mag inconsistency 2019-08-07 18:44:39 +02:00
Matthias Grob
fe37ee2b7f voted_sensors_update: refactor out matrix:: because of using namespace 2019-08-07 18:44:39 +02:00
Matthias Grob
45187e1aa8 Improve magnetometer inconsistency check
To check directional difference between the magnetometer field vectors
instead of vector component difference.
2019-08-07 18:44:39 +02:00
Daniel Agar
83e532d339
logger move to uORB::SubscriptionInterval (#12123) 2019-08-07 11:02:16 -04:00
Daniel Agar
a917f22b65
sensors: create vehicle_acceleration module (#12597) 2019-08-07 05:05:48 -04:00
Daniel Agar
7b179776e2 vehicle_angular_velocity: sensor_selection callback
- needed to update the main sensor_gyro subscription if the primary
stops responding
2019-08-06 14:23:57 -04:00
Daniel Agar
2ad12d7977
sensors: create vehicle_angular_velocity module (#12596)
* split out filtered sensor_gyro aggregation from mc_att_control and move to wq:rate_ctrl
2019-08-06 12:55:25 -04:00
Daniel Agar
6f2d1d55f6 logger use uORB::PublicationQueued for ulog_stream
- queue depth is now set by the msg
2019-08-06 11:07:59 -04:00
Daniel Agar
5b511eaa1a logger move non-logged subscriptions to uORB::Subscription 2019-08-06 11:07:59 -04:00
garfieldG
d3ba9c59e0 mavlink: added check if instance mode is serial when trying to find if instance exists (#12642) 2019-08-06 10:53:07 -04:00
Daniel Agar
8f5b7de498
uORB::Subscription minor API cleanup
* the forceInit() method was combined with the existing subscribe()
 * delete unused last_update()
2019-08-06 10:28:49 -04:00
Martina Rivizzigno
e0893c383d increase mc_pos_control stack from 1300 to 1500 2019-08-05 16:05:40 +02:00
Martina Rivizzigno
39e59d6cc4 add point type (mavlink command associated with wp) in Obstacle Avoidance interface 2019-08-05 16:05:40 +02:00
Andrei Korigodski
4d5f922e7a commander: use shutdown_if_allowed() to check for shutdown safety
Signed-off-by: Andrei Korigodski <akorigod@gmail.com>
2019-08-05 05:55:33 -07:00
Andrei Korigodski
5133453822 vehicle_status: replace ARMING_STATE_REBOOT with ARMING_STATE_SHUTDOWN
Signed-off-by: Andrei Korigodski <akorigod@gmail.com>
2019-08-05 05:55:33 -07:00