11664 Commits

Author SHA1 Message Date
Alessandro Simovic
5bcd7c0a0d Capitalizing/improving warning messages 2019-01-25 11:58:17 -05:00
Alessandro Simovic
0bb5345306 removed unnecessary new-lines 2019-01-25 11:58:17 -05:00
Alessandro Simovic
0c129274af Fixing a few headers 2019-01-25 11:58:17 -05:00
Alessandro Simovic
4ead3b20e5 Fixing some typos 2019-01-25 11:58:17 -05:00
Daniel Agar
d49f6a3aca mavlink increase STACK_MAIN and STACK_MAX
- needed if NuttX networking enabled
2019-01-25 06:32:37 -08:00
David Sidrane
8f308efa88 upstram NuttX CONFIG_EXAMPLES_NSH_CXXINITIALIZE->CONFIG_SYSTEM_NSH_CXXINITIALIZE 2019-01-25 06:32:37 -08:00
David Sidrane
f007c93785 mc_pos_control_main:Use discret init of poll struct
Suport upstream change in nuttx.
2019-01-25 06:32:37 -08:00
David Sidrane
f00d633196 flashfs:Upstream renamed up_progmem_erasepage to up_progmem_eraseblock 2019-01-25 06:32:37 -08:00
Beat Küng
3859bbb3b0 px4io mixer: fix atomic access to system_state.fmu_data_received_time
system_state.fmu_data_received_time can be set from an IRQ handler, thus
we need to ensure every read access to it in mixer_tick is atomic.
So we read it once and copy it into a local variable.
2019-01-25 07:53:37 +01:00
Daniel Agar
2ffb49b734 delete px4_includes.h header and update boards/ to use syslog 2019-01-23 18:25:18 -05:00
Matthias Grob
be108a33f8 mission_params: remove MIS_YAWMODE reference
This parameter was removed in d704a2d6756bfe87d3fc7768bcc6615909eda805 and should
not be referenced anymore.
2019-01-23 22:08:32 +01:00
Daniel Agar
6feee70570 move SYS_STCK_EN to src/modules/load_mon 2019-01-23 08:23:03 +01:00
Daniel Agar
843443248e move modules/systemlib to lib/systemlib 2019-01-23 08:23:03 +01:00
Lorenz Meier
3a7deefe6e IO firmware: Run critical timing operations as atomic
This is required as we might be in interrupt context on this bare-metal target.
2019-01-22 23:52:57 +01:00
Lorenz Meier
ec0a9806a8 uORB test: Retain atomic operation 2019-01-22 23:52:57 +01:00
Julian Oes
e1472818dc mavlink_mission: round lat/lon
This avoids casting errors. An alternative to `std::round` would be to
add 0.5 before casting for positive values and subtract 0.5 before
casting for negative values.
2019-01-22 09:49:24 -05:00
Daniel Agar
ce5fbc7751 mavlink simple analyzer remove <limits> usage
- <limits> isn't available in the NuttX c++ standard library
2019-01-21 09:27:10 -05:00
Daniel Agar
edeb59a8c3 move logger array.h -> containers/Array.hpp 2019-01-20 12:03:53 +01:00
Beat Küng
ef54bff4ed vmount: avoid reading uninitialized value
matrix::Quatf() calls sinf(), which caused a valgrind warning
2019-01-17 09:39:30 +01:00
Beat Küng
85e59c210d mc_pos_control: fix uninitialized member _old_landing_gear_position 2019-01-17 09:39:30 +01:00
Matthias Grob
7b9cfac767 mc_pos_control: change use avoidance to handle data loss during mission
There were accidents because when missions lead through an obstacle
and it should be avoided but the setpoints from the external obstacle
avoidance module are suddenly missing the mission is continued into the
obstacle which results in a crash.
2019-01-16 19:13:05 +01:00
Matthias Grob
a563092742 mc_pos_control: add Loiter/Hold mode to possible failsafe commands 2019-01-16 19:13:05 +01:00
Matthias Grob
b018a6088d mc_pos_control: refactor OA setpoints out of PositionControl calls 2019-01-16 19:13:05 +01:00
Daniel Agar
63097bd8a1 mavlink sort message defaults and float literal consistency 2019-01-14 14:46:13 -05:00
Matthias Grob
1e14b10dee simulator_mavlink: take care of battery percentage rounding errors
In 5bb9babc206068e9ee67e1489433be94482a402f I made MAVLink send a
rounded up integer instead of rounded down. This makes sense in practice
because the low battery reactions happen exactly when the reported number
switches in the UI. But here we want to provoke an exact 50% in the UI so
we stop counting at 49.9%, it get's rounded up and we see the expected
result.
2019-01-14 19:30:36 +01:00
Matthias Grob
a89e550f3c simulator_mavlink: switch battery max and min to fix simultion
In 3e6e1f5c2b042accca72346273fc1755dd7670fa the simulated battery
percentage was reversed. I'm assuming because of the possibly
missleading variable name. Now I'm fixing it by switching the
maximum and minimum voltage such that the name is not misleading anymore
but it still works as expected.
2019-01-14 19:30:36 +01:00
Daniel Agar
45d7165eb3 fw_pos_control_l1 skip wind > max airspeed logic if airspeed invalid
- cleanup airspeed validity check logic
2019-01-12 14:19:53 +01:00
Beat Küng
c2f82b5996 logger: disable mission log by default (SDLOG_MISSION=0)
- I enabled it by default mostly for testing purposes
- Disabling it reduces resource usage as most setups don't need it
2019-01-09 08:59:29 -05:00
Dennis Mannhart
5887a2393c PositionControl: skip controller only if adjusted thrust setpoint are not finite
PositionControl: update comment about the order of thrust and position

mc_pos_control: reset setpoints to NAN if required

MulticopterLandDetector: consider to be landed if vehicle is not armed

mc_pos_control: initialize landing struct with landed

mc-pos-ctrl: adjust thrust-setpoint and yaw during ground-contact/maybe-landed without capturing
that information within vehicle-local-position-setpoint topic because that information
does not belong to user intention

PositionControl: set local position/velocity setpoint to NAN if not used in the control pipeline

mc-pos-ctrl: Fill vehicle_local_position_setpoint_s structure as follow:
The message contains setpoints where each type of setpoint is either the input to the PositionController
or was generated by the PositionController and therefore corresponds to the PositioControl internal states (states that were generated by P-PID).
Example:
If the desired setpoint is position-setpoint, _local_pos_sp will contain
position-, velocity- and thrust-setpoint where the velocity- and thrust-setpoint were generated by the PositionControlller.
If the desired setpoint has a velocity-setpoint only, then _local_pos_sp will contain valid velocity- and thrust-setpoint, but the position-setpoint
will remain NAN. Given that the PositionController cannot generate a position-setpoint, this type of setpoint is always equal to the input to the
PositionController.

mc_pos_control: switch to designated initializer for landed

It's less error prone because it produces an error on every discrepancy.
2019-01-08 15:36:30 +01:00
Daniel Agar
60f2a92e3d replace <cfloat> with <float.h>
- <cfloat> isn't available in the NuttX c++ library
2019-01-06 19:20:57 -05:00
Daniel Agar
c0b464e9e2 replace <cinttypes> with <inttypes.h>
- <cinttypes> isn't available in the NuttX c++ library
2019-01-06 19:20:57 -05:00
TSC21
3c246ce170 microRTPS: improve verbosity with the usage of px4_log types 2019-01-02 00:14:18 +00:00
Daniel Agar
8c88aa6416 mavlink move simple getters to header and mark const 2019-01-01 22:21:02 +00:00
Daniel Agar
f60bfd0020 mavlink add tx loop interval perf counter 2019-01-01 22:21:02 +00:00
Daniel Agar
55e3f80bab mavlink handle MAV_ODOM_LP parameter in main
- fixes #11125
2019-01-01 22:21:02 +00:00
bazooka joe
1560364c04 fix home position timestamp to be the timestamp that the home was set and not when the message was sent 2018-12-27 11:04:24 -05:00
bazooka joe
f6cf95cee0 mavlink: fix uninitialized messages fields
zeroed uninitialized fields on home_position, mavlink_rc_channels_override, mavlink_mission_item, mavlink_mission_item_int
2018-12-27 11:04:24 -05:00
Daniel Agar
3cd3856d32 commander set home position timestamp properly 2018-12-27 10:52:01 -05:00
Julian
3e87013936 simulator: fix TCP on Cygwin-Windows
It turns out that `sendto` does not work for TCP on Cygwin-Windows,
instead we need to use `send`. This required some refactoring since we
need to have the internet protocol and the port stored as a member
variable.

This should fix that lockstep SITL simulation was not working on
Windows.
2018-12-27 07:49:12 +01:00
PX4 Build Bot
03c0760e4b Update submodule micro-CDR to latest Sun Dec 23 21:17:02 UTC 2018
- micro-CDR in PX4/Firmware (b043cfac5e8635d9017ad6a13f45795ad6fda6fb): 8b3546e884
    - micro-CDR current upstream: 7a76880f90
    - Changes: 8b3546e884...7a76880f90

    7a76880 2018-12-11 Julián Bermúdez Ortega - Badges (#24)
2018-12-23 21:25:09 +00:00
Julian Oes
a1fc44d1f0 simulator: fix noise in airspeed
It turns out the noise of the airspeed depends on the least significant
bit of time which is now always 0 because time is quite regular with
lockstep. Therefore, we need a better source for the randomness. I chose
to use the sign of the y-gyro and it seems to work.
2018-12-22 10:32:18 +01:00
Julian Oes
73578a593f simulator: bring -t argument back
The -t argument had been deleted because I didn't realize that it was
actually being used. Therefore, this brings it back and we now use -c
for TCP.
2018-12-22 10:32:18 +01:00
Julian Oes
1b685de70d simulator: raise timeout
This is not suposed to ever trigger anyway.
2018-12-22 10:32:18 +01:00
Julian Oes
8b2c47523f simulator: set socket options after opening socket 2018-12-22 10:32:18 +01:00
Julian Oes
e4af97b11b simulator: fix printf format 2018-12-22 10:32:18 +01:00
Julian Oes
564cae86b5 simulator: remove doubled tcgetattr call 2018-12-22 10:32:18 +01:00
Julian Oes
8a5e0558e4 simulator: improve a couple of error messages 2018-12-22 10:32:18 +01:00
Julian Oes
1165739a56 sensors: check other gyros on timeout
@bkueng reviewed this and found that it is dangerous to continue on
timeout because we don't update other gyro sensors in the timeout case.
2018-12-22 10:32:18 +01:00
Julian Oes
f36f85010c simulator: fix casting warning on Windows 2018-12-22 10:32:18 +01:00
Julian Oes
22b584b3b4 simulator: fix TCP connection init on macOS
When `connect()` fails, the state of the socket is unspecified and we
need to close the it and create it again.

It turns out retrying connect worked on Linux but it didn't on macOS.
2018-12-22 10:32:18 +01:00