Commit Graph

21 Commits

Author SHA1 Message Date
Tom Pittenger 96833a0b73 AP_Vehicle: new params for pre-flare 2016-02-09 14:18:02 +11:00
Peter Barker f21774d3e8 AP_Vehicle: define vehicle type APM_BUILD_Replay 2016-01-30 12:52:51 -02:00
Gustavo Jose de Sousa 5eea2683f2 AP_Vehicle: 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:24 +10:00
Andrew Tridgell f24e69f4a0 AP_Vehicle: all vehicles now use functors 2015-06-01 15:18:32 +10:00
Andrew Tridgell 9ed0ee12fb AP_Vehicle: all vehicle types now use functors 2015-06-01 15:06:31 +10:00
Andrew Tridgell 1088e72fda AP_Vehicle: make copter use functors 2015-05-30 15:21:22 +09:00
Andrew Tridgell 83e6181024 AP_Vehicle: removed BUILD_DELEGATES code
no longer needed
2015-05-26 14:34:58 +10:00
Lucas De Marchi 0daeeb9518 ArduPlane: Start using new Functor implementation
It both reduces flash size and move symbols to read-only sections.
The scheduler_tasks table is one known not to be in read-only section before due
to the FastDelegate implementation. Before and after this patch:

	ArduPlane $ size ArduPlane.elf{.old,}
	   text	   data	    bss	    dec	    hex	filename
	 733368	   8252	  67352	 808972	  c580c	ArduPlane.elf.old
	 730632	   8236	  64792	 803660	  c434c	ArduPlane.elf

	ArduPlane $ nm -C ArduPlane.elf.old|grep scheduler_tasks
	0000000000402800 t _GLOBAL__sub_I__ZN5Plane15scheduler_tasksE
	00000000006b54c0 B Plane::scheduler_tasks

	ArduPlane $ nm -C ArduPlane.elf|grep scheduler_tasks
	0000000000490900 R Plane::scheduler_tasks

As can be seen above, now the scheduler_tasks symbol is in a read-only data
section and in all of them we decreased the total size.

For APM2 we have a little increase in the text size size.

	ArduPlane $ size ArduPlane.elf{.old,}
	   text	   data	    bss	    dec	    hex	filename
	 241940	    942	   4447	 247329	  3c621	ArduPlane.elf.old
	 242222	    942	   4431	 247595	  3c72b	ArduPlane.elf

	ArduPlane $ nm -C ArduPlane.elf.old|grep scheduler_tasks
	00001f8f T Plane::scheduler_tasks

	ArduPlane $ nm -C ArduPlane.elf|grep scheduler_tasks
	00001f8f T Plane::scheduler_tasks
2015-05-26 13:46:55 +10:00
Lucas De Marchi 84f399ec3c APMrover2: Start using new Functor implementation
It both reduces flash size and move symbols to read-only sections.
The scheduler_tasks table is one known not to be in read-only section before due
to the FastDelegate implementation. Before and after this patch:

	APMrover2 $ size APMrover2.elf{.old,}
	   text	   data	    bss	    dec	    hex	filename
	 611406	   4832	  40920	 657158	  a0706	APMrover2.elf.old
	 609686	   4824	  38936	 653446	  9f886	APMrover2.elf

	APMrover2 $ nm -C APMrover2.elf{.old,} |grep tasks
	0000000000696f80 B Rover::scheduler_tasks
	000000000047c440 R Rover::scheduler_tasks

As can be seen above, now the scheduler_tasks symbol is in a read-only data
section and in all of them we decreased the total size.

For APM2 we have a similar situation, but the table was already in text section
because it was using plain C pointers:

	APMrover2 $ size APMrover2.elf{.old,}
	   text	   data	    bss	    dec	    hex	filename
	 189518	   1038	   3494	 194050	  2f602	APMrover2.elf.old
	 189216	   1038	   3480	 193734	  2f4c6	APMrover2.elf

	APMrover2 $ nm -C APMrover2.elf{.old,} |grep tasks
	00001f92 T Rover::scheduler_tasks
	00001f8a T Rover::scheduler_tasks
2015-05-26 13:46:55 +10:00
Lucas De Marchi 4b5cf24a81 Allow to change to functor implementation
Start to add code behind APM_BUILD_FUNCTOR to support changing the
functor implementation (without breaking the build while the change is
not complete).
2015-05-26 13:46:49 +10:00
Andrew Tridgell 98d2b9b3aa AP_Vehicle: added APM_BUILD_DELEGATES macro 2015-05-21 07:48:50 +10:00
Michael du Breuil a9fc2b8a32 AP_Vehicle: Moved takeoff_throttle_max into plane parameters 2015-04-16 08:56:36 +10:00
Andrew Tridgell 8fc58d1cbe AP_Vehicle: expose LAND_FLARE_SEC in vehicle parameters for fixed wing 2015-03-15 13:52:34 +11:00
Andrew Tridgell 04b63a61bf AP_Vehicle: added stall_prevention variable 2014-11-13 14:05:22 +11:00
Andrew Tridgell c09c86868f AP_Vehicle: make APM_BUILD_TYPE() valid under arduino IDE 2014-09-03 13:28:04 +10:00
Andrew Tridgell fb4ef0b5c6 AP_Vehicle: added land_pitch_cd for fixed wing 2014-08-27 20:11:03 +10:00
Andrew Tridgell 86f167fc7f AP_Vehicle: added autotune_level to fixed wing parms 2014-04-13 22:11:28 +10:00
Andrew Tridgell fbec098e2f AP_Vehicle: added APM_BUILD_TYPE() macro
this makes checking build type less fragile
2014-03-26 12:41:53 +11:00
Andrew Tridgell 6b2f0b9553 AP_Vehicle: added defines for main vehicle types 2014-03-26 12:15:45 +11:00
Randy Mackay 0521806cc6 AP_Vehicle: add multicopter parameters 2014-02-15 05:27:32 +11:00
Andrew Tridgell 79a4bc6ea4 AP_Vehicle: added new header for parameters in multiple libraries
this adds a header where we can put vehicle specific parameters that
will be used in multiple libraries
2013-09-13 11:43:59 +10:00