Commit Graph

29966 Commits

Author SHA1 Message Date
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 f9f2afd856
add .gitattributes to force all line endings to LF
- this improves the windows development experience when moving between cygwin, WSL, and native tools
 - cmd and bat files are left alone (we don't currently have any)
2019-08-18 14:13:26 -04:00
Daniel Agar 646519fa0d vscode disable selection drag and drop 2019-08-18 12:59:03 -04:00
Daniel Agar 24041370c0 vscode github pull request default merge method squash 2019-08-18 12:59:03 -04:00
Daniel Agar 3c33962e78 vscode disable telemetry and experiments 2019-08-18 12:59:03 -04:00
Daniel Agar 404984c355 vscode settings sort git ignoreLimitWarning 2019-08-18 12:59:03 -04:00
Daniel Agar 929b48099e vscode files watcher exclude build folder 2019-08-18 12:59:03 -04:00
Daniel Agar 6515c11048 vscode make astyle default formatter 2019-08-18 12:59:03 -04:00
Daniel Agar f3aba02654 vscode recommended extensions update docker and ros 2019-08-17 20:12:34 -04:00
Daniel Agar 24764c676e Jenkins hardware run logger and attempt to stop modules 2019-08-17 13:43:10 -04:00
Daniel Agar 67644e29b7 Jenkins hardware print AUX pwm info 2019-08-17 13:43:10 -04:00
Daniel Agar b9fc3ed2ab Jenkins hardware select airframe 4001 on fmu-v4 2019-08-17 13:43:10 -04:00
Daniel Agar 17c46623f9 Jenkins hardware default airframe 4001 -> 13000 (run all controllers) 2019-08-17 11:03:26 -04:00
Daniel Agar b8cdec65cc Jenkins hardware target general px4_fmu-v5 2019-08-17 11:03:26 -04:00
Daniel Agar 7adc43b795
px4_fmu-v5: add critical section monitor build (#12724) 2019-08-16 21:48:09 -04:00
Daniel Agar acc7067596 Jenkins hardware run adc test 2019-08-16 19:05:55 -04:00
Daniel Agar 76b9198522 kinetis/adc move to new WQ 2019-08-16 19:05:55 -04:00
Daniel Agar 746f13d2d4 stm32/adc move to new WQ 2019-08-16 19:05:55 -04:00
Daniel Agar 6e7e2b6e3b
px4_fmu-v5: add irqmonitor build (#12723) 2019-08-16 19:01:16 -04:00
fghanei b28dda3926 rpi_rc_in: fix typo that was causing build to fail rpi 2019-08-16 15:52:49 -04:00
Daniel Agar 48f5ab2896
Update submodule mavlink v2.0 to latest Fri Aug 16 12:37:56 UTC 2019 (#12717)
- mavlink v2.0 in PX4/Firmware (be3d09c700): 0385f82286
    - mavlink v2.0 current upstream: dc26ccd71d
    - Changes: 0385f82286...dc26ccd71d

    dc26ccd 2019-08-15 PX4BuildBot - autogenerated headers for rev e5597b68bd
2019-08-16 14:20:45 -04:00
Daniel Agar dacaabe92e
introduce sensor_gyro_control message for vehicle_angular_velocity (#12145) 2019-08-16 13:53:59 -04:00
Daniele Pettenuzzo be3d09c700 uavcan: add optical flow support (Here Flow)
* move uavcan dsdlc generation to module
 * 20200.Measurement.uavcan sync with upstream project (https://github.com/OpenMotorDrive/flow/blob/master/dsdl/com/hex/equipment/flow/20200.Measurement.uavcan)

Signed-off-by: DanielePettenuzzo <daniele@px4.io>
2019-08-15 12:22:29 -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
Daniele Pettenuzzo 82ecf4d942 motor_ramp: set fmu in test mode and cleanup (#11249)
and restore pwm min after test
2019-08-15 09:42:07 +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
Daniel Agar b7f0db62ba
mRo Control Zero F7 initial board support 2019-08-14 13:13:27 -04:00
Beat Küng 5cadb0aab1 px_mkfw: add git commit hash to .px4 file 2019-08-14 12:37:20 -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 4eb9c7d812 Create TrajMath library and move waypoint speed calculations in it 2019-08-09 12:04:48 +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
bresch de10f1e04d MC auto - Modify yaw_sp_aligned to take mis_yaw_error tolerance.
Add check for this flag in AutoLine
2019-08-09 12:04:48 +02:00
Dennis Mannhart 9e9b2ab9e8 FlightTaskAutoLine/SmoothVel: stop at waypoint if altitude is has not been reached yet 2019-08-09 12:04:48 +02:00
bresch 255c911155 AutoSmoothVel - Compute desired speed at target based on angle between previous-current and current-next waypoints
Also remove crosstrack P controller that produces overshoots when the
acceptance radius is large (crosstrack error is suddenly large at
waypoint switch).
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