Julian Oes
3adb389b7c
vmount: don't ignore commands to all component ids
...
This resolves the case where a gimbal command assembled by
QGroundControl is rejected because the component id is set to 0 (for
all) and the component id of the vehicle is e.g. 1.
2018-01-18 11:09:17 +01:00
Daniel Agar
14fefca85e
vmount delete InputTest on error
...
- fixes CID 139488
2017-10-31 08:12:12 +01:00
Daniel Agar
0931efb3f0
vmount initialize params
...
- fixes CID 199479
2017-10-31 08:12:12 +01:00
Matthew Dailey
bcb8852c99
Use fabsf instead of fabs for floats
2017-10-29 12:57:10 +01:00
Matthew Dailey
e95410882b
Fix type of MNT_OB_LOCK_MODE and MNT_OB_NORM_MODE parameters
...
Fixes issue #8178
2017-10-29 12:57:10 +01:00
Matthew Edwards
335c319b2e
vmount: Use MNT_DO_STAB parameter for defaults in InputMavlinkCmdMount as well.
2017-10-25 11:30:31 +02:00
Matthew Edwards
fdf4eb0bd6
vmount: Store offset in radians and calculated scale factor in OutputConfig instead of raw parameters.
2017-10-25 11:30:31 +02:00
Matthew Edwards
2f40bc3a78
vmount: Add parameters for servo range and offset and whether to stabilize ( #8120 ).
...
Adds MNT_DO_STAB for whether to stabilize by default.
Adds MNT_RANGE_{PITCH,ROLL,YAW} for the output range of each output channel in AUX mode (instead of hardcoded 360 degrees).
Adds MNT_OFF_{PITCH,ROLL,YAW} for adjusting the zero point of each output channel.
2017-10-25 11:30:31 +02:00
Daniel Agar
3c18be387c
ROI - move handling to navigator ( #7939 )
2017-09-26 12:25:02 -04:00
Julian Oes
98de8c85a4
vmount: accept mavlink input from [0..360] degrees
...
This enables mavlink user input not only in the range of [-180..180]
degrees but also [0..360] degrees.
2017-09-15 14:41:07 +02:00
Daniel Agar
e15afcca7a
vehicle_command commands are uint16, not uint32
2017-09-08 09:06:30 +02:00
Daniel Agar
9b5fe8c476
ignore -Wsign-compare per module
2017-09-07 10:27:36 +02:00
Daniel Agar
f282f50cff
vmount run at default priority
2017-08-23 08:06:20 +02:00
José Roberto de Souza
4462869432
Add support to new fields in command_ack
2017-08-19 09:04:52 +02:00
Beat Küng
236021cc01
vmount mavlink input: fix polling for position_setpoint_triplet
...
The code was violating the rule 'every successfull poll must be followed
by an orb_copy'.
The result was a busy loop.
2017-08-17 07:47:48 +02:00
Nicolas de Palezieux
55a2930cdb
vmount: reduce stack size to 1900 as recommended by @bkueng (maximum used memory observed: 1552)
2017-08-11 14:37:48 +02:00
Nicolas de Palezieux
b702daf40e
vmount: virtual destructor
2017-08-11 14:37:48 +02:00
Nicolas de Palezieux
c3faf587cc
vmount: make the parameter descriptions a little nicer
2017-08-11 14:37:48 +02:00
Nicolas de Palezieux
281ee5e5af
vmount: increase stack size
2017-08-11 14:37:48 +02:00
Nicolas de Palezieux
b8d389ca4e
vmount: properly unadvertise uorb topics when stopping or re-configuring vmount. Othwerise subsequent advertise calls may fail (only ever witnessed for _mount_orientation_pub)
2017-08-11 14:37:48 +02:00
Nicolas de Palezieux
cbe3627b8c
vmount: set more sensible default parameters for the mount system and component IDs
2017-08-11 14:37:48 +02:00
Nicolas de Palezieux
89aeea7e8e
vmount: publish mount angle commands in proper order and units
2017-08-11 14:37:48 +02:00
Beat Küng
4eb0ffc554
vmount: update control_data if already_active is true
...
control_data needs to be able to be set to nullptr in case if the input
is already active. Otherwise the output will think there's always new
requests and reset it's state.
2017-08-11 14:37:48 +02:00
Beat Küng
73d23742ea
vmount: rate-limit the update of the outputs
...
This avoids a busy-loop if the input is listening for vehicle commands and
the output publishes vehicle commands.
2017-08-11 14:37:48 +02:00
Beat Küng
923cdbcbfb
vmount mavlink input: process commands only if the target matches our sys & comp id
2017-08-11 14:37:48 +02:00
Beat Küng
fd05c09447
vmount: fix param types, use int32_t
2017-08-11 14:37:48 +02:00
José Roberto de Souza
925efe990d
Initialize all outgoing vehicle_command_ack_s and vehicle_command_s
...
This will initialize those structs with zero in all fields not set
and all fields set will only be change once to the final value not
wasting CPU time zeroing it.
This will guarantee that no non-unitialized structs will have
a trash value on from_external causing it to be sent to the
MAVLink channel without need it.
2017-08-08 21:46:30 +02:00
Lorenz Meier
ef233d29f0
VMount: use correct doube interface
2017-08-01 12:46:59 +02:00
Beat Küng
47073e9c32
vmount: add module documentation
2017-07-14 11:57:11 +02:00
Julian Oes
9854fc0d84
Set timestamp with vehicle commands
...
The vehicle_command uORB messages had the timestamp unset at 0.
2017-07-08 11:52:23 +02:00
Julien Lecoeur
7929287f73
Fix -Werror=format-truncation on GCC 7
...
Fix formatting
Check snprintf return for error AND overflow
2017-06-26 15:50:44 +02:00
Julien Lecoeur
06c6a0cdec
Fix -Werror=implicit-fallthrough errors on GCC7
2017-06-26 15:50:44 +02:00
Beat Küng
f42a626527
vmount: fix null-pointer access if invalid output mode was selected
...
In case of an invalid output mode, thread_data.output_obj was null.
2017-04-24 16:49:26 +02:00
Lorenz Meier
f7469581b9
VMount: Fix interface spec with respect to MAVLink / vehicle command interface
2017-04-23 15:19:41 +02:00
Julian Oes
349a468f81
vmount: add to startup script, disable by default
...
vmount is now added to the startup script, however, it will only start
if the param MNT_MODE_IN is set to anything but -1.
2017-04-19 16:59:48 +02:00
Beat Küng
ed577f705d
vmount: set output to Neutral for VEHICLE_ROI_NONE
2017-04-19 16:59:48 +02:00
Beat Küng
c20ff1737c
vmount: poll only on active input
...
To reduce latency of the output update when mode is set to auto.
2017-04-19 16:59:48 +02:00
Beat Küng
9ed21afd59
vmount: simplify initialization
2017-04-19 16:59:48 +02:00
Beat Küng
021b808f6c
vmount: fix null-pointer access by iterating only over the used objects
2017-04-19 16:59:48 +02:00
Julian Oes
7c0c97ce03
vmount: added commented output printf
2017-04-19 16:59:48 +02:00
Julian Oes
f4b1623550
vmount: wrong pointer was passed to update
2017-04-19 16:59:48 +02:00
Julian Oes
87d5b41b84
vmount: fixed wrong index
2017-04-19 16:59:48 +02:00
Julian Oes
ec36bdcd10
vmount: always initialize
...
MNT_MODE_IN 0 now means to automatically check all inputs.
2017-04-19 16:59:48 +02:00
Julian Oes
e3d1b7fab4
vmount: _first_time flag wasn't ever reset
2017-04-19 16:59:48 +02:00
Julian Oes
07de797e8d
vmount: correctly set control_data output arg
...
The control_data pointer wasn't correctly set for the cases where there
actually was a change/command.
2017-04-19 16:59:48 +02:00
Julian Oes
e1246063e9
vmount: another try to get abs and types right
2017-04-19 16:59:48 +02:00
Julian Oes
702922e677
vmount: _get_aux_value needs to be re-used
2017-04-19 16:59:48 +02:00
Julian Oes
c33e46167c
vmount: type-promotion fix clang-tidy
2017-04-19 16:59:48 +02:00
Julian Oes
a9523155cf
vmount: small formatting change
2017-04-19 16:59:48 +02:00
Julian Oes
caf69b290a
vmount: refactor to auto-select between all inputs
...
It is not convenient having to change a parameter to change a gimbal
from RC input to mavlink input mode or back. This refactor changes the
behaviour to use whatever is available, RC or mavlink commands.
Once a mavlink command is followed, control can be taken back using RC,
however, this requires a clear stick change.
2017-04-19 16:59:48 +02:00