Let the variable have a random name since we are not going to reference
it. This allows more than one WITH_SEMAPHORE() per context and also to
avoid shadowing if we open inner contexts.
We don't need the specialized one inside WithSemaphore, so use the
abstract one which allows us to more easily convert between current API
and the HAL_Semaphore one.
While at it also remove additional pragma and allow constructor to
receive a pointer for convenience (we will just dereference it).
This rolls back to the simpler version of ARRAY_SIZE. The more complex
one helps catching bugs when we use pointers when we are expecting an
array, but can't stand arrays with 0 elements. I'm not aware of bugs it
actually caught on ArduPilot, although it did for me in other projects.
I think this is better than having a separate "_SIMPLE" version of the
macro and spread its usage... the trend is just to use the simpler
version anyway.
RC_Channel: To nullptr from NULL.
AC_Fence: To nullptr from NULL.
AC_Avoidance: To nullptr from NULL.
AC_PrecLand: To nullptr from NULL.
DataFlash: To nullptr from NULL.
SITL: To nullptr from NULL.
GCS_MAVLink: To nullptr from NULL.
DataFlash: To nullptr from NULL.
AP_Compass: To nullptr from NULL.
Global: To nullptr from NULL.
Global: To nullptr from NULL.
We currently check examples are buildable with waf which doesn't need
the libraries to be specified in a make.inc file. Having the makefiles
there is misleading since people try to build and realize the build is
broken.
Add system's polling infrastructure to be notified whenever a
file descriptor is ready to be read from or written to.
Adds a few classes:
* Poller, as an interface to epoll()
* Pollable, as an interface to a file descriptor
Add DEFINE prefix, since this macro is defining these operators and
remove the parameter since we will always use it to access a
union/struct as a byte array.
Revert these commits:
"AP_Common: gcc 4.9.2 behaves differently from 4.9.3"
"AP_Common: this workaround for missing/cmath is also needed for gcc 4.9.3"
This breaks the build for PX4. The change is related to the libc, not
the compiler version. We have an workaround there based on compiler
version just because it's usual to have a more recent libc version when
you have a recent compiler.