Commit Graph

7953 Commits

Author SHA1 Message Date
Peter Barker 988f3277de DataFlash: 64-bit timestamps for ACCx and GYRx messages 2015-05-27 11:54:17 +10:00
Peter Barker f489f6b696 AP_InertialSensor: use 64-bit timestamps in dataflash logs 2015-05-27 11:54:17 +10:00
Peter Barker 9ae85ed9ab APM_Control/AP_AutoTune: use 64-bit timestamps for dataflash logs 2015-05-27 11:54:17 +10:00
Peter Barker 457f77314e AP_TECS: use 64-bit timestamps for dataflash logs 2015-05-27 11:54:16 +10:00
Peter Barker feb85ef7d5 AP_GPS: unused SBP struct gets 64-bit timestamp 2015-05-27 11:54:16 +10:00
Peter Barker 4d67ccb338 AP_GPS: use 64-bit timestamps for dataflash logs 2015-05-27 11:54:16 +10:00
Peter Barker 9e0b5910e2 AP_Terrain: use 64-bit timestamps for dataflash logs 2015-05-27 11:54:16 +10:00
Peter Barker 88015503ac SITL: use 64-bit timestamps for dataflash logs 2015-05-27 11:54:16 +10:00
Peter Barker 617043f468 DataFlash: convert GPS and CAM dataflash messages to 64-bit timestamps
GPS structures remove 32-bit apm_time and replace with standard time_us
Significant change to GPS and GPS2 messages:
	    Add TimeUS as first field
	    Remove T field
	    Due to length restrictions on labels:
	    	Renamed TimeMS to GMS (Gps MilliSeconds)
		Renamed Week to GWk (Gps WeeK)
		Renamed RelAlt to RAlt
Significant change to CAM messages:
	    Removed GPSTime (uin32_t), added TimeUS (uint64_t)
2015-05-27 11:54:15 +10:00
Peter Barker 769982b8f2 DataFlash: use 64-bit timestamps for dataflash logs 2015-05-27 11:54:14 +10:00
Randy Mackay 114c4f4077 AP_Match: fix example sketch 2015-05-27 09:47:24 +09: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
Sergey Kirillov 69959a4214 SerialManager: add SToRM32 serial enum and baudrates 2015-05-26 21:05:19 +09:00
Andrew Tridgell c7044c4f91 AP_Terrain: make terrain request times per channel
otherwise we can miss sending one if we send first to a channel not
being listened to
2015-05-26 17:27:51 +10:00
Andrew Tridgell 3a9d7363ea HAL_VRBRain: fixed functor comparison 2015-05-26 15:17:06 +10:00
Andrew Tridgell e589ca9b80 HAL_Flymaple: fixed functor comparison 2015-05-26 15:16:51 +10:00
Andrew Tridgell 7e264b44df HAL_Linux: fixed functor comparison 2015-05-26 15:14:50 +10:00
Andrew Tridgell 96b921d4cc AP_Scheduler: fixed example build 2015-05-26 14:37:14 +10:00
Andrew Tridgell 4fdfa47ca3 GCS_MAVLink: removed BUILD_DELEGATES code
no longer needed
2015-05-26 14:35:12 +10:00
Andrew Tridgell 8624a262e7 DataFlash: removed BUILD_DELEGATES code
no longer needed
2015-05-26 14:35:04 +10:00
Andrew Tridgell 83e6181024 AP_Vehicle: removed BUILD_DELEGATES code
no longer needed
2015-05-26 14:34:58 +10:00
Andrew Tridgell e3f8e22fc6 AP_Mission: removed BUILD_DELEGATES code
no longer needed
2015-05-26 14:34:51 +10:00
Andrew Tridgell 85f87b6d9c AP_Menu: removed BUILD_DELEGATES code
no longer needed
2015-05-26 14:34:47 +10:00
Andrew Tridgell 1a2b02a563 AP_HAL: removed AVR special case
no longer needed
2015-05-26 14:34:13 +10:00
Andrew Tridgell 7db9da6545 AP_Scheduler: removed delegate ptr handling
no longer needed
2015-05-26 14:33:30 +10:00
Andrew Tridgell edc21cfa38 AP_Compass: make having no compass backends non-fatal
thanks to Daniel for spotting this
2015-05-26 14:23:40 +10:00
Andrew Tridgell 43fb1202f2 HAL_PX4: fixed functor comparison with NULL 2015-05-26 13:54:38 +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 20ef7efaf6 AP_HAL: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:55 +10:00
Lucas De Marchi c894a1349e DataFlash: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:54 +10:00
Lucas De Marchi 6ae2591cad AP_Terrain: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:54 +10:00
Lucas De Marchi 9764bb2452 AP_Notify: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:54 +10:00
Lucas De Marchi 3aa46e3213 AP_InertialSensor: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:53 +10:00
Lucas De Marchi 4c97d92982 AP_HAL_Linux: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:53 +10:00
Lucas De Marchi 9b7c1d8f93 AP_HAL_FLYMAPLE: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:53 +10:00
Lucas De Marchi dcf992b558 AP_HAL_AVR: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:53 +10:00
Lucas De Marchi 435613de69 AP_Frsky_Telem: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:53 +10:00
Lucas De Marchi 95627cf412 AP_Compass: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:52 +10:00
Lucas De Marchi df5652fa87 AP_Baro: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:52 +10:00
Lucas De Marchi ca7db5cdc1 AP_Arming: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:52 +10:00
Lucas De Marchi cc1fbddc95 AP_Airspeed: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:52 +10:00
Lucas De Marchi f7dc19554f AP_ADC: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:51 +10:00
Lucas De Marchi 9f0af5b9cb AP_HAL: add fallback implementation of functor macros 2015-05-26 13:46:51 +10:00
Lucas De Marchi 83efb9280b AP_HAL: use variadic templates in FastDelegate
Now that we are using C++11 we can use variadic templates to simplify
the FastDelegate classes. It also simplifies moving away from the
FastDelegate implementation.
2015-05-26 13:46:51 +10:00
Lucas De Marchi 78b00784fb AP_Scheduler: allow to use functor 2015-05-26 13:46:50 +10:00
Lucas De Marchi 58847bffd6 GCS_MAVLink: allow to use functor 2015-05-26 13:46:50 +10:00