Commit Graph

19791 Commits

Author SHA1 Message Date
Aaron Wang Shi
736e3e6f46 build: support BH HAT build 2015-12-21 15:54:30 +11:00
squilter
65e2fb5367 Makefiles: add px4-v2-upload-solo
The IP of the Solo on its network is static, and will always be 10.1.1.10
2015-12-21 11:13:40 +09:00
Andrew Tridgell
05e04ee1a7 HAL_SITL: added semaphore support 2015-12-21 07:38:30 +11:00
Andrew Tridgell
d14056fa1e Copter: fixed build warnings 2015-12-20 17:55:40 +11:00
Andrew Tridgell
025e4edd17 DataFlash: fixed warning 2015-12-20 17:55:40 +11:00
Andrew Tridgell
a73039d515 HAL_Empty: use 5V voltage for HAL_EMPTY
this makes bringup easier for new boards (allows arming checks to
pass)
2015-12-20 17:55:40 +11:00
Andrew Tridgell
2442c45558 Tracker: fixed dependencies 2015-12-20 17:55:40 +11:00
Andrew Tridgell
ef83f39029 AP_Baro: renamed _C* vars to avoid conflict with qurt 2015-12-20 17:55:39 +11:00
Andrew Tridgell
fbacb4c01f AC_AttitudeControl: fixed M_PI -> M_PI_F 2015-12-20 17:55:39 +11:00
Andrew Tridgell
d24f6f4050 AP_NavEKF: fixed static const bug 2015-12-20 17:55:39 +11:00
Andrew Tridgell
02d7867d79 DataFlash: added locking for multi-thread logging support 2015-12-20 17:55:39 +11:00
Andrew Tridgell
c77e3c89c5 HAL_Linux: implement new_semaphore() 2015-12-20 17:55:39 +11:00
Andrew Tridgell
02bee8810d HAL_PX4: added Semaphore support 2015-12-20 17:55:39 +11:00
Andrew Tridgell
9d4b31ca3c AP_HAL: added a new_semaphore() interface to Util 2015-12-20 17:55:39 +11:00
Andrew Tridgell
9fe25f9c71 HAL_Empty: fixed I2CDriver for use in Linux subtypes 2015-12-20 16:52:20 +11:00
Andrew Tridgell
ec6a679482 AP_HAL: added ByteBuffer and ObjectBuffer in RingBuffer
much better API than old macros
2015-12-20 07:33:54 +11:00
Tom Pittenger
cf170b2aa7 GCS_MAVLink: generated files 2015-12-19 14:36:16 +09:00
Tom Pittenger
7af717fead GCS_MAVLink: ADSB msg bug: vert_velocity is supposed to be signed
- bug was introduced when changing from floating point to fixed point format
2015-12-19 14:36:13 +09:00
Yang Liu
f0f3986f46 AP_InertialNav: Typo correction in comment 2015-12-19 10:11:35 +09:00
Andre Kjellstrup
6f5387c48d ArduPlane: Camera options for better camera control
All on one because they would not pass autotest if split up.
2015-12-18 18:16:11 +11:00
Andre Kjellstrup
eb0daee4b3 ArduCopter: Camera options for better camera control
All on one because they would not pass autotest if split up.
2015-12-18 18:16:11 +11:00
Andre Kjellstrup
80f19aefc7 APMrover2: Camera options for better camera control
All on one because they would not pass autotest if split up.
2015-12-18 18:16:11 +11:00
Andre Kjellstrup
6da7e76990 AP_Camera: Camera options for better camera control
All on one because they would not pass autotest if split up.
2015-12-18 18:16:11 +11:00
Jonathan Challinger
b0f58248a5 AP_TECS: reflect renamed function in AP_AHRS 2015-12-18 18:08:37 +11:00
Jonathan Challinger
63caca1d3f AP_Mount: reflect renamed function in AP_AHRS 2015-12-18 18:08:37 +11:00
Jonathan Challinger
ee8090e25f AC_AttitudeControl: reflect renamed function in AP_AHRS 2015-12-18 18:08:37 +11:00
Jonathan Challinger
07d87d8877 Replay: reflect renamed function in AP_AHRS 2015-12-18 18:08:37 +11:00
Jonathan Challinger
05eb723429 Plane: reflect renamed function in AP_AHRS 2015-12-18 18:08:37 +11:00
Jonathan Challinger
cee706edd9 Copter: reflect renamed function in AP_AHRS 2015-12-18 18:08:37 +11:00
Jonathan Challinger
cac49e4ce0 AntennaTracker: reflect renamed function in AP_AHRS 2015-12-18 18:08:37 +11:00
Jonathan Challinger
6c4f070685 Rover: reflect renamed function in AP_AHRS 2015-12-18 18:08:37 +11:00
Jonathan Challinger
6682b27456 AP_AHRS: rename get_dcm_matrix to get_rotation_body_to_ned 2015-12-18 18:08:37 +11:00
Lucas De Marchi
2a953c4e35 AP_HAL_Linux: add missing casts
These errors were all over the VideoIn.cpp file:

libraries/AP_HAL_Linux/VideoIn.cpp: In member function 'bool Linux::VideoIn::allocate_buffers(uint32_t)':
libraries/AP_HAL_Linux/VideoIn.cpp:107:15: error: invalid conversion from 'uint32_t {aka unsigned int}' to 'v4l2_memory' [-fpermissive]
     rb.memory = _memtype;
               ^
libraries/AP_HAL_Linux/VideoIn.cpp: In member function 'bool Linux::VideoIn::set_format(uint32_t*, uint32_t*, uint32_t*, uint32_t*, uint32_t*)':
libraries/AP_HAL_Linux/VideoIn.cpp:169:14: error: invalid conversion from 'int' to 'v4l2_buf_type' [-fpermissive]
     fmt.type = V4L2_CAP_VIDEO_CAPTURE;
              ^

Add proper casts to fix the compilation.
2015-12-18 17:56:06 +11:00
Lucas De Marchi
ba5dd88a0b AP_HAL_Linux: move mt9v117 patches inside class
Let it be a static const member instead of defining it in a header. The
problem with the header is that it will generate conflicting symbols
when more than 1 compilation unit includes it.
2015-12-18 17:56:06 +11:00
Julien BERAUD
a32738fd5f AP_OpticalFlow: Update test declaration
Declare a dummy vehicle to get a dummy ahrs. No problem since this code
is not used apart from compilation. Needed to declare an optical flow.
2015-12-18 17:56:06 +11:00
Julien BERAUD
c28a71ec63 Rover: Update Optical Flow declaration
Pass ahrs as param
2015-12-18 17:56:06 +11:00
Julien BERAUD
8e66ce6f27 Plane: Update optical flow declaration
Pass ahrs as param
2015-12-18 17:56:06 +11:00
Julien BERAUD
f897356fd9 Copter: Optflow constructor update
AHRS passed as param
2015-12-18 17:56:06 +11:00
Julien BERAUD
780104dc9c GCS_MAVLink: Fix build
Optical Flow definition is needed
2015-12-18 17:56:06 +11:00
Julien BERAUD
924a94633d AP_AHRS: Fix build
Due to interdependancy between optical flow and AHRS, it is not possible
to include full class definition which rely on each other
2015-12-18 17:56:06 +11:00
Julien BERAUD
6f55f3734c AP_HAL_Linux: Add optflow declaration
Add an empty driver for boards that are not bebop
2015-12-18 17:56:05 +11:00
Lucas De Marchi
8b21dc9b22 AP_OpticalFlow: follow coding style
- use pragma once
 - sort headers
 - add missing header - always include what you are using in the header
2015-12-18 17:56:05 +11:00
Julien BERAUD
c5cca02bc8 AP_OpticalFlow: Add support for onboard optflow
Onboard Optical flow needs to have access to the ahrs to get
correct gyro values.
Therefore the constructor takes the ahrs as a param like it is done
for other classes that need to have access to these datas
2015-12-18 17:56:05 +11:00
Julien BERAUD
eccef24fa7 AP_HAL: Add optical flow params for bebop
Params that are necessary for optical flow
2015-12-18 17:56:05 +11:00
Julien BERAUD
f13cd00e59 AP_HAL_Linux: Update namespace and private
Add new interfaces for optical flow
2015-12-18 17:56:05 +11:00
Lucas De Marchi
83c50e12ca AP_HAL_Linux: OpticalFlow_Onboard: follow coding style
- Remove commented out defines
 - Sort headers
 - Remove ifdef for HAL_BOARD_SUBTYPE_LINUX_BEBOP inside the same ifdef
 - Use AP_HAL::panic() instead of perror
 - AP_HAL::panic() message doesn't take a '\n' and there's no return
   statement after a call to this function
 - Fix pointer placement
 - Use pragma once
 - Don't initialize members to 0, it's already the default behavior of
   our custom allocator
2015-12-18 17:56:05 +11:00
Julien BERAUD
ea89308d90 AP_HAL_Linux: Add Onboard Optical Flow interface
Implementation of AP_HAL::OpticalFlow for an embedded camera sensor

There is the possibility to record video and also the gyro datas in order
to process the video off-board and debug possible issues.
2015-12-18 17:56:05 +11:00
Lucas De Marchi
db5f49f49f AP_HAL_Linux: Flow_PX4: follow coding style
- Replace tabs with spaces
 - Sort headers
 - Fix curly braces placement
 - Use pragma once
2015-12-18 17:56:05 +11:00
Julien BERAUD
0476e698af AP_HAL_Linux: Flow_PX4 interface
Implementation of the PX4 flow algorithm for ardupilot.
Based on the original PX4 Flow code, it has diverged a lot.
I have kept the license header since it is required.
I have removed all the unused and dead code on current implementation,
modified the code to make it clearer, re-indented it and changed
the way some params are calculated. It has been tested on PC and
on board and showed results that I assumed were OK. No optical flow
Loiter tests have been undertaken since it requires a Sonar which will
be added soon.

Limitations :
Some parts were written in ARM assembly and I rewrote them very naively
to get them to be more easily portable. A simple optimisation would be
to re-introduce assembly code for ARM as a separate asm file with
methods for fixed resolutions that would reduce a lot the amount of
calculation and memory read/writes. Then writing a version in NEON
assembly would even be more optimised and then maybe an Intel version.
2015-12-18 17:56:05 +11:00
Lucas De Marchi
c75704bde3 AP_HAL_Linux: VideoIn: follow coding style and minor fixes
- No need to if/else if just returning
 - Sort includes
 - Fix missing space in log message
 - When closing the fd, set it to -1. It's better to later fail the
   operation than to operate on another random file descriptor
 - Add some spaces to improve readability
 - Use pragma once
 - Do not initialize members to zero, it's already the behavior for our
   custom allocator
2015-12-18 17:56:05 +11:00