23861 Commits

Author SHA1 Message Date
Julian Oes
7ddf43b443 mavlink_ftp: fix tests on Nuttx
On Nuttx we have an additional check whether the directory is accessible
to check if we are trying to write to storage that is not on the SD
card. This returns the FileProtected error whereas on Linux this just
ends up being a FileNotFound.

The ifdefs around this issue are not pretty but the alternatives of
either removing the tests for /bogus folders, or removing the additional
check on the NuttX side don't seem better either.
2021-11-26 15:50:28 -05:00
Julian Oes
7c90b06628 mavlink_ftp: fix tests after implementation fix
In commit 462b5721721122c94bc7a3c43ae7f37c41ee625d the reading operation
on the PX4 side was changed to only read as many bytes as requested
rather than however many fit in the payload data.

This caused the unit tests to fail which this commit here aims to fix.

What is confusing about MAVLink FTP is that there is a size field which
generally signals how many bytes of the payload data are used/set.

However, in the case of a read requst, the size field is used to
indicate how many bytes should be read. The payload data is empty in
that case though.

This case was, from how I understand it, not implemented/tested in the
unit tests and now failed. In order to implement it I had to change a
few things:
- Change _setup_ftp_msg and _send_receive_msg so that the params contain
  a data length rather than the size field. The size field itself needs
  to be set outside of these methods using payload->size.
- Since we test files smaller, equal, and bigger than one payload data
  length, I implemented that we send multiple read requests until we
  have the whole file and not just the first part.
- Additionally, I saw a lot of uninitialized warnings in valgrind, and
  got rid of them by adding a few zero initializations.
2021-11-26 15:50:28 -05:00
Silvan Fuhrer
3a9eef658c Commander: remove preflight check for transition switch
This check enforced setting a VTOL transition switch if an RC as used on a VTOL.
It comes from a time when the only way to transtion was through the RC switch,
whereas now we have also a mavlink message in place for it, so enforcing it is
no longer needed.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-26 11:37:40 +01:00
Daniel Agar
fc1aaa58b2
sensors/vehicle_angular_velocity: fallback sensor selection improvements
- avoid unnecessary filter reset on parameter update
 - additional minor optimizations (precomputing dt inverse, etc)
 - moving filter reset check and dynamic notch filter update checks out of the update loops
     - this were necessary previously when the scale factor wasn't applied prior to filtering the otherwise raw data
2021-11-25 22:44:05 -05:00
PX4 BuildBot
2dffb04d61 Update submodule libevents to latest Fri Nov 26 00:39:17 UTC 2021
- libevents in PX4/Firmware (239f1c4eadc57f12b43b57d704bb80bc07a07841): 5fd19be22d
    - libevents current upstream: 6329c909a7
    - Changes: 5fd19be22d...6329c909a7

    6329c90 2021-11-16 Beat Küng - python: pylint fixes
6251f65 2021-11-16 Beat Küng - events_generated.h.jinja: add '_max' field to generated enums
2021-11-25 21:37:59 -05:00
PX4 BuildBot
ffc52cc2fc Update submodule mavlink to latest Fri Nov 26 00:39:19 UTC 2021
- mavlink in PX4/Firmware (2328402f99b8f8931e4148d033e0b9361407d485): 5309ba449a
    - mavlink current upstream: 28163a3b39
    - Changes: 5309ba449a...28163a3b39

    28163a3b 2021-11-25 Julian Oes - dev: add new message for component capability (#1724)
5534f76b 2021-11-24 olliw42 - adding some missing MAV_TYPEs (#1679)
2021-11-25 21:37:14 -05:00
David Sidrane
58a9bf0b2e sd_bench:Add verify and keep options 2021-11-25 13:11:45 -05:00
Thomas Stastny
8defbc8829 update correct airsp scale param string in ekf2 2021-11-25 11:01:04 -05:00
Matthias Grob
c5fb68b7a1 Commander: force disabling the arm stick gesture when arm switch is in use 2021-11-25 07:56:35 +01:00
David Sidrane
e76dda545c hardfault_log:Fix formatting 2021-11-24 15:00:38 -05:00
Sander Swart
462b572172 Fixed mavlink_ftp read
Instead of always reading the max data length, it now properly respects the requested amount of bytes (as per documentation)
2021-11-24 17:51:29 +01:00
Matthias Grob
ea3b99e964 navigator: Remove deprecated RangeRTL unit tests 2021-11-24 14:10:24 +01:00
Matthias Grob
c522a8b15a Compute RTL time and react if lower than flight time
- Compute RTL time also during RTL
- Calculate correct altitude when finding destination
2021-11-24 14:10:24 +01:00
Matthias Grob
5489005e0b Commander: call battery_status_check on update instead of early return 2021-11-24 14:10:24 +01:00
Jukka Laitinen
5dbbddb13f EKF2: Use _distance_sensor_subs vector directly
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-24 09:11:45 +01:00
Jukka Laitinen
d9498ade32 EKF2: Allocate distance sensor subscriptions as member variables
Just create the subscriptions and keep them, instead of
re-creating them continuously

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2021-11-24 09:11:45 +01:00
Beat Küng
312d84ca23 metadata: run json schema validation for actuators + parameter metadata 2021-11-23 12:40:22 -05:00
Beat Küng
2809dd8944 control_allocator: remove min/max/scale params 2021-11-23 12:40:22 -05:00
Beat Küng
b29d9db7f1 control_allocator: limit status publication rate to 200Hz
Reduces CPU load by ~3.5% on F4 @2khz.
And compute getAllocatedControl as needed (~1.5% CPU reduction)
2021-11-23 12:40:22 -05:00
Beat Küng
93a54ee63d metadata: fix generic param metadata generation
Adds the module.yaml params that was previously split into a separate file.
2021-11-23 12:40:22 -05:00
Beat Küng
bcba3dfe52 control_allocator,angular_velocity_controller: run on rate_ctrl wq 2021-11-23 12:40:22 -05:00
Beat Küng
a0e43bca96 msg: remove unused vehicle_actuator_setpoint topic 2021-11-23 12:40:22 -05:00
Beat Küng
52a2ef34fd mixer_module: add THR_MDL_FAC for SYS_CTRL_ALLOC=1 2021-11-23 12:40:22 -05:00
Beat Küng
357a16aca6 pwm_out_sim: split module.yaml into HIL+SIM files 2021-11-23 12:40:22 -05:00
Beat Küng
b94c5db55d component_information: add actuators json generation & CI deployment 2021-11-23 12:40:22 -05:00
Beat Küng
70b1b19902 uavcan: add configuration parameter to actuator metadata 2021-11-23 12:40:22 -05:00
Beat Küng
19b89e1d35 output_functions: add notes to camera trigger + capture & exclude from testing 2021-11-23 12:40:22 -05:00
Beat Küng
4346ac4a37 control_allocator: add mixer metadata 2021-11-23 12:40:22 -05:00
Beat Küng
282d35bbf0 esc_calibration: handle SYS_CTRL_ALLOC==1 2021-11-23 12:40:22 -05:00
Beat Küng
490a2cd7ae dshot: handle VEHICLE_CMD_CONFIGURE_ACTUATOR 2021-11-23 12:40:22 -05:00
Beat Küng
21699935e8 vehicle_command: add VEHICLE_CMD_ACTUATOR_TEST and VEHICLE_CMD_CONFIGURE_ACTUATOR 2021-11-23 12:40:22 -05:00
Beat Küng
6fdcc43ea8 mixer_module: add testing for SYS_CTRL_ALLOC=1 with actuator_test cmd+uorb msg 2021-11-23 12:40:22 -05:00
Beat Küng
36d9635518 output_functions.yaml: allow single-instance entry with 'start' but no 'count'
for other additional data
2021-11-23 12:40:22 -05:00
Beat Küng
5d6e785a4b mixer_module: remove unneeded test_motor_s force init 2021-11-23 12:40:22 -05:00
Beat Küng
f99c2617ad control_allocator: add module.yaml, add CA_MC_R_COUNT param & update defaults 2021-11-23 12:40:22 -05:00
Beat Küng
2ff6baa250 actuator params: use module_name as prefix to channel label 2021-11-23 12:40:22 -05:00
Matthias Grob
0153c870d2 Commander: make sure yaw airmode is not possible while arm gesture is enabled
It's unsafe to arm with the gesture when yaw airmode is enabled
because e.g. in Stabilized mode that results in a high yawrate setpoint
that the drone tries to follow even with zero thrust
because of the airmode.

It was handled before by checking the arm switch parameter because that
used to disable the stick arm gesture.
See 24dc316973a049e50d3e6760eddbf7250cb55d2e
2021-11-23 16:03:46 +01:00
Matthias Grob
572890f8c0 ManualControl: add parameter to disable arm/disarm stick gesture 2021-11-23 16:03:46 +01:00
Matthias Grob
468022abba ManualControl: correct arm hysteresis parameter name 2021-11-23 16:03:46 +01:00
Matthias Grob
c84b1c6566 ManualControl: ignore unassigned mode slots
They were resulting in a message
"Switching to Unkown is currently not available".
2021-11-23 16:03:46 +01:00
Silvan Fuhrer
e596607e2e minor comments update
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2021-11-23 14:48:51 +01:00
Daniel Agar
7ff72304b4
sensors/vehicle_imu: improve disabled sensor handling
- remove regular callback scheduling when sensor is disabled, register if re-enabled
2021-11-22 21:10:35 -05:00
Daniel Agar
1c6b1f7554 pwm_out: parameter failure error messages 2021-11-22 11:27:45 -05:00
Daniel Agar
577d926639 commander: improve angular velocity validity and message 2021-11-22 11:27:45 -05:00
PX4 BuildBot
88d9ade4d7 Update submodule mavlink to latest Mon Nov 22 12:39:21 UTC 2021
- mavlink in PX4/Firmware (0e4e8162407a12dc09c8d17635c60d4036b81bc7): c3a4b52eb1
    - mavlink current upstream: 5309ba449a
    - Changes: c3a4b52eb1...5309ba449a

    5309ba44 2021-11-18 Hamish Willee - Remove backticks - these do not render as a style so not helpful (#1745)
9cac0e5a 2021-11-17 David Jablonski - docs: catch more hyperlinks (#1744)
ea9349b5 2021-11-16 David Jablonski - common: add SET_FOCUS_TYPE_AUTO (#1741)
2021-11-22 09:08:50 -05:00
Daniel Agar
8fc3b05491 mavlink: param_get proper type to silence errors 2021-11-22 09:08:38 -05:00
Daniel Agar
cbb743c64d parameters: param type checking use PX4_ERR and enable in PX4_SITL 2021-11-22 09:08:25 -05:00
Igor Mišić
c73028bb1b iridiumsbd: discard all pending data for flow control enabled 2021-11-22 11:46:15 +01:00
wangwwno1
7a1a4ea7a6 Format fix & Remove redundant lines 2021-11-20 16:13:46 +01:00
wangwwno1
51ce8306ee Remove redundant code out of hil_lpos 2021-11-20 16:13:46 +01:00