12837 Commits

Author SHA1 Message Date
Beat Küng
4e0441ab0b logger: add data format version tag 2020-04-07 09:59:12 -04:00
Julien Lecoeur
7b12a21565
mavlink: Enable offboard attitude for coaxial airframes 2020-04-07 09:23:03 -04:00
Beat Küng
08bfeb3dc7 mavlink: fix potential busy loop upon USB disconnect
When disconnecting USB poll returns successfully, but the read returns
-1 with ENOTCONN.
In addition this also ensures there's no busy loop when poll returns an
error.

MAVLink continues to work after reconnecting USB.
2020-04-06 12:42:10 -04:00
Claudio Micheli
4cdc58ce8d EscBattery: only publish data if all the ESCs are online
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2020-04-06 15:56:54 +02:00
Julian Oes
c1884975ed esc_battery: several review fixes
Thanks @bkueng.
2020-04-06 15:56:54 +02:00
Julian Oes
ae219c3272 esc_battery: fix timeout check 2020-04-06 15:56:54 +02:00
Julian Oes
f650b91718 battery: check source param inside battery lib
This moves the handling of the BAT%d_SOURCE param inside of the battery
library. Users of the library now pass the source instead of the flag
whether to publish. The battery library then checks if the source is
selected using the param and publishes accordingly.

Since we removed the strange system_source flag, we now need to look at
all batteries in commander.
For current estimation - I think - it makes sense to sum them up.
2020-04-06 15:56:54 +02:00
Julian Oes
b01cdafcf6 boards: add esc_battery to build 2020-04-06 15:56:54 +02:00
Julian Oes
509b8b6b4b First skeleton for esc_battery module 2020-04-06 15:56:54 +02:00
Matthias Grob
ab6606aa46 PreFlightCheck: fix magnometer typo 2020-04-02 13:53:47 +02:00
RomanBapst
2522435f9c vtol_att_control: got rid of VT_B_DEC_SP
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-04-02 13:45:52 +03:00
Roman Bapst
47f0e91076 Apply suggestions from code review
Co-Authored-By: Mathieu Bresciani <brescianimathieu@gmail.com>
2020-04-02 13:45:52 +03:00
RomanBapst
005bc97959 tiltrotor: enable l1 and deceleration control during transition
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-04-02 13:45:52 +03:00
RomanBapst
a916cc2a26 better comments
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-04-02 13:45:52 +03:00
RomanBapst
0184d8196f vtol_type: calculate backtransition acceleration in forward direction
- use track angle to calculate the current forward acceleration

Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-04-02 13:45:52 +03:00
RomanBapst
47b5d51369 vtol_type: added explicit control over deceleration during backtransition
Signed-off-by: RomanBapst <bapstroman@gmail.com>
2020-04-02 13:45:52 +03:00
RomanBapst
b6a80253d7 run l1 during transition 2020-04-02 13:45:52 +03:00
Beat Küng
1f60a86d32 fix commander: need to copy all battery states in a cycle
Previously if in a cycle only a disconnected battery status updated, the
battery health state would switch to unhealthy during that time.

Fixes intermittent 'Arming denied! Check battery' preflight failures on
v5x with 1 power module connected.
2020-04-02 12:42:00 +02:00
Matthias Grob
70c28c7274 mc_pos_control_params: update MPC_POS_MODE description
- remove deprecated sport mode
- clarify wording
2020-04-02 11:52:44 +02:00
Daniel Agar
aa2f3a6624 sensors: complete move to uORB::Subscription 2020-04-01 16:17:14 -04:00
kamilritz
a70aa6349a ECL interface: output vector quantities by return-by-value 2020-04-01 11:47:39 +02:00
Hyon Lim
3bcd8c63f8
SMBus battery (a.k.a. smart battery) enhancement. (#14496)
* Enhancement: State of health, and max_error value is added. Both shows battery health of SMBUS smart battery.
 * Enhancement: BAT_C_MULT parameter is introduced. This is for high-current capable SMBUS-based battery.
As SMBUS only provides 16-bit for current, it could only be +-32768mA which is about +-32A.
But with proper treatment, it could be extended with little accuracy loss.
This factor can be set for individual battery system with available information.
    * Relative SOC introduced. Proper SMBUS battery should provide percentage of remaining battery
directly. Therefore it does not have to be computed like before.
    * State of Health introduced. Proper SMBUS battery should provide SOH value.
    * Max error: this shows estimation error of BMS.
 * Enhancement: With smart battery, precise estimation of time remaining is provided
with impedance track. It is unit of minute, so 60 seconds multiplied.
Update rate of this is not fast, but very useful.

Co-authored-by: Hyon Lim <lim@uvify.com>
2020-03-31 17:28:22 -04:00
Silvan Fuhrer
477092fa24 Fw pos control move to local pos: minimal changes to make it compile
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-03-31 15:03:23 +03:00
Daniel Agar
59a7262c31 FW use lpos 2020-03-31 15:03:23 +03:00
David Jablonski
d303b73bc3 respected reviewer comments 2020-03-31 09:23:52 +02:00
David Jablonski
12687f7d8f use memcpy instead of strncpy 2020-03-31 09:23:52 +02:00
David Jablonski
a0bf7425ae Implemented multipart status message 2020-03-31 09:23:52 +02:00
mohammad
531efc2d53
mavlink: add ACTUATOR_CONTROL_TARGET1 to stream list
- closes https://github.com/PX4/Firmware/issues/14369
2020-03-30 18:33:34 -04:00
TSC21
1f90a65265 update submodule micro-CDR 2020-03-30 20:02:35 +01:00
David Jablonski
536cd6cb1a allow DO_CONTROL_VIDEO in missions 2020-03-30 17:10:36 +02:00
David Jablonski
6bd191a24e Mavlink: Implemented SET_CAMERA_ZOOM 2020-03-30 17:10:36 +02:00
Matthias Grob
58fd3e2ddc PositionControl: fix horizontal integral anti-windup 2020-03-30 09:58:39 +02:00
Matthias Grob
91057fe024 FlighTasks: remove FlightTaskSport
This mode was just kept as an example after
its usage in a single case. It's basically untested
and doesn't make much sense anymore since it's
incompatible with the jerk limited trajectory
implementations. It's implementation only switched
hte configuration parameter of the velocity resulting
from maximum stick deflection to be
MPC_XY_VEL_MAX instead of MPC_VEL_MANUAL.
This is according to todays understanding undesired
because when hitting that limit the position
controller has no room for corrections anymore.

Also it saves some flash space on omnibus to remove
the task at this point and makes romm for the
acceleration feed-forward.
2020-03-30 09:58:39 +02:00
Matthias Grob
bc2579f3be mc_pos_control_params: lower jerk configuration
because of tighter tracking with acceleration feed-forward.
2020-03-30 09:58:39 +02:00
Matthias Grob
b3d7445059 PositionControl: acceleration based control strategy 2020-03-30 09:58:39 +02:00
Matthias Grob
1d2ac41edc ControlMath: adding limitTilt() helper function
which takes care of limiting the lilt angle of a "body" vector with
respect to a "world" vector. Both vectors have to be unit length!
2020-03-30 09:58:39 +02:00
Matthias Grob
aa53cabaa4 PositionControl: remove confusing uMin uMax alias 2020-03-30 09:58:39 +02:00
Matthias Grob
b8576cccc8 AttitudeControlTest: add scale testing for yaw weight 2020-03-28 17:51:59 +01:00
Matthias Grob
96bbc63eb1 AttitudeControl: let the user set yaw weight directly via parameter
instead of infering the yaw weight from the gains which can lead to
unexpected results depending on the particular vehicle tuning.
2020-03-28 17:51:59 +01:00
baumanta
22ceeccc26 add library for current- or thrust-based mag compensation 2020-03-26 08:00:30 +01:00
Hamish Willee
1288db9314 ekf2_params.c: EKF2_MAG_TYPE: Info about yaw without mag 2020-03-25 09:41:54 +01:00
bresch
1f4b2d1d53 Commander: replace deprecated warnx by PX4_WARN 2020-03-23 13:45:00 +01:00
bresch
c23ef0af4b Flight termination: lockdown if failure is detected on takeoff
During the first few seconds after takeoff, the failure detector is allowed to
trigger motor lockdown.
This is done for safety reasons to detect tipping-over or unstable
tuning gains
2020-03-23 13:45:00 +01:00
bresch
5babf644f0 MPC: limit tilt to maximum safe value of 89 degrees
The algorithm fails at 90 degrees due to tanf being INF
2020-03-23 13:36:23 +01:00
Daniel Agar
b73ec18abb
boards: add px4_fmu-v4 and px4_fmu-v5 optimized (-O3) build variants 2020-03-22 17:50:17 -04:00
bazooka joe
ad2d65df8d return with error from _log_request_list() in case of failed allocation 2020-03-21 16:50:46 +01:00
Nico van Duijn
240aad1aef mavlink_mission: beautify mission download error
This commit makes the IGN REQUEST LIST: Busy message more user-oriented
and actionable.
2020-03-20 12:54:00 +01:00
Nico van Duijn
849d3a1b54 mavlink_mission: robustify against dropped ack
This commit handles incoming MISSION_REQUEST_LIST messages such that
they are no longer ignored if the previously requested mission has
sent all mission items but the ack has never been received.

This was the cause for frequent "IGN REQUEST LIST: Busy" warnings
2020-03-20 12:54:00 +01:00
SalimTerryLi
dc8e775d8f
ADC: replace ioctl with uorb message (#14087) 2020-03-20 11:23:32 +01:00
Beat Küng
40af5b0fbe logger: fix initial subscribing to topics
write_all_add_logged_msg() requires at least some subscriptions to be added
initially, as this message is used to separate ULog header from data.
2020-03-20 11:21:32 +01:00