Commit Graph

267 Commits

Author SHA1 Message Date
Randy Mackay 810973ce95 HAL: define capability bitmask 2015-07-31 14:50:19 +09:00
Andrew Tridgell eca0940bc7 AP_HAL: allow for broadcast packets on UDP IPv4 2015-07-29 16:46:33 +10:00
Andrew Tridgell 3e4b0b9869 AP_HAL: added pollout() function to socket API 2015-07-29 14:19:46 +10:00
Andrew Tridgell 596ecde70d AP_HAL: added listen and accept APIs to socket API 2015-07-29 09:07:41 +10:00
Andrew Tridgell b07f7e873f AP_HAL: added pollin() interface for Socket API 2015-07-29 08:58:02 +10:00
Andrew Tridgell 5067359ed7 AP_HAL: fixed socket destructor 2015-07-29 08:39:16 +10:00
Staroselskii Georgii 1a588263e4 AP_HAL: added destructor for Socket 2015-07-29 08:34:43 +10:00
Staroselskii Georgii 4411c1fed4 AP_HAL: improved constness of Socket API 2015-07-29 08:24:24 +10:00
Vladislav Zakharov 97b51a4bcb AP_HAL: Added deinit() method to RCInput
Add a deinit() counterpart. This is needed for some ports that require some deinitializtion logic. The default implementation is empty. I'm not sure whether we need to inforce it for all.
2015-07-23 08:51:37 +10:00
Lucas De Marchi b83708f77f AP_HAL: use ARRAY_SIZE macro 2015-07-21 14:24:56 +09:00
Andrew Tridgell 4e0c2c5a9b AP_HAL: defined default log and terrain directories for bebop
the /var filesystem is wiped on boot on Bebop. Use these as a
temporary workaround
2015-07-10 16:46:31 +10:00
Julien BERAUD f0bed711cf AP_HAL: added AK8963 I2C defines 2015-07-10 14:23:18 +10:00
Julien BERAUD e0b59942b0 AP_HAL: changed log directories for bebop 2015-07-10 14:23:18 +10:00
Julien BERAUD 5c414b4ca2 AP_HAL: Fix Compass I2C address for Bebop 2015-07-10 14:23:18 +10:00
Julien BERAUD 8d6123928f AP_HAL: Add i2c bus numbers and addresses 2015-07-10 14:23:18 +10:00
Julien BERAUD bef8001a09 AP_HAL: added MS5607 baro define 2015-07-10 14:23:17 +10:00
Julien BERAUD eea7ea8488 AP_HAL: split MPU6000 INS defines for I2C and SPI 2015-07-10 14:23:17 +10:00
Julien BERAUD 7275e33e79 AP_HAL: add the possibility to have more than 1 i2c
Bebop drone has 3 i2c
2015-07-10 14:23:17 +10:00
Andrew Tridgell a6f62c208e AP_HAL: added bebop Linux board type 2015-07-10 10:22:59 +10:00
Lucas De Marchi 384d650a23 AP_HAL: allow to have spi device state 2015-07-06 10:48:06 +10:00
Víctor Mayoral Vilches e5a90c7a34 AP_HAL: Util, add custom terrain and log methods 2015-06-30 14:36:00 +10:00
Gustavo Jose de Sousa 42eb73a1d1 AP_InertialSensor: add LSM9DS0 backend
This adds the backend driver for LSM9DS0. This implementation is based on the
legacy driver coded by Víctor Mayoral Vilches (under folder LSM9DS0) and makes
some necessary adaptations and fixes in order to work properly. The legacy
driver folder was removed.
2015-06-30 10:27:46 +10:00
Andrew Tridgell 7f239f5d46 AP_HAL: added get_shell_stream() 2015-06-17 17:04:15 +10:00
Eugene Shamaev 8cb367eaf8 AP_HAL: added rc_bind rcin method 2015-06-10 17:19:08 +10:00
Andrew Tridgell 979a571d68 AP_HAL: fixed example build 2015-06-10 09:27:41 +10:00
Andrew Tridgell c44ab01be8 AP_HAL: use noreturn attribute on panic
should reduce coverity warnings
2015-06-08 21:09:08 +10:00
Eugene Shamaev ca482cf44a StorageManager: added example sketch 2015-06-08 10:05:05 +09:00
Max Basescu de50217809 AP_HAL: Added RC_OUTPUT_MIN_PULSEWIDTH set to 400 and RC_OUTPUT_MAX_PULSEWIDTH set to 2100
For use in AP_HAL_AVR in RCOutput_APMx
2015-06-05 21:03:03 +10:00
Lucas De Marchi 1d39f548dc AP_HAL: remove aliases FUNCTOR_[BIND|TYPEF]_VOID
Nobody is using them anymore, so kill them.
2015-06-04 13:37:41 +09:00
Andrew Tridgell 5c86005160 AP_HAL: removed spurious delay example 2015-06-01 17:28:45 +10:00
Andrew Tridgell 1bd61ae96e AP_HAL: no need to include AP_Vehicle_Type.h here any more 2015-06-01 17:28:24 +10:00
Andrew Tridgell 36b19b26ce AP_HAL: convert example from .pde to .cpp 2015-06-01 17:03:40 +10:00
Andrew Tridgell 4dd47ead0e AP_HAL: removed old fastdelegate code 2015-06-01 15:18:30 +10:00
Andrew Tridgell ac3fc2f373 AP_HAL: fixed build warnings 2015-05-30 22:51:09 +10:00
Andrew Tridgell 4705be97bf AP_HAL: support %lld and %llu in internal printf
useful for log messages with 64 bit timestamps
2015-05-27 11:54:17 +10:00
Andrew Tridgell 1a2b02a563 AP_HAL: removed AVR special case
no longer needed
2015-05-26 14:34:13 +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 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 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
Lucas De Marchi a1e1503e1a AP_HAL: Add Functor implementation
This is a Functor implementation that should cover the use cases we have
for FastDelegate. In contrary to the latter, it can be constructed at
compile time so the compiler can safely put it in a read-only section
which covers the cases in which we are not using it.
2015-05-26 13:46:49 +10:00
Andrew Tridgell 9336914598 AP_HAL: added sendto socket method 2015-05-22 16:07:44 +10:00
Andrew Tridgell d57fcf7e46 AP_HAL: added workaround for AVR delegates in PROGMEM 2015-05-21 07:48:45 +10:00
Andrew Tridgell be587beedc AP_HAL: disable nagle on sockets for faster local operation 2015-05-21 07:48:45 +10:00
Randy Mackay 0d72f3ac29 AP_HAL: fix example sketches 2015-05-12 14:42:15 +09:00
Andrew Tridgell 414f4125de AP_HAL: use FD_CLOEXEC to prevent sockets being inherited in SITL 2015-05-11 08:05:51 +10:00
Andrew Tridgell 692fc18698 AP_HAL: protect Socket.h from double include 2015-05-10 21:02:04 +10:00
Tom Pittenger 4b6d0d8e24 AP_HAL: replace fabs() with fabsf() 2015-05-09 09:57:26 +10:00
Andrew Tridgell 2369e06815 AP_HAL: fixed SITL build on windows 2015-05-06 09:07:03 +10:00