Commit Graph

249 Commits

Author SHA1 Message Date
ChristophTobler
0263ab8cd2 enable takeoff in gps denied areas and minor requested changes 2017-02-13 21:11:25 +01:00
ChristophTobler
1f7fdb2386 allow local position for takeoff (e.g. flow) 2017-02-13 21:11:25 +01:00
Daniel Agar
feda5caac2 commander state machine helper fix style and remove unused 2017-02-12 10:29:59 +01:00
Daniel Agar
d0b188f585 commander FW don't allow FOLLOW or OFFBOARD 2017-02-12 10:29:59 +01:00
Lorenz Meier
a92931fe84 Commander: Switch system off if in undervoltage condition and disarmed.
This is necessary to not have systems deep-discharge the battery while sitting idle. While at it we also deny arming in low battery conditions to ensure people who just landed with a low battery do not take off again and fail to get a successful RTL.
2017-02-04 21:06:21 +01:00
Daniel Agar
b33d49c77d state_machine_helper use static_assert 2017-02-01 22:15:50 -05:00
Daniel Agar
e927f3e040 clang-tidy modernize-use-nullptr 2017-02-01 22:15:50 -05:00
David Sidrane
1c3ebadb85 Removed unused defines AVIONICS_ERROR_VOLTAGE and AVIONICS_WARN_VOLTAGE 2017-01-21 11:45:36 +01:00
Anton Matosov
3a17c07b1e Implement RC and DL failsafe action handling for multirotors
Move RC and DL failsafe actions handling from navigator to commander (credits to @AndreasAntener)
Separate manual kill switch handling via manual_lockdown to prevent override and release of software lockdown by RC switch

Other changes:
Add failsafe tune
Fix LED blinking for Pixracer
Return back support for rc inputs in simulator but now it is configurable via cmake
2016-12-27 00:38:13 +01:00
Julian Oes
e3aecc0762 state_machine_helper: remove unused const var 2016-12-15 10:17:03 +01:00
Julian Oes
0b02a6e0f7 state_machine_helper: warn about offboard lost, not RC
When offboard input stops and we're in OFFBOARD mode, we should complain
about offboard being lost and not RC because we probably never even had RC.
2016-12-15 10:17:03 +01:00
Andreas Antener
e9737d6f7a Preflight checks: made sure pre-flight check results are always reported first thing on the console and always on new or re-established telemetry links AFTER waiting for the hotplug timeout
(leads to double publishing on the console when a new link is established, but this is the best compromise between fixing and completely restructuring)
2016-12-02 22:56:48 +01:00
Andreas Antener
f772fc2d02 Airspeed: preflight check for bad offset, fixed calls to preflight checks (vtol & airspeed) 2016-12-02 22:56:48 +01:00
James Goppert
dbd94907c4 Only send failsafe info messages on state change. 2016-10-13 01:57:00 -04:00
James Goppert
43b665ae01 Fix gps circuit breaker logic in state machine. 2016-10-12 23:07:26 -05:00
Beat Küng
ce0d31b7d9 mavlink log: ensure all critical & emergency msgs are also logged to console & ulog
Critical messages that the user sees should also go to the log file, so
that the exact error (with time) can later be analyzed from the log file.
2016-09-30 13:50:51 +02:00
Sander Smeets
c4eabbd083 VTOL transition switch parameter checking (#5545)
* VTOL transition switch parameter checking

* Code style
2016-09-26 10:18:23 +02:00
lovettchris
11f8da5fc6 AUTO_LOITER respect disabled RC link loss param (#5499) 2016-09-23 18:14:32 -04:00
sander
bc7178c538 Allow mission with active DL and DLL failsafe off 2016-08-05 10:19:06 +02:00
sander
e8a87538b8 Code style 2016-08-05 10:19:06 +02:00
sander
95e80cc29b Only RTL when mission finishes mid air on DL Lost 2016-08-05 10:19:06 +02:00
Daniel Agar
99aa5f49fc FW ALTCTL requires altitude 2016-07-29 13:48:21 +02:00
Daniel Agar
6aa935fed6 FW don't allow ACRO or RATTITUDE 2016-07-29 13:48:21 +02:00
Beat Küng
7b52eced66 commander: write timestamp of commander_state topic on init and state change 2016-07-19 09:21:35 +02:00
Julian Oes
87e964ec10 commander: POSCTL with localpos for MC
Fixedwings need a global position estimate for POSCTL.
2016-07-15 14:43:36 +01:00
Julian Oes
f430c39f5b commander: allow POSCTL with local position
We want to allow flying POSCTL with optical flow only without GPS.
2016-07-15 14:43:36 +01:00
Julian Oes
314ee6b7e0 commander: remove some if confusion
This is a try to simplify the if statements a bit. Also, a check of
new_arming_state which was impossible, is removed.
2016-07-13 10:10:45 +02:00
Julian Oes
91127d51c0 commander: stay in failsafe even when landed
If the failsafe state is ended when landed, we would switch back to
POSCTL and therefore take off again, however, all we want is stay on
ground and wait for the auto disarm.
2016-06-21 10:21:34 +02:00
dong.chen
5ad671ed4c Solve the problem When lost rc signal, it will rtl repeated. 2016-06-21 10:21:34 +02:00
Julian Oes
c7ec07be70 commander: properly use new param
The param COM_ARM_WO_GPS is set to 1 by default to allow arming without
GPS. This then sets a bool arm_without_gps which translates to
!GNSS_check in preflightCheck.
2016-06-21 10:21:34 +02:00
Julian Oes
f67e74935e commander: remove leftover printf 2016-06-21 10:21:34 +02:00
Julian Oes
ef04085ac5 commander: go to ALTCTL if GPS is lost in POSCTL
Previously, we renained in POSCTL and would drift away if GPS was lost.
2016-06-21 10:21:34 +02:00
Julian Oes
d0355cef1f Revert "commander/navigator: remove param NAV_RCL_ACT"
This reverts commit 77ea4cebf41cd106fe771b9eb469aa2326339467.
2016-06-21 10:21:34 +02:00
Julian Oes
016d514d80 commander/navigator: remove param NAV_RCL_ACT
The param NAV_RCL_ACT was not implemented as described. Also, it has the
completely the wrong name. It should be a COM param and not NAV.
Therefore, remove the param and delete the partly implemented
and probably never used functionality.
2016-06-21 10:21:34 +02:00
Julian Oes
fe29d99d62 commander: use the gps_failure flag
The gps_failure flag had been ignored in some navigation states.
2016-06-21 10:21:34 +02:00
Julian Oes
4d10759699 commander: use DESCEND mode and not LANDGPSFAIL
Always use the DESCEND mode and not LANDGPSFAIL because LANDGPSFAIL will
try to loiter for some time and then request termination instead of
descending gently and trying to land.
2016-06-21 10:21:34 +02:00
Andreas Antener
095997ca59 changed order of arguments for readability 2016-06-20 19:03:10 +02:00
Andreas Antener
ced8376268 added offboard lost actions with additional timeout 2016-06-20 19:03:09 +02:00
Daniel Agar
4ab8ddec53 rename cb_usb -> circuit_breaker_engaged_usb_check 2016-06-15 20:35:16 +02:00
Lorenz Meier
7398164fcc Updated PX4 use / API of low level GPIO and other hardware-centric system facilities 2016-05-28 14:56:17 +02:00
Daniel Agar
51298c1eb1 remove unused 2016-05-13 13:01:42 +02:00
Daniel Agar
008354f935 testing cleanup 2016-05-13 13:01:41 +02:00
Lorenz Meier
55d18949bc Commander: support finer granularity of data llink loss and RC loss actions 2016-04-25 08:44:51 +02:00
Julian Oes
c9ac9c7dbd commander: fixes after rebase 2016-04-11 18:01:49 +02:00
Julian Oes
3c9f9540dc commander: add failsafe flag back in 2016-04-11 18:01:49 +02:00
Julian Oes
974223bdd1 commander: pass battery status to preflight check
A low battery check was recently added to the preflight check, therefore
we need to pass on the information about the battery.
2016-04-11 18:01:49 +02:00
Julian Oes
e91f587438 commander; various compile fixes after rebase 2016-04-11 18:01:49 +02:00
Julian Oes
5ca5af5fcd commander: take main_state out of vehicle_status
This state is only commander internal. Therefore it doesn't need to be
in vehicle_status. Instead it is now in the commander_state message.
2016-04-11 18:01:48 +02:00
Julian Oes
70cff975cc commander: move some flags out of vehicle_status
All the removed flags were not used anywhere else than inside the
commander.
2016-04-11 18:01:48 +02:00
Julian Oes
23df992cc5 commander: moved offboard bools into status_flags
The offboard status bools were not used anywhere but in the commander.
Therefore they are now moved to the local status_flags topic.
2016-04-11 18:01:48 +02:00