Commit Graph

21875 Commits

Author SHA1 Message Date
Andrew Tridgell
2a7edfd3d1 Plane: fixed setting of failsafe for motors in quadplane 2016-05-07 07:25:33 +10:00
Andrew Tridgell
ab0b76764f RC_Channel: added set_servo_failsafe_pwm() 2016-05-07 07:25:27 +10:00
Andrew Tridgell
46f257fd9b DataFlash: convert Log_Write() to use a linked list
this saves some memory and means we don't need to know how many we
will need in advance
2016-05-07 07:21:16 +10:00
Andrew Tridgell
9a1cbff850 DataFlash: allow access to DataFlash instance as a static singleton 2016-05-07 07:21:16 +10:00
Peter Barker
11dd254498 DataFlash: Log_Write optimisations 2016-05-07 07:21:16 +10:00
Peter Barker
cf15bb5f6e DataFlash: AllTypes example also covers Log_Write 2016-05-07 07:21:16 +10:00
Peter Barker
b273514cf9 DataFlash: create example outputting all field types 2016-05-07 07:21:16 +10:00
Peter Barker
518fabe035 DataFlash: StopLogging method, virtual stop_logging on backends 2016-05-07 07:21:16 +10:00
Peter Barker
77dd170e03 DataFlash: Log_Write support
A generic logging method to avoid the need to set up a format and structures etc
2016-05-07 07:21:16 +10:00
Peter Barker
334af1ecd7 DataFlash: base class method for resetting state on log open 2016-05-07 07:21:16 +10:00
Peter Barker
eea2d5dcb5 DataFlash_File: avoid integer wrap when checking minimum time 2016-05-07 07:21:15 +10:00
Michael Day
b096e1404d Plane: Add MAVLink message handler for CMD_DO_CHANGE_SPEED 2016-05-06 11:59:45 -07:00
Michael Day
62a7074dd7 AP_Mission: Added mavlink_cmd_long_to_mission_cmd method. 2016-05-06 11:59:44 -07:00
Charles Pippin
a14bdf949a Adding Lee Field to locations.txt 2016-05-06 13:50:58 -04:00
Lucas De Marchi
ddbce5b130 waf: change mavgen generation to blue
Like other generators in px4.
2016-05-06 13:11:28 -03:00
Lucas De Marchi
fea084a596 Global: use ap_version.h
This header is used by waf to contain the generated version macros,
particularly using the git hash. For waf it's better to be in a separate
header since it then can keep track of changes on it a trigger
recompilation.

For the make build system, a dummy ap_version.h file has been added in
the missing/ folder so both implementations can co-exist.
2016-05-06 13:11:28 -03:00
Lucas De Marchi
9e3ec3a16d waf: define git versions in a generated ap_version.h header 2016-05-06 13:11:28 -03:00
Lucas De Marchi
baa287e5e5 ArduPlane: use separate header for version macro
Having the version macro in the config.h and consequently in the main
vehicle header means that whenever the version changes we need to
compiler the whole vehicle again. This would not be so bad if we weren't
also appending the git hash in the version. In this case, whenever we
commit to the repository we would need to recompile everything.

Move to a separate header that is include only by its users. Then
instead of compiling everything we will compile just a few files.
2016-05-06 13:11:28 -03:00
Lucas De Marchi
352e103f1a ArduCopter: use separate header for version macro
Having the version macro in the config.h and consequently in the main
vehicle header means that whenever the version changes we need to
compiler the whole vehicle again. This would not be so bad if we weren't
also appending the git hash in the version. In this case, whenever we
commit to the repository we would need to recompile everything.

Move to a separate header that is include only by its users. Then
instead of compiling everything we will compile just a few files.
2016-05-06 13:11:28 -03:00
Lucas De Marchi
d3ee998fa6 APMrover2: use separate header for version macro
Having the version macro in the config.h and consequently in the main
vehicle header means that whenever the version changes we need to
compiler the whole vehicle again. This would not be so bad if we weren't
also appending the git hash in the version. In this case, whenever we
commit to the repository we would need to recompile everything.

Move to a separate header that is include only by its users. Then
instead of compiling everything we will compile just a few files.
2016-05-06 13:11:28 -03:00
Lucas De Marchi
49a46e463f AntennaTracker: use separate header for version macro
Having the version macro in the config.h and consequently in the main
vehicle header means that whenever the version changes we need to
compiler the whole vehicle again. This would not be so bad if we weren't
also appending the git hash in the version. In this case, whenever we
commit to the repository we would need to recompile everything.

Move to a separate header that is include only by its users. Then
instead of compiling everything we will compile just a few files.
2016-05-06 13:11:28 -03:00
Lucas De Marchi
1238c872a9 AP_Common: remove unused Arduino.h header 2016-05-06 13:11:27 -03:00
Thomas Lu
2363c92c30 readme: fix link to CONTRIBUTING.md 2016-05-06 11:33:41 -03:00
Allan Matthew
d6012c535e Copter: remove unused dt passed to precland 2016-05-06 11:04:45 +09:00
Allan Matthew
d01db0edd6 AC_PrecLand: remove PI controller, speed limits as they are unused 2016-05-06 11:04:12 +09:00
skyscraper
6bcd9e6f65 Copter::pre_arm_rc_checks: fix logic checking that throttle min and max are configured 2016-05-06 10:56:38 +09:00
skyscraper
134ea338da RC_Channel: remove unused control_mix method 2016-05-05 18:58:17 -03:00
Rimvydas Naktinis
3c00324fd2 Plane: Parachute uses altitude above ground (not home) to check suitability for deployment. 2016-05-05 09:02:25 -07:00
Rimvydas Naktinis
9fdf39baf0 Plane: Added a method that returns current altitude relative to terrain, if available, or home otherwise. 2016-05-05 09:02:20 -07:00
Andrew Tridgell
9c4dd024bf AP_NavEKF2: auto change EK2_GPS_TYPE for NMEA
this fixes a problem where users of NMEA GPS receivers could not arm
with default EK2 parameters.
2016-05-05 19:46:33 +10:00
Peter Barker
75c965f512 sim_vehicle.py: interface improvements based on feedback; waf support
sim_vehicle.py: improve output of executed commands

Emit something that could be copy-and-pasted into a shell

sim_vehicle.py: allow specification of multiple gdb breakpoints

sim_vehicle.py: understand some specific mavproxy options

sim_vehicle.py: validate vehicle, throw warning if it looks suspect

sim_vehicle.py: avoid use of psutil (cygwin not supported)

sim_vehicle.py: rename build_target to make_target

sim_vehicle.py: pass vehicle binary to start_vehicle

sim_vehicle.py: waf build system support

sim_vehicle.py: use waf by default
2016-05-05 10:59:08 +10:00
Andrew Tridgell
826cb0887a AP_SerialManager: changed default for SERIAL4_PROTOCOL to 5
this makes it a documented protocol number. No functionality change
2016-05-05 08:08:30 +10:00
Allan Matthew
25c8027606 Plane: handle new MAVLink rangefinder input 2016-05-04 08:40:34 -07:00
Lucas De Marchi
cf11776150 AP_HAL: fix signed and unsigned comparison warning
../../libraries/AP_HAL/examples/Printf/Printf.cpp:63:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (ret != strlen(float_tests[i].result)) {
                 ^
...

ardupilot/modules/gtest/include/gtest/gtest.h:1448:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (expected == actual) {
                ^
And similar ones.
2016-05-04 08:58:37 -03:00
Lucas De Marchi
9ac63d7128 AP_HAL: examples: fix coding style 2016-05-04 08:58:37 -03:00
Lucas De Marchi
c82f28f35a Tools: CPUInfo: fix warnings on printf
../../Tools/CPUInfo/CPUInfo.cpp:21:54: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
  hal.console->printf("char      : %d\n", sizeof(char));
                                                      ^
And so on.

Ideally for sizeof() which returns size_t we would use %zu, but that's not
implemented by our version of printf. So use %lu which should be ok in all of
our boards.
2016-05-04 08:58:37 -03:00
Lucas De Marchi
2c029ae1f9 waf: fix undef warnings in examples
Fix warnings like this:

<command-line>:0:21: warning: "APM_BUILD_DataFlash_test" is not defined [-Wundef]
/home/lucas/p/dronecode/ardupilot/libraries/AP_Vehicle/AP_Vehicle_Type.h:36:41: note: in expansion of macro ‘APM_BUILD_DIRECTORY’
 #define APM_BUILD_TYPE(type) ((type) == APM_BUILD_DIRECTORY)
                                         ^
These happen because we are trying to set APM_BUILD_DIRECTORY to undefined
values. We should rather default to the APM_BUILD_DIRECTORY ==
APM_BUILD_UNKNOWN
2016-05-04 08:58:37 -03:00
Lucas De Marchi
b5d3094738 AP_ADC: fix warning on printf
../../libraries/AP_ADC/examples/AP_ADC_test/AP_ADC_test.cpp: In function ‘void show_timing()’:
../../libraries/AP_ADC/examples/AP_ADC_test/AP_ADC_test.cpp:61:88: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint32_t {aka unsigned int}’ [-Wformat=]
     hal.console->printf("timing: mint=%lu maxt=%lu avg=%lu\n", mint, maxt, totalt/count);
                                                                                        ^
../../libraries/AP_ADC/examples/AP_ADC_test/AP_ADC_test.cpp:61:88: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint32_t {aka unsigned int}’ [-Wformat=]
../../libraries/AP_ADC/examples/AP_ADC_test/AP_ADC_test.cpp:61:88: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint32_t {aka unsigned int}’ [-Wformat=]
2016-05-04 08:58:37 -03:00
Randy Mackay
53785d1f72 AP_RangeFinder: add Bebop and MAVLink types
Thanks OXINARF!
2016-05-04 15:00:48 +09:00
Randy Mackay
96f665061e AP_RangeFinder: call handle_msg for all backends 2016-05-04 12:10:58 +09:00
Randy Mackay
9b940687c1 AP_RangeFinder: rename CompanionComputer files to MAVLink 2016-05-04 12:10:58 +09:00
Randy Mackay
c541cb27f8 AP_RangeFinder: rename CompanionComputer to MAVLink 2016-05-04 12:10:58 +09:00
Allan Matthew
7960e3bb8f Copter: pass DISTANCE_SENSOR messages to rangefinders
This allows the MAVLink range finder driver to intercept distance measurements
2016-05-04 12:10:58 +09:00
Allan Matthew
d3831e4a5d RangeFinder: add MAVLink rangefinder 2016-05-04 12:10:58 +09:00
Andrew Tridgell
7cdab2a6c9 SITL: FlightAxis can support 8 channels 2016-05-04 13:05:43 +10:00
Andrew Tridgell
9081310ff1 HAL_SITL: support simulator RC input 2016-05-04 12:51:28 +10:00
Andrew Tridgell
3b0cd9f101 SITL: added RC input from FlightAxis
use the interlink controller for input for 6 channels
2016-05-04 12:51:27 +10:00
Julien Beraud
3897e03d39 Frame_params: fix Bebop param names
Broken by AP_Motors refactoring
2016-05-04 10:09:31 +09:00
Lucas De Marchi
5b88ae90fd waf: be compatible with git < 1.8.5
The -C option was added to git in version 1.8.5 which is not available
in Ubuntu 12.04.
2016-05-03 18:02:32 -03:00
Julien Beraud
33a699f29c AP_RangeFinder: Add support for bebop Rangefinder
This rangefinder uses an spi device to send pulses and an iio driver
in buffer mode to get data
The data is then analyzed and the maximum pulse received is considered to
represent the echo of the pulses that have been sent. The distance in time
between the pulse that is sent and the pulse with the maximum amplitude
is used to calculate the altitude based on the speed of sound.

There is a dependency with libiio, and in order to build, there is a need
to provide a rootfs that includes libiio.a.
The other solution is to build dynamically after having updated the rootfs
to use on compiled with a more recent toolchain and include libiio
2016-05-03 16:43:39 -03:00