We aren't going to use all the poller infra for now and we need it's
behavior a little bit different for what we are going to use:
- Do not use any "fair" time for each ready fd since we don't want
to set a timeout
- Allow to set the fd on Pollable after constructing it since we are
likely to embed Pollable inside other structs and just later be
able to open an fd.
- Let caller use the epoll flags directly - this is not in AP_HAL,
so there's no need to abstract them
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
../../libraries/AP_HAL_Linux/SPIDevice.cpp: In member function ‘virtual AP_HAL::OwnPtr<AP_HAL::SPIDevice> Linux::SPIDeviceManager::get_device(const char*)’:
../../libraries/AP_HAL_Linux/SPIDevice.cpp:337:27: warning: comparison is always false due to limited range of data type [-Wtype-limits]
for (uint8_t i = 0; i < _n_device_desc; i++) {
~~^~~~~~~~~~~~~~~~
Define a dummy device to remove warning.
This centralized private header encourages centralizing things on
umbrella headers that are a pain to maintain. Force each part of
AP_HAL_Linux to include what is used.
Make some member variables protected to follow what we do in other
places (and there's no reason to be private).
Move defines to .cpp to reduce their visibility.
This centralized namespace header encourages centralizing things on
umbrella headers that are a pain to maintain. Force each part of
AP_HAL_Linux to include what is used.
While at it, do some whitespace cleanups and minor changes to adhere to
coding style.
This is selectable by a define and is never changed. Just remove
everything referencing it: we can come up with a better solution if it
is actually used later.
There's little point in having the Linux::AnalogIn just to implement and
empty interface. All implementations inside AP_HAL_Linux are already
inheriting directly from AP_HAL, so just remove it.
In a case ArduPilot is launched as a background process without
detaching with *nohup* like this ./arduplane -C /dev/ttyAMA0 ConsoleDevice
is created and an attempt to read from it is made. This yields in a stopped
process. This is an endeavour to overcome this problem.