Commit Graph

29248 Commits

Author SHA1 Message Date
Lucas De Marchi ad05e0a643 APMrover2: protect version.h from inclusion and use ap_version.h 2017-09-23 21:37:45 -07:00
Lucas De Marchi 9db5d7991c AntennaTracker: protect version.h from inclusion and use ap_version.h 2017-09-23 21:37:45 -07:00
Lucas De Marchi cd81b27c05 build: protect ap_version.h from inclusion 2017-09-23 21:37:45 -07:00
Lucas De Marchi 11e47fb145 ArduSub: do not include version.h/ap_version.h
The interface provided by each vehicle should be used to get the
version.
2017-09-23 21:37:45 -07:00
Lucas De Marchi 36c80daa86 ArduPlane: do not include version.h/ap_version.h
The interface provided by each vehicle should be used to get the
version.
2017-09-23 21:37:45 -07:00
Lucas De Marchi 4ef5186733 ArduCopter: do not include version.h/ap_version.h
The interface provided by each vehicle should be used to get the
version.
2017-09-23 21:37:45 -07:00
Lucas De Marchi 27be369be7 APMrover2: do not include version.h/ap_version.h
The interface provided by each vehicle should be used to get the
version.
2017-09-23 21:37:45 -07:00
Lucas De Marchi efdc7daf96 AntennaTracker: do not include version.h/ap_version.h
The interface provided by each vehicle should be used to get the
version. The user of the macro has been converted to use that interface.
2017-09-23 21:37:45 -07:00
Lucas De Marchi 54a4a78795 AP_Common: do not include version.h/ap_version.h
The interface provided by each vehicle should be used to get the
version.
2017-09-23 21:37:45 -07:00
Lucas De Marchi 7eba6572ea ArduSub: move version to a static member
We should never include version.h or ap_version.h headers directly
on a header since this will trigger a complete rebuild of the
codebase when we commit to the repository. The ap_version.h header
is auto-generated containing information from the current commit.

If we include it in a header, every other file that ends up including
that header (directly or indirectly) will need to be rebuilt. No
ccache's cache beats having to do nothing when the header is just
not included.

version.h contains information that is kept on a struct inside
each vehicle. Rather than using the macros from each vehicle,
the getter should be preferred, which returns an AP_FWVersion
referente.
2017-09-23 21:37:45 -07:00
Lucas De Marchi 18ff17e22c ArduPlane: move version to a static member
We should never include version.h or ap_version.h headers directly
on a header since this will trigger a complete rebuild of the
codebase when we commit to the repository. The ap_version.h header
is auto-generated containing information from the current commit.

If we include it in a header, every other file that ends up including
that header (directly or indirectly) will need to be rebuilt. No
ccache's cache beats having to do nothing when the header is just
not included.

version.h contains information that is kept on a struct inside
each vehicle. Rather than using the macros from each vehicle,
the getter should be preferred, which returns an AP_FWVersion
referente.
2017-09-23 21:37:45 -07:00
Lucas De Marchi cd5b018d82 ArduCopter: move version to a static member
We should never include version.h or ap_version.h headers directly
on a header since this will trigger a complete rebuild of the
codebase when we commit to the repository. The ap_version.h header
is auto-generated containing information from the current commit.

If we include it in a header, every other file that ends up including
that header (directly or indirectly) will need to be rebuilt. No
ccache's cache beats having to do nothing when the header is just
not included.

version.h contains information that is kept on a struct inside
each vehicle. Rather than using the macros from each vehicle,
the getter should be preferred, which returns an AP_FWVersion
referente.
2017-09-23 21:37:45 -07:00
Lucas De Marchi 0c49b7a973 APMrover2: move version to a static member
We should never include version.h or ap_version.h headers directly
on a header since this will trigger a complete rebuild of the
codebase when we commit to the repository. The ap_version.h header
is auto-generated containing information from the current commit.

If we include it in a header, every other file that ends up including
that header (directly or indirectly) will need to be rebuilt. No
ccache's cache beats having to do nothing when the header is just
not included.

version.h contains information that is kept on a struct inside
each vehicle. Rather than using the macros from each vehicle,
the getter should be preferred, which returns an AP_FWVersion
referente.
2017-09-23 21:37:45 -07:00
Lucas De Marchi ecd204c45c AntennaTracker: move version to a static member
We should never include version.h or ap_version.h headers directly
on a header since this will trigger a complete rebuild of the
codebase when we commit to the repository. The ap_version.h header
is auto-generated containing information from the current commit.

If we include it in a header, every other file that ends up including
that header (directly or indirectly) will need to be rebuilt. No
ccache's cache beats having to do nothing when the header is just
not included.

version.h contains information that is kept on a struct inside
each vehicle. Rather than using the macros from each vehicle,
the getter should be preferred, which returns an AP_FWVersion
referente.
2017-09-23 21:37:45 -07:00
Lucas De Marchi 9e7bda83bf DataFlash: add temporary workaround for macro usage
Make DataFlash correctly save the git version. We should think about a
better solution, like it was done on GCSMavlink, but this is the minimal
change to make it possible to move includes of version.h to their
respective users.
2017-09-23 21:37:45 -07:00
Lucas De Marchi ec935cf0fe GCS_MAVLink: refactor send_banner() to use AP_FWVersion 2017-09-23 21:37:45 -07:00
Lucas De Marchi ed2b8d3476 GCS_MAVLink: refactor send_autopilot_verison() to use AP_FWVersion
Make the method use the getter directly to get a reference of
AP_FWVersion and work out everything that needs to be sent. This allows
us to remove ifdefs and replace with runtime if/else.

Note that there's also a bug fix: we were not setting flight_custom_version
to zero in case GIT_VERSION wasn't defined.
2017-09-23 21:37:45 -07:00
Lucas De Marchi 370e10281b AP_Common: AP_FWVersion: add pointers to git hash strings
Keeping the hash strings on this struct allow to handle them
the same way on common code and remove ifdefs.
2017-09-23 21:37:45 -07:00
cclauss a906d31c23 Tools: runplanetest.py: Resolve undefined name
Fixes: #6839

Undefined names can raise [NameError](https://docs.python.org/2/library/exceptions.html#exceptions.NameError) at runtime.
2017-09-24 13:54:58 +10:00
cclauss e5256d0bd5 Tools: TestPitchRollCoupling.py: Change usage of next()
__lit.next()__ is not Python 3 compatible but __next(lit)__ is compatible with both Python 2 and 3.
2017-09-24 12:36:03 +10:00
Peter Barker ac3cb355c4 Tools: LogAnalyzer: fix bugs, handle newer log formats
Tools: LogAnalyzer: avoid fatal error if mag data is all zeros

Tools: LogAnalyzer: correct comparisons against logdata.vehicleType

Tools: LogAnalyzer: handle logs with TimeUS in place of TimeMS

Tools: LogAnalyzer: handle logs with CTUN.ThO in place of CTUN.ThrOut

Tools: LogAnalyzer: correct motor average value
2017-09-24 12:34:23 +10:00
Peter Barker a87814b325 Tools: rename runfliptest.sh to runfliptest.py
As this is a Python script
2017-09-24 08:52:40 +10:00
cclauss d2eec2db29 Tools: runfliptest.sh: Resolve undefined name
Fixes: #6839 (partial fix)

Undefined names can raise [NameError](https://docs.python.org/2/library/exceptions.html#exceptions.NameError) at runtime.
2017-09-24 08:50:37 +10:00
cclauss d583bb9cbc Tools: update_wiki.py: fix syntax error
SyntaxError: print() is a function in Python 3
2017-09-23 21:44:56 +10:00
cclauss f266c82040 Tools: magfit_flashlog.py: fix syntax errors
SyntaxError: print() is a function in Python 3
2017-09-23 21:44:11 +10:00
Andrew Tridgell 678bd084b7 AP_Compass: added IST8310 on FMUv3 I2C 2017-09-23 08:07:18 +10:00
davidaroyer cb270a9acf AP_RangeFinder: cleanup variable names in uLanding driver 2017-09-22 18:08:27 +01:00
davidaroyer 8284fb1093 AP_RangeFinder: update uLanding driver for new firmware data format 2017-09-22 18:08:27 +01:00
fnoop 149188de12 AP_HAL: Add size() method to RingBuffer ObjectArray 2017-09-22 09:56:00 -07:00
fnoop 3ddd9a6bca AP_HAL: RingBuffer: Prefix private members with underscore 2017-09-22 09:55:49 -07:00
Andrew Tridgell 2c68b5dac3 AP_Airspeed: fixed airspeed autocal
don't use negative pressures
2017-09-22 18:24:29 +10:00
Mark Whitehorn dedb40ce0b SITL: add parameter to simulate reversed pitot tube order 2017-09-22 18:21:09 +10:00
Mark Whitehorn f32f51f843 AP_Airspeed: eliminate airspeed positive bias 2017-09-22 18:21:09 +10:00
Andrew Tridgell 9e406b87da mavlink: submodule update 2017-09-22 14:38:01 +10:00
José Roberto de Souza c6b19131ba ardupilotwaf: AeroFC: Remove unused tools
before
BUILD SUMMARY
Build directory: /home/zehortigoza/dev/ardupilot/build/aerofc-v1
Target               Text    Data  BSS    Total
------------------------------------------------
bin/arducopter       860324  2032  55220  917576
bin/arducopter-heli  844204  2028  55028  901260

after
BUILD SUMMARY
Build directory: /home/zehortigoza/dev/ardupilot/build/aerofc-v1
Target               Text    Data  BSS    Total
------------------------------------------------
bin/arducopter       852248  2024  55156  909428
bin/arducopter-heli  836120  2020  54964  893104
2017-09-21 13:40:41 -07:00
Lucas De Marchi 015242c89b Tools: add params for Aero Compute Board
These are the parameter for Aero Compute Board to fly Intel Aero RTF
without the flight controller, using just the internal sensors
on the Linux side.
2017-09-21 07:59:20 -07:00
Lucas De Marchi 3847825fba AP_HAL_Linux: make Aero use Tap ESC
This allows controlling the motors from Linux on Intel Aero RTF given
the right FPGA firmware is in place.
2017-09-21 07:59:20 -07:00
Lucas De Marchi 68b3e5ccab AP_HAL: aero: define uart RCOutput_Tap 2017-09-21 07:59:20 -07:00
Lucas De Marchi 51665a2ea9 AP_HAL: RCOutput_Tap: split baudrate set for Linux and Nuttx
On Linux (and in most of posix-like systems) the baudrate set in struct
termios via cfset[io]speed is actually the index of the standard
baudrates, it's not the baudrate per se (hence the use of B* macros).

On Linux it's possible to set the baudrate by passing the baudrate
itself to TCSETS2 ioctl.  Unfortunately it's not possible to include
asm/termbits.h and termios.h in the same compilation unit, so we need to
split it. Here we split into a Linux and a NuttX implementation.
2017-09-21 07:59:20 -07:00
Lucas De Marchi 58a76adc13 AP_HAL: RCOutput_Tap: allow different device to be used 2017-09-21 07:59:20 -07:00
Lucas De Marchi f6b1099896 AP_HAL: move in tap esc implementation
This can be shared with Linux.
2017-09-21 07:59:20 -07:00
Randy Mackay a9f257ddc6 Copter: 3.5.3 release notes 2017-09-21 11:13:02 +09:00
Andrew Tridgell 22bfec4d2a Copter: fixed motor runup check for heli
for all auto-throttle modes we should not allow a mode change to the
mode if the motor runup is not complete.

This moves the code to the set_mode() so it applies to all modes

fixes issue #6956
2017-09-21 08:52:50 +10:00
Andrew Tridgell 8cf8f3a288 Copter: fixed collective input with H_SV_MAN=1 for heli
when H_SV_MAN=1 we do direct pass-thru so the user can test swash
range. The problem is that it uses norm_input() for throttle, which
depends on RC3_TRIM. Nowhere else in heli or copter do we depend on
RC3_TRIM, so the user gets a misleading idea of behaviour when testing
their swash.
2017-09-21 08:52:50 +10:00
Ferruccio Vicari 85ab3edc5f Plane: Smoother transition to QLOITER and QLAND
Use estimated stopping position
2017-09-21 07:57:38 +10:00
Peter Barker 1a724ded2a Plane: AP_Arming: sanity-check fs timeout parameters 2017-09-20 09:46:24 -07:00
Peter Barker 3af5be76aa DataFlash: protect write fd with semaphore
If the sensor threads are using WriteBlock they may pass the _write_fd
== -1 check but then have that set to -1 by the main thread
2017-09-20 11:33:07 +01:00
mirkix 7c6be7c421 Plane: change format of reset alt target message 2017-09-20 20:28:53 +10:00
Randy Mackay 667cdcdfcf Plane: resolve compiler warning while using send_text
non-functional change
2017-09-20 12:14:38 +09:00
Randy Mackay 2073d65975 Plane: command-long DO_SET_HOME check first param is zero 2017-09-20 12:14:38 +09:00