Commit Graph

20 Commits

Author SHA1 Message Date
Lucas De Marchi d3b5089a12 AP_HAL_VRBRAIN: UARTDriver: remove commented out code
This is not working and there's no reason to keep it around.
2016-10-27 10:35:01 -03:00
Lucas De Marchi 80cf1207b7 AP_HAL_VRBRAIN: UARTDriver: fix writting with failures
When the buffer wraps and we do it in 2 steps, we can't actually do the
second part if it fails or if we wrote less bytes than we intended,
otherwise we will corrupt the data being sent.
2016-10-27 14:23:43 +11:00
Lucas De Marchi 68fc08fe52 AP_HAL_VRBRAIN: fix resetting TX buffer
We can't give the TX buffer 16 bytes more since next time begin() is
called it will compare the buffer size to the value the caller is trying
to set.  In this case we would free and alloc the buffer again each time
begin was called.
2016-10-27 14:23:43 +11:00
Murilo Belluzzo e8bfcf02a0 VRBRAIN 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.

While at it, just like in the write case, explain why we are stopping.
2016-10-27 14:23:43 +11:00
Mathieu OTHACEHE 152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Murilo Belluzzo 0b86532b5c Global: Remove '\r' character from all source code files 2016-10-03 22:13:27 -03:00
LukeMike fde5992b6d VRBRAIN: updated AP_HAL_VRBRAIN 2016-08-07 20:31:50 +10:00
Murilo Belluzzo 077e03678f Global: Adapt Stream class to be used with Ringbuffer 2016-08-03 01:44:02 -03:00
Caio Marcelo de Oliveira Filho 2314578f6f AP_HAL_VRBRAIN: use millis/micros/panic functions 2015-11-20 12:31:28 +09:00
Brad Bosch 3ad0188488 HAL_VRBrain: Rework of support for FLOW_CONTROL_AUTO from PX4 HAL 2015-08-19 15:21:19 +10:00
Lucas De Marchi c47df44f44 AP_HAL_VRBRAIN: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Gustavo Jose de Sousa f714540d8b AP_HAL_VRBRAIN: 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
Tom Pittenger ee1a415baa HAL_VRBrain: fix compile warning re member init order 2015-04-24 14:14:27 +09:00
Jonathan Challinger 59cf1c29ff AP_HAL_VRBRAIN: attempt to initialize USB while soft-disarmed 2015-02-11 20:57:28 +11:00
Andrew Tridgell 9d3a9c20a8 HAL_VRBrain: use common RingBuffer.h 2015-01-07 08:41:14 +11:00
Andrew Tridgell b3894e8b10 HAL_VRBRAIN: reduce the number of times we split up UART reads and writes 2014-10-09 12:29:25 +11:00
Andrew Tridgell e143acd8bf HAL_VRBRAIN: minimise use of hrt_absolute_time() 2014-08-20 09:10:24 +10:00
Andrew Tridgell 21ff578cb0 HAL_VRBrain: prevent read past end of buffer 2014-08-19 10:08:17 +10:00
LukeMike 8f552d5758 VRBRAIN: Changed the management of VirtualRobotix's boards. 2014-06-19 11:27:38 +02:00
Emile Castelnuovo 201332caef AP_HAL: New VRBRAIN board definition and libraries 2014-04-08 16:19:19 +10:00