Commit Graph

31663 Commits

Author SHA1 Message Date
Beat Küng 116a094e31 commander: fix broken 'commander arm/disarm' CLI
Regression from https://github.com/PX4/Firmware/pull/13613.

VEHICLE_CMD_COMPONENT_ARM_DISARM from CLI would enter the
ARMING_STATE_IN_AIR_RESTORE logic. This was never intended for disarming
(and leads to state machine transition failures), and IMO it is also not
intended for commands from CLI.
2020-02-20 10:06:07 -05:00
Julian Oes 20276d4ff8 simulator: improve misleading TCP message
Proposed first by @lovettchris.
2020-02-20 12:10:43 +01:00
Julian Oes e46635b1de simulator: remove strange disarmed PWM
Before that we would send -0.1 instead of just 0.0.

First proposed by @lovettchris.
2020-02-20 12:10:43 +01:00
Julian Oes a006d82abf simulator: add flag to indicate lockstep
This depends on:
https://github.com/mavlink/mavlink/pull/1311

First proposed by @lovettchris.
2020-02-20 12:10:43 +01:00
Beat Küng ef1f677541 fix mavlink_log_handler: close file descriptor if still open in destructor 2020-02-20 10:31:41 +01:00
Julian Oes e7c655ba52 rc_update: make specific RC loss check only on PPM
This makes the check more specific, so it's only active on PPM input.
2020-02-20 09:02:30 +01:00
bozkurthan 3f16eba3f7 RC Failsafe fix for RFD 868+/900 Modems
RC Failsafe isn't triggered when PPM signal is valid. These changes
update Failsafe trigger logic for RC input. RF Modules keep sending
valid PPM signal when the RC Transmitter is lost.
RF Modules which are in the air send PPM signal with same type when lost
the signal from ground.
2020-02-20 09:02:30 +01:00
Nicolas de Palezieux a570aa9fac Commander: fix preflight check condition to fail if not in HIL mode 2020-02-20 08:46:30 +01:00
Daniel Agar ffc3373492
invensense icm20689 improvements
- checked register mechanism and simple watchdog
   - driver checks for errors gradually and can reconfigure itself
 - respect IMU_GYRO_RATEMAX at the driver level
 - fixed sensor INT16_MIN and INT16_MAX handling (y & z axis are flipped before publishing)
2020-02-19 19:01:41 -05:00
JaeyoungLim 01b280f7ae Limit the number of vehicles 2020-02-19 14:23:17 +01:00
JaeyoungLim c89766c8ab Fix gcs udp port to support more vehicles in multivehicle sitl
Limit remote udp port to 14549


Fix


Cleanup port handling


Fix bash syntax


Fix
2020-02-19 14:23:17 +01:00
Daniel Agar 1d226ad2ca invensense icm20608g improvements
- checked register mechanism and simple watchdog
  - driver checks for errors gradually and can reconfigure itself
 - respect IMU_GYRO_RATEMAX at the driver level
 - fixed sensor INT16_MIN and INT16_MAX handling (y & z axis are flipped before publishing)
2020-02-18 22:48:32 -05:00
Daniel Agar 89d4d6e4a9 invensense mpu9250 improvements
- checked register mechanism and simple watchdog
    - driver checks for errors gradually and can reconfigure itself
 - respect IMU_GYRO_RATEMAX at the driver level
 - fixed sensor INT16_MIN and INT16_MAX handling (y & z axis are flipped before publishing)
2020-02-18 19:21:20 -05:00
Daniel Agar 22499effb9 invensense icm20602 improvements
- checked register mechanism and simple watchdog
    - driver checks for errors gradually and can reconfigure itself
 - respect IMU_GYRO_RATEMAX at the driver level
 - fixed sensor INT16_MIN and INT16_MAX handling (y & z axis are flipped before publishing)
 - increased sensor_gyro_fifo max size (enables running the driver much slower, but still transferring all raw data)
 - PX4Accelerometer/PX4Gyroscope remove unnecessary memsets
2020-02-18 19:21:20 -05:00
Daniel Agar 40921241e7
Update submodule mavlink v2.0 to latest Tue Feb 18 12:38:11 UTC 2020
- mavlink v2.0 in PX4/Firmware (396c1080e40bd84a2e1381f666041f7d147b718b): 1847cbbff5
    - mavlink v2.0 current upstream: a66fd2081d
    - Changes: 1847cbbff5...a66fd2081d

Co-authored-by: PX4 Build Bot <bot@px4.io>
2020-02-18 18:26:46 -05:00
Julian Oes cf47c2155f
platforms: prevent stackoverflow for ekf2 sideslip
It turns out that ekf2 needs more stack when sideslip fusion fails.
Sideslip fusion is currently only enabled for fixedwing by default and
not executed in testing.
2020-02-18 16:42:16 -05:00
JaeyoungLim 7a1464d992
Revert port change (#14177)
Reverts #14126 and #14176 until CI failures can be resolved
2020-02-18 14:56:04 +01:00
Julian Kent e7aa899746 AutoLineSmoothVel: don't use _velocity_setpoint for constraints
Unfortunately the constraints cannot be implemented using the
_constraints because the controller uses that directly. This
causes discontinuities in the velocity and/or accel at various
points of the flight. In particular this was used in Takeoff.

Instead this was done by changing target accel/velocity in the
jerk-optimal velocity planner for Z.
2020-02-18 13:59:58 +01:00
JaeyoungLim b365fbf1e9 Fix bash syntax 2020-02-18 13:55:24 +01:00
JaeyoungLim 30cc3a1243 Cleanup port handling 2020-02-18 13:06:46 +01:00
JaeyoungLim fc61d1c43d Limit remote udp port to 14549
Fix
2020-02-18 13:06:46 +01:00
JaeyoungLim 2bcd8490ff Fix gcs udp port to support more vehicles in multivehicle sitl 2020-02-18 13:06:46 +01:00
Morten Fyhn Amundsen 86bf4b2289 FlightTaskManualAltitude: Fix sign error in terrain hold setpoint reset
The modified statements are intended to

1. Set a new Z position setpoint that is equivalent to the current distance
to ground setpoint,

and

2. Set a new distance to ground setpoint that is equivalent to the current Z
position setpoint.

They are only called in terrain hold mode, when activating/deactivating the
holding (typically when coming to a stop and when starting to move again).

The setpoints take the current control error into account, but because the
control error is added, not subtracted, the result is that the new setpoint
is 2 times the control error off from the old setpoint, instead of being
at the same spot as the old setpoint.
2020-02-17 15:18:04 +01:00
Daniel Agar d7c3e1066a
uavcannode updates and px4_fmu-v4_cannode example
- drivers/uavcannode add baro, mag, gps publications
 - delete old px4_cannode-v1 board
 - add stripped down simple rcS for CAN nodes
2020-02-16 12:11:54 -05:00
Silvan Fuhrer 342e0da796 VTOL land detector: extend fall_detection from multicopter land detector and disable in fixed-wing mode
Extend the get_freefall_state() from MC land detector to have a VTOL-specific
one that just enables free fall detection if in rotary wing or transition mode.
This is done to prevent wrong free-fall detected warnings while doing low-G maneuvers
(parabolic flights). Land detection is anyway disabled in FW flight for VTOL so
no logic change.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-02-14 17:46:30 +03:00
Silvan Fuhrer dad9c154a3 VTOL Land Detector: move to airspeed_validated
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
2020-02-14 17:46:30 +03:00
Julian Oes 9a96ca14be Tools: make Python import error more readable
The problem with printing the exception was that starting with
Python 3.6 the ImportError is yet another (sub) exception called
ModuleNotFoundError which can't be printed as a string and then triggers
another exception:

```
Traceback (most recent call last):
  File "/home/julianoes/src/Firmware/Tools/serial/generate_config.py", line 11, in <module>
    import jinja2
ModuleNotFoundError: No module named 'jinja2'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/julianoes/src/Firmware/Tools/serial/generate_config.py", line 13, in <module>
    print("Failed to import jinja2: " + e)
TypeError: must be str, not ModuleNotFoundError
```

As per @bkueng's suggestion the easiest is to cast the exception to str
and that way prevent the second exception.
2020-02-14 11:40:05 +01:00
Nuno Marques 7cafbc824e
simulator: add support for multi-distance_sensor instances (#14143)
* simulator: add support for multi-distance_sensor instances

* update submodule Tools/sitl_gazebo

* sitl_gazebo: add updated iris_obs_avoid; simulator: cleanup distance_sensor topic init

* update submodule Tools/sitl_gazebo

* simulator: delete _dist_pubs uORB::PublicationMulti<distance_sensor_s> in simulator destructor
2020-02-14 11:32:28 +01:00
Julian Oes abd2bb4eb7 cmake: fix Python 3 libs name
This was just wrong. `devel` might be correct on Fedora but no on Ubuntu
:).
2020-02-13 09:20:26 -05:00
Nico van Duijn 55372d7cbe Parameterize timeout for radio status 2020-02-13 08:52:27 -05:00
BazookaJoe1900 c78572b471
px4io: fix array regs[] size (#14135)
may cause memory override if _max_controls larger then _max_actuators
2020-02-13 13:01:12 +01:00
Beat Küng 5e3796324c px4io: fix argv index & avoid empty 'unknown argument: ' warning 2020-02-13 03:49:16 -08:00
Beat Küng ccf2078c66 nxp/fmurt1062-v1: use hw description methods for timer configuration 2020-02-13 03:49:16 -08:00
Beat Küng 6b1ee7bbe2 io_timer_init.h: avoid using timer_channel, as imxrt does not have it 2020-02-13 03:49:16 -08:00
Beat Küng ef36d70cb4 px4_arch imxrt: add hw description constexpr util methods 2020-02-13 03:49:16 -08:00
Beat Küng 8cd9afc19a imxrt io_timer: remove some fields from io_timers_t and split out channel indexes
IOMUX uses different enumeration from GPIO pin + port, so we cannot use
.gpio_out, and add a .gpio_portpin.
2020-02-13 03:49:16 -08:00
Beat Küng d74d094940 nuttx configs: disable nuttx timers which are used for PWM output
These are not required, and to be consistent we enforce disabling them now.
2020-02-13 03:49:16 -08:00
Beat Küng b380278f02 uvify/core: use hw description methods for timer configuration 2020-02-13 03:49:16 -08:00
Beat Küng 40898ba237 px4/fmu-v5x: use hw description methods for timer configuration 2020-02-13 03:49:16 -08:00
Beat Küng a0bfb7ad8e px4/fmu-v4pro: use hw description methods for timer configuration 2020-02-13 03:49:16 -08:00
Beat Küng d53153bb9b px4/fmu-v3: use hw description methods for timer configuration 2020-02-13 03:49:16 -08:00
Beat Küng 4599c30817 px4/fmu-v2: use hw description methods for timer configuration 2020-02-13 03:49:16 -08:00
Beat Küng ba4be76bcc omnibus/f4sd: use hw description methods for timer configuration 2020-02-13 03:49:16 -08:00
Beat Küng 03210f5386 mro/x21: use hw description methods for timer configuration 2020-02-13 03:49:16 -08:00
Beat Küng bd3fe62fcf mro/x21-777: use hw description methods for timer configuration 2020-02-13 03:49:16 -08:00
Beat Küng b3fe4a6691 mro/ctrl-zero-f7: use hw description methods for timer configuration 2020-02-13 03:49:16 -08:00
Beat Küng 451af07472 modalai/fc-v1: use hw description methods for timer configuration 2020-02-13 03:49:16 -08:00
Beat Küng 93106836df intel/aerofc-v1: use hw description methods for timer configuration 2020-02-13 03:49:16 -08:00
Beat Küng d2254c2e44 holybro/kakutef7: use hw description methods for timer configuration 2020-02-13 03:49:16 -08:00
Beat Küng ebbcc01f12 av/x-v1: use hw description methods for timer configuration 2020-02-13 03:49:16 -08:00