18675 Commits

Author SHA1 Message Date
Claudio Micheli
8a313ffc26 Applied code-review suggestions.
- Removed blocking serial.
- Added passing variables by reference to parser.
- Removed commented code.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli
d1da46ef46 Added generic UART configuration.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli
ca0cd27c6b Formatted code.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli
7124cbf3af Fixed CI broken build. Made TELEM2 default port.
Device port can be set via SENS_EN_CM8JL65 parameter:
SENS_EN_CM8JL65 = 0 -> Disabled
SENS_EN_CM8JL65 = 1 -> Enabled on TELEM2
SENS_EN_CM8JL65 = 2 -> Enabled on TELEM1

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli
e4381bfc87 Added sensor enable/disable parameter (SENS_EN_CM8JL65).
Disabled by default.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli
46c5a79b57 Renamed files according to distance sensor hardware.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli
aee6a83fe0 Code Cleanup. Added configuration notes.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli
c5fece6568 Redefined reading strategy from serial to get the latest available data.
First "stable" version of the driver.

TODO: - Cleanup the code
      - Bench test (compare data with IMU)
      - Flight Test

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli
39ed84b5cd Debugging printf.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli
5d70ac7fd9 Removed dismissed folder.
TODO : Adjust work_queue rescheduling (to always have a 10Hz cycle)

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli
b0ac8fe963 Removed blocking "while" cycle to access serial port.
Serial is now cycled with work_queue rescheduling if some bytes are missing.

TODO: - Fix occasional sensor spikes (can be identified with crc)
      - Clean up the code
      - disable debug printf


Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli
93b3cf241b Renamed driver folder.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli
dd300dca0a Solved frequency rate issue. Now driver publish at ~10Hz.
Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli
4b7be38e67 Added uORB publishing.
TODO: Need to fix driver cycling.

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli
700fd5652d Added parsing function. Everything works OK.
TODO:
- Clean up the code
- Add uORB publishing messages

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +01:00
Claudio Micheli
591e8fde5d Initial commit. Integrated new distance sensor hardware.
TODO: Parsing the data

Signed-off-by: Claudio Micheli <claudio@auterion.com>
2019-01-15 09:17:24 +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
Jacob Dahl
29f034c53e mpu9250 fix hardfaults if attempting to start an already running driver (#11190)
* removed bus options that were essentially duplicates, causing hardfaults if attempting to start an already running driver. Changed NULL to nullptr. Removed bus options that were unused
* removed condition from if statement that was unnecessary
* fixed style
2019-01-14 09:59:36 -05:00
Beat Küng
beac53d775 cdev_platform: remove unused code (sim_delay) 2019-01-14 11:08:48 +01:00
Beat Küng
ccefc640ac drv_hrt posix: remove unused code and remove locking from hrt_absolute_time 2019-01-14 11:08:48 +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
Daniel Agar
92ca26b111 mpu9250 fix code style 2019-01-09 10:27:19 -05:00
Florian Olbrich
fb386580b8 Fixed failure notices on mpu9250 startup by adding back device probing on I2C interface init. 2019-01-09 09:54:45 -05:00
Florian Olbrich
280a60c86f Fixed unreliable ICM20948 detection.
Fixed ICM20948 magnetometer only option.
Specified bus for internal mpu9250 on Pixhawk 2.1 to avoid premature detection of
other device.
2019-01-09 09:54:45 -05: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
Kevin Lopez Alvarez
490eeeb9d9 RM3100: enable I2C (#11038) 2019-01-09 08:57:19 -05:00
Jake Dahl
1699c577c3 Fixed an issue with a local variable that should have been a member variable. Increased the P term to reduce rise time. Removed feedforward as it was not neccessary. Removed some custom commands that didn't serve much of a purpose. 2019-01-08 22:36:09 +01:00
AnnaDaiZH
3b3752b753 pmw3901 increase publish rate and max_ground_distance (#11066)
* increase pmw3901 publish rate and max_ground_distance
* set work queue to high priority
2019-01-08 14:25:39 -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
Hamish Willee
541b962654 CameraTrigger: Feedback fixes 2019-01-08 08:18:24 +01:00
Hamish Willee
68148c5fb4 Add camera trigger pwm params
Fix math::constrain usage

Fix second constraint
2019-01-08 08:18:24 +01:00
Beat Küng
eda45b4df2 sbus: add time-based hardening (only for IO and NuttX)
Since SBUS does not have CRC, we can use timing information to improve
parsing reliability and reject unexpected bytes.
2019-01-07 10:17:37 +01:00
Beat Küng
4cd8fe0a30 sbus: simplify logic 2019-01-07 10:17:37 +01:00
Beat Küng
9ebd052ac7 sbus: remove unused variables & improve some comments 2019-01-07 10:17:37 +01:00
Daniel Agar
2251150875 uavcan include cstdint for fixed width integer types 2019-01-06 19:20:57 -05: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
Alessandro Simovic
aa74aa2b80 CollisionPrevention: curly brace inits 2019-01-04 15:39:40 +01:00
Alessandro Simovic
e1dcc46578 CollisionPrevention: consistent var init 2019-01-04 15:39:40 +01:00
Alessandro Simovic
ae6ae47bed CollisionPrevention: unused var 2019-01-04 15:39:40 +01:00
Daniel Agar
caf26c78e3 rgbled_ncp5623c set main stack 1500 2019-01-03 10:32:49 -05:00
Jacob Dahl
a492d1cfdb MPU9250 driver fix to preserve bus+device plug-and-play capabilities (#11020) 2019-01-03 08:10:23 -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
Julian Oes
29bfdb0c88 platforms: fix linking for qurt (#11115) 2018-12-29 16:21:52 -05:00
Matthias Grob
36248cb12e PWMSim: publish disarmed value when not armed 2018-12-29 00:18:05 +01:00