Commit Graph

28 Commits

Author SHA1 Message Date
Andrew Tridgell 22de99dd58 HAL_Linux: implement _timer_tick in UARTDriver 2018-02-07 20:33:45 +11:00
Murilo Belluzzo ce81c45f80 AP_HAL_Linux: UARTDriver: Make use of ByteBuffer class
This patch replaces the 'old style' ringbuffer by the ByteBuffer class.
An effort was made to keep the exchange as close as possible from a
drop-in replacement to minimize the risk of introducing bugs.

Although the exchange opens opportunities for improvement and
simplification of this class.
2016-10-27 14:23:42 +11:00
Murilo Belluzzo 077e03678f Global: Adapt Stream class to be used with Ringbuffer 2016-08-03 01:44:02 -03:00
Lucas De Marchi f36e8d9c05 AP_HAL_Linux: remove AP_HAL_Linux_Namespace header
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.
2016-07-29 20:25:03 -03:00
Staroselskii Georgii 7b3a5e3158 AP_HAL_Linux: use factory method for creation of UARTDriver backends
Using factory method maked it easier to grasp the lifetime of all object
that get created and destroyed. Instead of spanning this thoughout whole
source file we have it nicely encapsulated in this a little horrendeous
_parseDevicePath that is of course to improve more.
2016-07-15 15:29:05 -03:00
Staroselskii Georgii e7a5945056 AP_HAL_Linux: make flow_control a property of SerialDevice rather than UARTDriver's
Make it possible to change flow control settings for individual devices.
2016-07-15 15:26:49 -03:00
Staroselskii Georgii 897d2fb1fb AP_HAL_Linux: use OwnPtr for _device in UARTDriver
Otherwise we're going to leak memory without any need.
Before this fix we've created ConsoleDevice 4 times in case -A switch hadn't been supplied,
but we hadn't ever deleted those. Now there's no memory leak here.
2016-07-15 15:22:51 -03:00
Andrew Tridgell 72b5cecdb2 HAL_Linux: added udpin support to HAL_Linux
useful for setting up ardupilot as a mavlink UDP listener
2016-06-28 21:01:43 +10:00
Lucas De Marchi 705393b30c AP_HAL_Linux: replace header guard with pragma once 2016-02-18 14:52:35 -02:00
Andrew Tridgell dc8a3bbf92 HAL_Linux: added qflight board subtype 2015-12-27 16:12:27 +11:00
Lucas De Marchi 2ac96b942c AP_HAL_Linux: remove prefix from AP_HAL_Linux classes
We have already a Linux namespace, so there's no need to prefix Linux on
all names.
2015-10-21 10:11:19 +11:00
Lucas De Marchi 54c2c5f682 AP_HAL_Linux: use method for downcast
Instead of just doing a static cast to the desired class, use a method
named "from". Pros:

  - When we have data shared on the parent class, the code is cleaner in
    child class when it needs to access this data. Almost all the data
    we use in AP_HAL benefits from this

  - There's a minimal type checking because now we are using a method
    that can only receive the type of the parent class
2015-09-23 09:01:29 +10:00
Gustavo Jose de Sousa 124b750c10 AP_HAL_Linux: 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:28:43 +10:00
Andrew Tridgell b99740cb93 HAL_Linux: sped up UDP transfers by about 25x
allow more than 1 packetised transfer per tick
2015-07-29 14:19:46 +10:00
Staroselskii Georgii a3f47878a2 AP_HAL_Linux: made UARTDriver use TCPServerDevice 2015-07-29 08:36:08 +10:00
Staroselskii Georgii 6e34dd9669 AP_HAL_Linux: got rid of TCP connection 2015-07-29 08:36:07 +10:00
Staroselskii Georgii 656399541f AP_HAL_Linux: encapsulated LinuxUARTDriver::_deallocate_buffers 2015-07-29 08:36:06 +10:00
Staroselskii Georgii f117134443 AP_HAL_Linux: made UARTDriver use UARTDevice 2015-07-29 08:36:05 +10:00
Staroselskii Georgii dacbdb57c4 AP_HAL_Linux: added _serial_start_connection 2015-07-29 08:36:05 +10:00
Staroselskii Georgii 44198bd4eb AP_HAL_Linux: encapsulated LinuxUARTDriver::allocate_buffers 2015-07-29 08:36:04 +10:00
Víctor Mayoral Vilches 309511dc08 HAL_Linux: UARTDriver, const device_path
Class member set to const and set_device_path
accepts a const char* now.
2015-06-30 14:36:00 +10:00
Staroselskii Georgii e4a21f291d AP_HAL_Linux: added LinuxSPIUARTDriver that can handle SPI-driven Ublox 2015-01-07 08:41:12 +11:00
Andrew Tridgell 076bb1294e HAL_Linux: improved UDP packetisation and add flow control reporting
report we have flow control on UDP and TCP
2014-10-09 12:29:25 +11:00
Andrew Tridgell e0e534628b HAL_Linux: support direct UDP output from UART drivers
this allows safe operation over WiFi links without MAVProxy
2014-10-06 15:13:03 +11:00
Víctor Mayoral Vilches be68de20f1 HAL_Linux: UART-like TCP sockets impl. on AP_HAL_Linux 2014-07-14 09:31:30 +10:00
Andrew Tridgell bbac3265b2 HAL_Linux: default to hal.console on stdout 2013-10-01 12:49:58 +10:00
Andrew Tridgell 1e786b3e20 HAL_Linux: added buffering on the UARTs 2013-09-29 12:04:36 +10:00
Andrew Tridgell 4ba044c441 AP_HAL_Linux: initial Linux AP_HAL 2013-09-28 21:24:01 +10:00