877 Commits

Author SHA1 Message Date
Andreas Daniel Antener
18293875b7 Old style switches: changed the loiter switch to have priorit over main switch (#6764) 2017-04-16 10:10:31 -04:00
Sander Smeets
128f726cd9 Add paramter to enable rc stick override 2017-04-14 10:01:36 +02:00
Mohammed Kabir
7fcb3b4f93 camera_trigger : add support for sending ACKs for trigger commands 2017-04-13 20:21:40 +02:00
Lorenz Meier
08cf97c687 Commander: indicate failsafe reasons more clearly 2017-04-09 12:40:34 +02:00
Beat Küng
43afb8d41e sensor calibration: remove param_save_default() calls 2017-04-06 11:49:03 +02:00
Beat Küng
7c43689ddc commander: remove param autosave 2017-04-06 11:49:03 +02:00
Henry Zhang
982fe91fa8 Commander: fix LED status bug when system is armed 2017-04-01 11:39:05 +02:00
Lorenz Meier
10dcb90d52 Commander: Store last manual stick setpoints only when actually in manual control mode 2017-03-13 21:08:17 +01:00
Lorenz Meier
1a3317ebab Commander: Do not abort low battery handling due to stick motion. 2017-03-13 08:42:51 +01:00
Beat Küng
95e8e26ae0 commander: use led_control uorb topic 2017-03-12 00:08:35 +01:00
Beat Küng
b0439836f6 refactor drv_led.h: rename to drv_board_led.h
This makes it clear that it's used to control the board LED's, not external
LED's.
2017-03-12 00:08:35 +01:00
Julian Oes
404719953c commander: fix abs bug / trigger POSCTL both ways
The check if stick were touched was only working in one direction (per
axis) because fabsf was used incorrectly.

However, this check is still only a differential check triggered by
fast movement and does not trigger if someone slowly moves a stick to
the side. Also, the sensitivity depends on the rate of the commander
loop and/or the RC update loop. The correct solution would be a proper
filtering and trigger for movement.
2017-03-11 22:41:23 +01:00
Beat Küng
54c8e3b26b commander: fix excessive orb_advertise calls for vehicle_status_flags
vehicle_status_flags_pub passed to publish_status_flags() was always null,
thus orb_advertise() was called each time.

Note that it did not produce a memory leak.
2017-03-04 17:44:47 +08:00
Lorenz Meier
16530e15db Commander: Differentiate between emergency battery level and critical battery level 2017-02-27 09:03:20 +01:00
Beat Küng
058bc97c83 commander preflight calibration: accept param6 == 2 for airspeed calibration as well
This is according to the updated mavlink spec to deconflict the definition
with APM.
2017-02-24 08:24:53 +01:00
Lorenz Meier
7fc8ee85fa Commander: Do not break out of RTL on stick input change 2017-02-21 13:56:31 +01:00
Andreas Antener
44d05bac55 Rattitude: enable for FW in old style switch mapping 2017-02-18 08:03:19 +01:00
Daniel Agar
e81e6a8296 fw_att_control add rattitude mode 2017-02-18 08:03:19 +01:00
Andreas Antener
a5f3f65c2b Switch assignment: added manual and stabilized switch for a default stabilized switch scheme, let FW go into Acro 2017-02-18 08:03:19 +01:00
Beat Küng
1a81b64d49 VEHICLE_CMD_PREFLIGHT_CALIBRATION: update temperature_calibration param definition 2017-02-17 23:01:25 +01:00
José Roberto de Souza
172e218dbd Commander: Use leds to show PX4 status on AeroFC 2017-02-17 09:13:33 +01:00
Lorenz Meier
798a7ed8cd Commander: Fall back to GPS enabled modes once GPS becomes available 2017-02-17 09:13:13 +01:00
Lorenz Meier
070a73ad63 Commander: Switch into right mode in various corner conditions
* If you move in LAND, AUTO or HOLD the sticks the system will give control back to the pilot
  * If you do not connect any RC the system will default to HOLD and will allow you tablet control
  * If you gain position lock for the first time the system will re-evaluate the mode switch (so if you dropped down to alt hold it will now go into position)
  * If the system breaches the Geofence it will now always drop back to POSCTRL if the sticks are moved
2017-02-17 09:13:13 +01:00
Lorenz Meier
081c40c6fa Commander: Fix level cal command 2017-02-15 22:16:20 +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
Simone Guscetti
b182a5eeca Added the vehicle_status_flags publisher with the conversion in a bit field in commander 2017-02-04 21:13:59 +01:00
Lorenz Meier
bf448fce71 Commander: Update call for new power management interface 2017-02-04 21:06:21 +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
Simone Guscetti
fe53e3a0d5 commander: add status_changed when battery is low 2017-02-03 13:53:51 +01:00
Beat Küng
b6f3cf9425 events: refactor temperature_calibration command to take options and use a single vehicle_command
This makes it easier to start calibration for all sensors at once.
2017-02-02 23:54:06 +01:00
Daniel Agar
e927f3e040 clang-tidy modernize-use-nullptr 2017-02-01 22:15:50 -05:00
Beat Küng
c1e2aeff0b commander: ignore PREFLIGHT_CALIBRATION for temperature calibration param 2017-01-25 22:43:29 +01:00
Julian Oes
4ceba407f2 commander: raise stack size
A stack usage of 3000 bytes was observed, therefore it's safer to raise
the commander's stack size by 400 bytes.
2017-01-21 16:04:43 +01:00
Chris Lovett
33a307873a Enable rc mode change switch to override offboard mode. This is a safety feature, in case offboard control goes crazy, user can always regain control by switching modes to stabilize, or alt hold or position hold, however they have configured the mode change RC switch. 2017-01-18 18:15:58 +01:00
Beat Küng
48c5ec54bb commander: make sure all code paths return an (n)ack to MAV_CMD_PREFLIGHT_CALIBRATION 2017-01-11 16:25:04 +01:00
Lorenz Meier
8416505a67 Commander: Header cleanup 2016-12-27 21:00:51 +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
Lorenz Meier
5d7d26531c Commander: Acknowledge pair commands 2016-12-23 17:40:11 +01:00
Beat Küng
db2efa79da fix commander: remove unused variable rtl_on 2016-12-21 14:09:41 +01:00
Lorenz Meier
9ae2376d1c Commander: Indicate overload on the ground only if not transient. Adjust max CPU load to 80%. Indicate overload in air immediatley 2016-12-21 11:44:47 +01:00
Matthias Grob
0dbdde3404 Arming: made flags more understandable, added error message for rejected disarm 2016-12-20 09:46:36 +01:00
Matthias Grob
f6282f5b3d Arm button fix: include the arm switch into the structure of all the checks for RC arming 2016-12-20 09:46:36 +01:00
Matthias Grob
94c8371ffe Arm button fix: toggle arming state only once per arm button press 2016-12-20 09:46:36 +01:00
Matthias Grob
8a75827d6a fixed all comments of arm button review 2016-12-20 09:46:36 +01:00
Matthias Grob
aa984edd90 added an rc switch for arming and disarming with the option to use it as a button 2016-12-20 09:46:36 +01:00
Lorenz Meier
4b0647d9c0 Condition the GPS check always on the commander GPS prearm check param (#6055) 2016-12-14 15:30:24 +01:00
Julian Oes
adc9ed61b8 commander: ignore arm/disarm in DO_SET_MODE cmd
According to https://github.com/mavlink/mavlink/pull/629 the mavlink
command DO_SET_MODE should only determine the mode but not the
armed/disarmed state, so the MAV_MODE_FLAG_SAFETY_ARMED bit should be
ignored.
Instead the mavlink command COMPONENT_ARM_DISARM should be used instead.

Therefore, the commander now ignores the arm/disarm bit.
2016-12-11 17:00:09 +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
c069264752 Preflight check: initialize VTOL flag before it is used 2016-12-02 22:56:48 +01:00