Commit Graph

12201 Commits

Author SHA1 Message Date
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
Beat Küng 7f6a9e587f logger: fix multiple format definitions for multi-instance topics
With https://github.com/PX4/Firmware/pull/12123 all multi-instance topics
lead to repeated format definitions in the ULog file.
2019-08-21 10:47:31 -04:00
Jaeyoung-Lim 914417f580 Enable offboard local position setpoints for fixed wing position control 2019-08-21 12:12:29 +02:00
Silvan Fuhrer 8a8cc3b52b Navigator: VTOL: set heading of transition of a VTOL_TAKEOFF to the VTOL_TAKEOFF waypoint (and enforce heading)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-21 10:08:04 +02:00
Silvan Fuhrer b1d38ee050 Navigator: VTOL: fix mission yawing timeout (MIS_YAW_TMT)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-21 10:08:04 +02:00
Silvan Fuhrer ab28f1e4f7 Navigator: VTOL: disable weather vane during yaw aligning before front transition
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2019-08-21 10:08:04 +02:00
Daniel Agar 7d248e0f45 px4fmu: move to WQ with uORB callback scheduling (#12224) 2019-08-20 20:24:12 -04:00
Daniel Agar 41dee3875e VTOL: only run on actuator publications corresponding to VTOL mode 2019-08-20 13:50:34 -04:00
Daniel Agar d38dfcfcd3 uORB::Subscription fix initialization but not yet published case
- otherwise uORB::Subscription will erroneously report published after the first successful initialization of an unpublished topic
2019-08-20 10:28:09 -04:00
Daniel Agar 737f5d4e3d px4io fix code style 2019-08-19 15:11:39 -04:00
dlwalter 310fd80405 added logic to encode NAN as INT16_MAX to transfer to IO from FMU 2019-08-19 21:08:11 +02:00
Beat Küng a7eed520b4 commander: refactor module usage output 2019-08-19 10:54:56 +02:00
Beat Küng d64d3170c0 commander unit tests: enable preflight checks
- the last check expects pre_arm to run so we need to enable the
  preflight checks. This is closer to the real system.
- as a result we need to enable HIL for other tests so that the sensors
  are not checked.
2019-08-19 10:54:56 +02:00
Beat Küng 878ed8136c commander: add 'commander arm -f' command to force arming
This allows to bypass preflight and prearm checks.
During development there are regular cases where I just want to arm the
board/vehicle no matter what, and the preflight checks are guaranteed to
fail (e.g. sensors uncalibrated, inconsistent, powered via USB, etc.).
Allowing an easy and quick way to arm (assuming you know what you are
doing) helps to speed up development considerably and is less frustrating.
2019-08-19 10:54:56 +02:00
Beat Küng b8dba34fd0 commander arming_state_transition: do not call prearm_check if !fRunPreArmChecks
Reason: if you don't want preflight checks, you don't want prearm checks
either (these are the circuit breakers, like usb connected check).

The other changes are cleanup and rework of operations.

In most cases, arming_state_transition is called with fRunPreArmChecks set
to true, so no change in behavior.

The cases with fRunPreArmChecks=false are:
- unit tests
- in_arming_grace_period=true (quick arming after disarm)
- VEHICLE_CMD_PREFLIGHT_CALIBRATION (does not transition to armed)
2019-08-19 10:54:56 +02:00
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