1272 Commits

Author SHA1 Message Date
Julian Oes
fa614a3cc1 RPi: just use RPI instead of RPI2.
The reason for this change is that RPi2 and RPi3 are compatible, and
hopefully all differences coming up can be resolved without ifdefs but
at runtime.
2016-07-16 15:51:00 +01: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
Beat Küng
4a199c1360 gyro calibration: avoid double initialization of gyro_scale data
They're initialized in do_gyro_calibration already
2016-07-14 14:17:38 +02:00
Julian Oes
f1b8bed5df gyro_calibration: set scale to 1 instead of 0 2016-07-14 13:13:56 +02: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
631ce1fc55 commander: proper arguments for preflight check 2016-07-13 10:10:45 +02:00
tumbili
71e2a43790 consider scale parameters in rc calibration code 2016-07-13 09:29:12 +02:00
Daniel Agar
59b4350aa0 implement MAV_CMD_NAV_LOITER_TO_ALT and general mission cleanup 2016-07-12 23:36:05 +02:00
Miguel Arroyo
3c11c0d8d8 Adds Calibration Support for RPi2 and Navio2 (#4999) 2016-07-07 22:38:17 +02:00
Beat Küng
9c73eae941 sensor_combined: replace accel & gyro integral with value, use float for dt
Reason: the value is easier to read & handle (for example plotting). In
most places the value is needed, not the integral.

Note that this breaks the replay format for sdlog2 replay
2016-07-07 11:35:50 +02:00
Beat Küng
8e136779ec stack sizes: reduce stack sizes for modules that use sensor_combined
The sensor_combined topic got reduced from ~780 bytes to 72 bytes.
2016-07-07 11:35:50 +02:00
Beat Küng
c5ea4b43be sensor_combined.msg: make timestamps relative
This is needed for the new logger & saves some space as well.
2016-07-07 11:35:50 +02:00
Beat Küng
d846ad5dac sensors: move voting into sensors module
- voting is now at a central place instead of duplicated within the
  estimators
  -> this also means that estimators that did not do voting so far,
     now have voting, like ekf2
- estimators requiring more than that can still subscribe to the raw
  sensors
- allows sensors_combined to be 3 times smaller
  - reduces logger, memcpy (cache) & RAM overhead
- all modules requiring only 1 or 2 sensor values now automatically get
  the voted result
- this also adds voting to baro
2016-07-07 11:35:50 +02:00
Beat Küng
b4ecc5a8d9 sensor_combined cleanup: remove many unneeded fields
Decreases the message size from 780 to 280 bytes.
In particular, all modules using sensor_combined must use the integral now.
The sensor value can easily be reconstructed by dividing with dt.

Voters now need to be moved into sensors module, because error count and
priority is removed from the topic.

Any module that requires additional data from a sensor can subscribe to
the raw sensor topics.

At two places, values are set to zero instead of subscribing to the raw
sensors (with the assumption that no one reads them):
- mavlink mavlink_highres_imu_t::abs_pressure
- sdlog2: sensor temperatures
2016-07-07 11:35:50 +02:00
Beat Küng
ddc4d70d51 airspeed_calibration: remove unused include 2016-07-07 11:35:50 +02:00
Hidenori
76ee17e532 RC input and PWM output for Navio2 2016-07-01 23:08:17 +02:00
Lorenz Meier
82b2fa5ecb Commander should not depend on MAVLink 2016-07-01 18:04:09 +02:00
Lorenz Meier
2214e7c202 Commander: Remove annoying GPS fix regained warning 2016-06-30 16:59:17 +02:00
Daniel Agar
377726a9a7 sitl gazebo plane fix land detector startup order (#4932) 2016-06-30 13:56:06 +02:00
Beat Küng
8a12dee125 cmake: remove all module.mk files & cmake conversion script (#4918)
It seems these files are leftovers.
2016-06-28 09:26:36 +02:00
Beat Küng
89f5bd27e8 vehicle_gps_position: use timestamp field instead of timestamp_position
timestamp was unused. This allows to remove timestamp_position.
2016-06-24 00:22:01 +02:00
Lorenz Meier
56ddd29f1a Commander: Update params on last step of mag cal 2016-06-22 16:03:01 +02:00
Lorenz Meier
1869ffd15f Fix unknown command message for Spektrum bind 2016-06-21 13:36:35 +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
67a4a57491 commander: only warn if termination happens
The termination warnings were printed even if termination was not
actually enabled. This was confusing and is therefore fixed.
2016-06-21 10:21:34 +02:00
Julian Oes
872b08f677 commander: remove unneeded include 2016-06-21 10:21:34 +02:00
Julian Oes
fdff6ea325 Revert "commander: remove unused/wrong failsafe handling"
This reverts commit 9e704a5e121c7516e2133d02b328500d9d66fb67.
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
049146ef9c commander: param to allow arming without GPS 2016-06-21 10:21:34 +02:00
Julian Oes
3e9d1388af commander: remove unused/wrong failsafe handling
The deleted code conflicts with the failsafe handling in set_nav_state.
Also, flight termination was usually disabled by circuit breaker which
means this code had no effect anyway.
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
Henry Zhang
178f32ab41 Commander:fill missing command ack. (#4814) 2016-06-21 10:20:33 +02:00
Andreas Antener
d1b27ab056 moved params NAV_OBL to COM_OBL 2016-06-20 19:23:11 +02:00
Andreas Antener
8727295f8e fix OBL parameters in commander 2016-06-20 19:03:10 +02:00
Andreas Antener
095997ca59 changed order of arguments for readability 2016-06-20 19:03:10 +02:00
Andreas Antener
fedb9de6ef fixed offboard loss timing handling 2016-06-20 19:03:09 +02:00
Andreas Antener
ced8376268 added offboard lost actions with additional timeout 2016-06-20 19:03:09 +02:00
Lorenz Meier
9230688f54 Commander: Add transition command 2016-06-17 22:44:42 +02:00
Daniel Agar
64d9b8eefd fix COM_FLTMODE5 metadata typo 2016-06-15 20:35:16 +02:00
Daniel Agar
4ab8ddec53 rename cb_usb -> circuit_breaker_engaged_usb_check 2016-06-15 20:35:16 +02:00
Daniel Agar
c22a9137dd commander cleanup headers 2016-06-15 20:35:16 +02:00
Daniel Agar
7bbfa5d94b cleanup px4_custom_mode 2016-06-15 20:35:16 +02:00
Julian Oes
6898e2dcf4 commander: don't shout please 2016-06-07 22:10:56 +02:00