Caio Marcelo de Oliveira Filho
ec52df991c
build: compile only the HAL files needed by the board
...
Instead of requiring every program to specify the HAL related modules,
let the build system do it (in practice everything we compiled depended
on HAL anyway). This allow including only the necessary files in the
compilation.
2015-10-21 09:16:07 +11:00
Caio Marcelo de Oliveira Filho
2e464a53c2
AP_HAL: make code not depend on concrete HAL implementations
...
The switching between different AP_HAL was happening by giving different
definitions of AP_HAL_BOARD_DRIVER, and the programs would use it to
instantiate.
A program or library code would have to explicitly include (and depend)
on the concrete implementation of the HAL, even when using it only via
interface.
The proposed change move this dependency to be link time. There is a
AP_HAL::get_HAL() function that is used by the client code. Each
implementation of HAL provides its own definition of this function,
returning the appropriate concrete instance.
Since this replaces the job of AP_HAL_BOARD_DRIVER, the definition was
removed.
The static variables for PX4 and VRBRAIN were named differently to avoid
shadowing the extern symbol 'hal'.
2015-10-21 09:16:07 +11:00
Randy Mackay
3d7ec3704d
Mount: add param descriptions to allow RC9 ~ RC12 inputs to be used to control gimbal
2015-09-29 16:41:51 +09:00
Randy Mackay
fa0aa6f5c9
Mount: remove support for do-mount-configure as command long
...
Also fix bug in do-mount-control so that do-mount-control can switch mount into retract mode
Also removes ability to set which axis are stabilized through
ardupilotmega mount_configure message
2015-09-06 16:01:18 +09:00
squilter
cc58ec917c
Mount: add support for do_mount_control via command_long
2015-09-06 16:01:12 +09:00
fillycheezstake
39dae7a156
Mount: fix for STORM32 serial ver 78e and higher
...
This fixes the structs to be compatible with the changes OlliW made to
the gimbal firmware.
http://www.olliw.eu/storm32bgc-wiki/Serial_Communication
2015-08-25 13:45:33 +09:00
Lucas De Marchi
2011c4d988
AP_HAL_Mount: standardize inclusion of libaries headers
...
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Gustavo Jose de Sousa
8011579c5a
AP_Mount: standardize inclusion of libaries headers
...
This commit changes the way libraries headers are included in source files:
- If the header is in the same directory the source belongs to, so the
notation '#include ""' is used with the path relative to the directory
containing the source.
- If the header is outside the directory containing the source, then we use
the notation '#include <>' with the path relative to libraries folder.
Some of the advantages of such approach:
- Only one search path for libraries headers.
- OSs like Windows may have a better lookup time.
2015-08-11 16:38:20 +10:00
Randy Mackay
b13921a7aa
Mount_SToRM32: find gimbal channel on startup
2015-07-25 10:53:05 +09:00
Randy Mackay
cc0ab26f5d
Mount: fix init of mode
...
Mode was being set from MNT_DEFTL_MODE parameter before that parameter's
value had been initialised from eeprom
2015-07-16 14:14:01 +09:00
Randy Mackay
1d732ddf62
Mount: param desc rename from MAVLink to 3DR Solo
2015-07-07 13:29:24 +09:00
Grant Morphett
84ac8abc42
AP_Mount: Fixed a bug with wrapping of panning angles.
2015-06-22 09:32:26 +09:00
Randy Mackay
0b6323d5ed
Mount: default MNT_TYPE to servo gimbal if rc outputs defined
2015-06-10 16:47:08 +09:00
Randy Mackay
b8e3fe8f26
Mount: AlexMos fix to stop crashing before init
2015-06-05 12:31:16 +09:00
Randy Mackay
66d2328163
Mount: Alexmos save 4 bytes of RAM
2015-06-05 12:31:14 +09:00
Randy Mackay
7a8fe5f4d4
Mount: Alexmos formatting fixes
2015-06-05 12:31:12 +09:00
Andrew Tridgell
83b46243db
AP_Mount: convert example from .pde to .cpp
2015-06-01 17:07:05 +10:00
Andrew Tridgell
1400d0155c
AP_Mount: fixed valgrind error with gimbal code
2015-05-27 11:54:17 +10:00
Randy Mackay
fb2d29364e
Mount_SToRM32_serial: fix angle request
2015-05-26 21:05:29 +09:00
Randy Mackay
9b04a67e63
Mount_SToRM32_serial: rename sent_do_mount_control
2015-05-26 21:05:26 +09:00
Randy Mackay
72eb25b166
Mount: add SToRM32 serial to front end
2015-05-26 21:05:24 +09:00
Sergey Kirillov
c133511431
Mount: add SToRM32 serial support
2015-05-26 21:05:22 +09:00
Andrew Tridgell
d96e62cce7
AP_Mount: update gimbal for changed quaternion API
2015-05-25 09:08:45 +10:00
Andrew Tridgell
19419fd901
AP_Mount: fixed reporting of MAVLink gimbal position to GCS
2015-05-24 15:24:02 +10:00
Andrew Tridgell
730644eaeb
AP_Mount: use M_PI_F instead of (float)M_PI
2015-05-05 13:44:25 +10:00
Andrew Tridgell
7c9e3d4b58
AP_Mount: revert AP_Math class change
2015-05-05 13:27:06 +10:00
Tom Pittenger
4ac1f8a2fa
AP_Mount: compiler warnings: apply is_zero(float) or is_equal(float)
2015-05-05 13:26:54 +10:00
Andrew Tridgell
d8ca0658d7
AP_Mount: fixed some build warnings
2015-05-05 09:45:58 +10:00
Randy Mackay
8ced9cc904
Gimbal: only include for high performance CPUs
2015-04-21 21:47:18 +09:00
Randy Mackay
93ba2d2d32
Mount_MAVLink: uses vehicle's sysid
2015-04-21 21:47:17 +09:00
Randy Mackay
e726a05f3b
Gimbal: fix to parameter init order
...
resolves a compiler warning
2015-04-21 21:47:16 +09:00
Randy Mackay
e9b2153672
Gimbal: formatting fixes
...
Also isCopterFlipped returns bool instead of uint8_t
No functional change
2015-04-21 21:47:15 +09:00
Randy Mackay
db6bb295c7
Mount: add gimbal parameter descriptions
2015-04-21 21:47:14 +09:00
Jonathan Challinger
231f776dd7
AP_Gimbal: change isCopterFlipped()
2015-04-21 21:45:52 +09:00
Arthur Benemann
21b909f670
AP_Gimbal: report gimbal angles using a 312 rotation vector
2015-04-21 21:45:50 +09:00
Arthur Benemann
2850c7ab4a
AP_Gimbal: nest AP_Gimbal files into AP_Mount library
2015-04-21 21:45:49 +09:00
Arthur Benemann
255c5b3025
AP_Mount: report MAVLink gimbal angle to the GCS
2015-04-21 21:45:45 +09:00
Arthur Benemann
4bdf909bbf
AP_Mount: Create new copter parameters to hold gimbal settings
2015-04-21 21:45:43 +09:00
Arthur Benemann
a05fe7e117
AP_Gimbal: Re-implement the target low-pass filter
2015-04-21 21:45:40 +09:00
Arthur Benemann
b3dd8891c8
AP_Mount: Use AP_Gimbal on the AP_Mount_MAVLink class
2015-04-21 21:45:38 +09:00
Arthur Benemann
558a69bdca
Mount_MAVLink: remove code now in AP_Gimbal
2015-04-21 21:44:56 +09:00
Randy Mackay
44d2ae06fb
Mount: unix style line endings
2015-04-17 22:59:34 +09:00
Andrew Tridgell
df948e7358
AP_Mount: fixed for new GIMBAL_REPORT message
2015-04-06 16:42:23 -07:00
Randy Mackay
1ed7737669
Mount: integrate Serial Manager instance
2015-04-01 14:59:21 -07:00
Randy Mackay
8a3a7bdcd1
Mount: add set_angle_target method
2015-03-21 21:52:22 +09:00
Randy Mackay
2189b16165
Mount_SToRM: remove message throttling
...
recent versions of gimbal firmware can handle 50hz update rate
2015-03-21 05:56:18 +09:00
Randy Mackay
b3362d5829
Mount: calc_angle_to_location returns vehicle relative yaw
2015-03-21 05:56:16 +09:00
Randy Mackay
d2739c5ce5
Mount_SToRM: slow updates to 10hz, reverse yaw, pitch
2015-03-20 20:46:45 +09:00
Paul Riseborough
9c2f1ce869
AP_Mount: Fix bug in mavlink gimbal attitude control
2015-03-16 09:54:43 +11:00
Jonathan Challinger
dff899647f
AP_Mount: use AP_AHRS_TYPE instead of AP_AHRS_MOUNT
2015-03-16 09:14:03 +11:00
Jonathan Challinger
7b0e806db1
AP_Mount: correct status_msg to conform to MAVLink specification
2015-02-21 08:33:50 +09:00
Randy Mackay
73e00108e4
Mount: SToRM32 remove unnecessary include
2015-02-20 11:27:15 +09:00
Randy Mackay
23f0bab5d6
Mount: integrate SToRM32 backend
2015-02-20 11:05:40 +09:00
Randy Mackay
92c7949355
Mount: SToRM32 mount backend
2015-02-20 11:05:31 +09:00
Andrew Tridgell
50a11c7d5a
AP_Mount: added an alternative tilt-only gimbal control method
...
this adds some nice control characteristics based on work by Paul and
Arthur, but is tilt only
2015-02-16 16:48:55 +11:00
Andrew Tridgell
2f3b5006e7
AP_Mount: fixed build of example sketches
2015-02-09 11:49:10 +11:00
Andrew Tridgell
fa7c584733
AP_Mount: fixed build on non-EKF systems
2015-02-03 09:49:17 +11:00
Andrew Tridgell
f77f919588
AP_Mount: enable pan pointing in MAVLink backend
2015-02-03 09:49:17 +11:00
Andrew Tridgell
81f60bde06
AP_Mount: fill in all Location flags in ROI pointing
2015-02-03 09:49:17 +11:00
Andrew Tridgell
cf76dcfbf3
AP_Mount: fixed mount MAVLink backend to match SITL sim behaviour
...
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2015-02-03 09:49:17 +11:00
Andrew Tridgell
75b1330843
AP_Mount: fixed radians to degrees error
2015-02-03 09:49:17 +11:00
Andrew Tridgell
032dcc3660
AP_Mount: fixed references to state in backends
2015-02-03 09:49:17 +11:00
Paul Riseborough
8d6f0d08c9
AP_Mount: Update attitude control calculations and debug printing
2015-02-03 09:49:17 +11:00
Paul Riseborough
1660aefc90
AP_Mount: Add a simple attitude control loop to the gimbal report handling
2015-02-03 09:49:16 +11:00
Andrew Tridgell
79017096e2
AP_Mount: prototype code to send biases
2015-02-03 09:49:16 +11:00
Andrew Tridgell
da27a8696d
AP_Mount: added initial ekf estimation of gimbal bias
...
Pair-Programmed-With: Paul Riseborough <p_riseborough@live.com.au>
2015-02-03 09:49:16 +11:00
Andrew Tridgell
01b264951a
AP_Mount: added handling of GIMBAL_REPORT messages
2015-02-03 09:49:15 +11:00
Andrew Tridgell
79cad28a25
AP_Mount: simplify some uses of frontend
2015-01-29 17:23:33 +11:00
Andrew Tridgell
60f266da19
AP_Mount: update for new find_serial() interface
2015-01-29 15:36:38 +11:00
Matthias Badaire
5f432eaa2d
AP_Mount_Alexmos : take into account available negative numbers
...
uartdriver->available () function brings back a signed int, we should be carefull to avoid an endless loop if that happens.
2015-01-29 14:05:15 +11:00
Randy Mackay
4a4387530a
Mount: remove unused num_instances
2015-01-29 14:05:14 +11:00
Randy Mackay
d6433266d2
Mount_MAVLink: use SerialManager for init
...
use serial_manager's get_mavlink_channel
2015-01-29 14:05:14 +11:00
Randy Mackay
4848b03ac6
Mount_AlexMos: use SerialManager for init
2015-01-29 14:05:14 +11:00
Randy Mackay
56f872b38c
Mount_Servo: use SerialManager for init
2015-01-29 14:05:13 +11:00
Randy Mackay
886cc9aa46
Mount: use SerialManager for init
2015-01-29 14:05:13 +11:00
Randy Mackay
ee369f8a0d
Mount_AlexMos: use reference to state
2015-01-29 14:05:11 +11:00
Randy Mackay
b083c99966
Mount_MAVLink: use reference to state
2015-01-29 14:05:11 +11:00
Randy Mackay
32ea258594
Mount_Servo: use reference to state
2015-01-29 14:05:10 +11:00
Randy Mackay
acbcf3c54e
Mount: backends use reference to their state
2015-01-29 14:05:10 +11:00
Randy Mackay
bf82e82282
Mount_MAVLink: remove unused _enable and find_mount
2015-01-29 14:05:10 +11:00
Randy Mackay
b5127b680f
Mount: set primary to first instance
2015-01-29 14:05:10 +11:00
Matthias Badaire
24af65a41a
AP_Mount_Alexmos: critical fix to avoid endless loop if byte arrive to fast in serial buffer
...
This fix reads the number of bytes available and iterates on it instead of looking for new bytes in the serial buffer (potentially forever)
2015-01-29 14:05:10 +11:00
Matthias Badaire
46e92f99fe
AP_Mount_Alexmos: use struct for CMD_CONTROL command
...
new struct created in header and used in control_axis function
2015-01-29 14:05:09 +11:00
Matthias Badaire
81d60af4a8
AP_Mount_Alexmos : cleanup initialization of class fields
2015-01-29 14:05:09 +11:00
Randy Mackay
c5ef5d21d3
Mount: add Alexmos to MNT2_TYPE param description
2015-01-29 14:05:09 +11:00
Randy Mackay
93323e2136
Mount_Alexmos: comments and formatting
...
No functional change
2015-01-29 14:05:09 +11:00
Matthias Badaire
1e5ddf3ce7
AP_Mount_Alexmos : make sure get_angles is called to get the real angles from the gimbal
...
get_angles calls the Alexmos API to get the current angles. It was not being called before.
2015-01-29 14:05:09 +11:00
Matthias Badaire
0b88f15a37
AP_Mount: fix Backend enum for AP_Mount_Alexmos and add comments
...
fix Backend enum for AP_Mount_Alexmos and add comments
2015-01-29 14:05:09 +11:00
Matthias Badaire
cdeb1fb8f3
AP_Mount_Alexmos : changes some define to avoid conflicting
...
change SPEED to AP_MOUNT_ALEXMOS_SPEED and the control mode defines as well
2015-01-29 14:05:08 +11:00
Matthias Badaire
6e5e438b0f
AP_Mount: Make use of the new AP_Mount_Alexmos backend
...
This is adding AP_Mount_Alexmos as one of the available backend
2015-01-29 14:05:08 +11:00
Matthias Badaire
dfc086f9e9
AP_Mount_Alexmos : Add Alexmos Serial support for 8bit cards
...
This is the initial implementation of Alemox gimbal protocol. the uart output is for the moment hard coded but should become a parameter.
2015-01-29 14:05:08 +11:00
Randy Mackay
66ad56161b
Mount_MAVLink: fix to calc_angle_to_location params
2015-01-29 14:05:08 +11:00
Randy Mackay
f509dad991
Mount_Servo: bug fix to calc_angle_to_location params
2015-01-29 14:05:08 +11:00
Randy Mackay
a78309734d
Mount_MAVLink: remove set_roi_target, configure
...
These methods are now in the backend
2015-01-29 14:05:07 +11:00
Randy Mackay
99c35d5cf7
Mount_Servo: remove set_roi_target, configure
...
These methods are now in the backend
2015-01-29 14:05:07 +11:00
Randy Mackay
72fec52f0f
Mount_Backend: move set_roi_target, configure to backend
2015-01-29 14:05:07 +11:00
Randy Mackay
efeb05876e
AP_Mount: initialise mode to default
2015-01-29 14:05:07 +11:00
Randy Mackay
ace1fd8740
Mount_MAVLink: handle RC and GPS targeting in lib
...
Previously we expected the mount to do this but it is likely that the
first versions of MAVLink enable mounts will only be capable of pointing
at a particular angle
2015-01-29 14:05:07 +11:00
Randy Mackay
9d4210b82a
Mount_Backend: move RC target handling to backend
2015-01-29 14:05:07 +11:00
Randy Mackay
b3044ced1f
Mount_Backend: move calc_angle_to_lcoation to backend
2015-01-29 14:05:07 +11:00
Randy Mackay
8fabacf5ff
Mount_MAVLink: use sysid from vehicle, compid of 10
2015-01-29 14:05:06 +11:00
Randy Mackay
6af5a6687f
Mount: add params for second mount
2015-01-29 13:57:19 +11:00
Randy Mackay
5d30af233a
Mount: move param underscore to lib
2015-01-29 13:57:18 +11:00
Randy Mackay
2ed4ca409c
Mount_Servo: check_servo_map every 3sec
2015-01-29 13:57:18 +11:00
Randy Mackay
cb5a122dab
Mount_Servo: add set_mode
2015-01-29 13:57:17 +11:00
Randy Mackay
a41ff2375b
Mount_Backend: add set_mode virtual method
2015-01-29 13:57:17 +11:00
Randy Mackay
ef719b145b
Mount: rename MODE to DFLT_MODE, move set_mode to backend
2015-01-29 13:57:17 +11:00
Randy Mackay
6c766051e8
Mount_MAVLink: minimalist mavlink backend
...
We assume MAVLink enabled mount will do all the hard work of support all modes
2015-01-29 13:57:17 +11:00
Randy Mackay
8a9df1c894
Mount_Servo: Servo functions moved to backend
2015-01-29 13:57:17 +11:00
Randy Mackay
7df2892b8d
Mount_Backend: add backend class
2015-01-29 13:57:17 +11:00
Randy Mackay
88db50c3a7
Mount: parent class becomes front-end
2015-01-29 13:57:17 +11:00
Randy Mackay
314eb2536f
Mount: fix example sketch
2015-01-28 17:15:46 +09:00
Andrew Tridgell
411766f45a
AP_Mount: removed use of mavlink_check_target()
2014-12-11 12:32:27 +09:00
Andrew Tridgell
78db698108
AP_Mount: allow a MOUNT_CONTROL message to reset RC targetting
...
fixes issue #1617
2014-11-18 13:35:11 +11:00
Andrew Tridgell
14467b75a1
AP_Mount: use norm_input_dz()
...
this makes rc targeting much easier without drift
2014-11-18 12:44:29 +11:00
Arthur Benemann
f7f9bedc38
AP_Mount: update the status_msg() method to match the new definition
2014-11-17 15:59:23 -08:00
Jason Short
7ee5b58535
AP_Mount: Axis mask speedup
...
Using a simple bit mask to avoid calculating an unneeded ATAN2() for AVR users.
2014-11-14 13:51:16 +11:00
Jonathan Challinger
d03ed7a2c3
AP_Mount: Added lead filter
2014-11-06 07:35:32 +11:00
Ju1ien
1c96bf0b1d
AP_Mount.cpp - correct units in description
...
That should be corrected also in MP as the current code is expecting
degrees, not centidegrees.
2014-08-25 15:55:07 +09:00
Randy Mackay
039f4740ce
Mount: correct comment on set_mode_to_default time
2014-08-14 11:27:34 +09:00
Randy Mackay
5614e42063
Mount: init members to resolve compiler warnings
2014-08-14 11:27:33 +09:00
Andrew Tridgell
fddf895d66
AP_Mount: fixed example build
2014-08-13 21:48:36 +10:00
Andrew Tridgell
6ea68b318e
AP_Mount: fixed example build
2014-07-25 17:54:58 +10:00
svefro
be9bfc5530
Mount: set_mode method made public
2014-07-10 13:03:43 +09:00
Michael Oborne
30a3927ea8
AP_Mount: fix where status_msg() is sent
...
send to the channel where the trigger msg was sent from
2014-06-18 12:03:18 +10:00
Andrew Tridgell
eb67948171
AP_Mount: convert to new GPS API
2014-04-01 06:38:24 +11:00
Andrew Tridgell
6eece3a278
AP_Mount: fixed example build
2014-03-19 12:13:50 +09:00
Randy Mackay
1c457d8448
Mount: add get_mode and set_mode_to_default methods
2014-03-05 16:01:11 +09:00
Don Gagne
e68cf2d1c5
Plane: Fix parameter documentation
...
Fixes some problems with incorrect docs which would in turn generate
bad amp.pdef.xml files for ground stations.
merge with below
2014-01-09 14:02:21 +09:00
Andrew Tridgell
4de2a654ab
AP_Mount: changed ahrs to be a const reference
...
saves a bit of code
2013-10-13 11:03:24 +09:00
Andrew Tridgell
a67413d495
AP_Mount: changed to AP_Vehicle.h
2013-09-13 11:44:54 +10:00
Andrew Tridgell
905e07edf9
AP_Mount: fixed examples build
2013-08-30 13:01:39 +10:00
Andrew Tridgell
206ed04e76
AP_Mount: fixed example build
2013-07-15 14:10:50 +10:00
Andrew Tridgell
033828aeb6
AP_Mount: make the code a bit easier to read
2013-06-03 16:23:48 +10:00
Andrew Tridgell
9076f6a1d0
AP_Mount: use RC_Channel::rc_channel() instead of rc_ch[]
2013-06-03 16:23:47 +10:00
Andrew Tridgell
1cc02836a0
AP_Mount: fixed indent-tabs-mode
2013-05-30 09:51:24 +10:00
tobias
217b8d7a59
cleanup: use const for struct Location pointers and references
...
this allows the compiler to generate more efficient code
2013-04-09 12:10:32 +10:00
Andrew Tridgell
26fedc543c
AP_Mount: fixed scaling of the joystick speed to give better control
...
thanks to Chris Miser for reporting this problem
2013-03-08 14:39:32 +11:00
James Bielman
5631f865b2
Update floating point calculations to use floats instead of doubles.
...
- Allows use of hardware floating point on the Cortex-M4.
- Added "f" suffix to floating point literals.
- Call floating point versions of stdlib math functions.
2013-01-16 13:52:01 +11:00
rmackay9
cf409abc63
AP_Mount: add parameter descriptions
2013-01-02 16:47:39 +09:00
Andrew Tridgell
374af1cd14
build: change from Arduino.mk to apm.mk
2013-01-02 17:29:37 +11:00
Andrew Tridgell
ceb3f577d8
libraries: use new math functions
2012-12-20 14:53:22 +11:00
Andrew Tridgell
a1187519a8
AP_HAL: use AP_HAL_BOARD_DRIVER in remaining test sketches
2012-12-20 14:52:37 +11:00
Pat Hickey
eb530b86e8
move Arduino.mk to /mk/Arduino.mk
2012-12-20 14:52:35 +11:00
Andrew Tridgell
7d27e420ae
AP_HAL: remove unnecessary Arduino.h includes
2012-12-20 14:52:30 +11:00
Andrew Tridgell
9d1f43928c
Mount: updates for new AP_Param API
2012-12-20 14:51:39 +11:00
Pat Hickey
475da4eca4
CONFIG_HAL_BOARD - test sketches fixed up, build all passes
2012-12-20 14:51:37 +11:00
Pat Hickey
6cc231ae7d
AP_Mount: ported to AP_HAL
...
I do not have the hardware required to test this
2012-12-20 14:51:29 +11:00
rmackay9
6bbf66697b
AP_Mount: resolve compiler warning about unused mount_open variable
2012-11-07 23:29:25 +09:00
Andrew Tridgell
f41270a3ce
AP_Mount: updated for new RC_Channel_aux API
2012-09-08 15:12:52 +10:00