Andrew Tridgell
e6c8b61b38
HAL_Linux: resync for 4.0 update
2020-05-11 18:15:42 +10:00
Andrew Tridgell
e89750bb41
HAL_Linux: fixed bitmask error on storage erase
2020-02-05 10:51:31 +11:00
Peter Barker
79638db36b
AP_HAL_Linux: release mutex lock before calling write(c)
...
It instantly tries to take it, but we're still holding it, leading to
instant failure.
This mirrors the same code in AP_HAL_ChibiOS.
2020-02-05 10:51:28 +11:00
Patrick José Pereira
6c734b5006
AP_HAL_Linux: PCA9685: Check for device before accessing it
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-02-05 10:09:54 +11:00
Andrew Tridgell
312018898f
HAL_Linux: use AP::RC()
2019-09-06 08:51:45 +10:00
Michael du Breuil
979a431e4a
AP_HAL_Linux: Remove set_stop_pin from AnalogSource
2019-09-04 09:54:50 +10:00
Michael du Breuil
1484a12f4b
AP_HAL_Linux: Fix bad check order on heap_realloc
2019-08-27 13:54:54 +10:00
Peter Barker
914e6c5497
AP_HAL_Linux: check return value of system command
...
Compilation fails on disco without this patch as system is declared with
attribute warn_unused_result
2019-08-19 14:37:13 +10:00
Peter Barker
1b3e2e3c8b
AP_HAL_Linux: add missing override keywords
2019-08-15 15:14:23 +10:00
Mirko Denecke
bb7f80b452
AP_HAL_Linux: UARTDriver remove unused field and tabs
2019-07-21 21:52:42 -07:00
Andrew Tridgell
019f441b2f
HAL_Linux: added uartH
2019-07-12 17:01:21 +10:00
Andrew Tridgell
2bab0efc41
HAL_Linux: implement HAL_GPIO_SCRIPT support
...
this allows Linux boards to trigger an external script on GPIO
writes. This can be hooked up to relays with either RC options or
mavlink or mission items to trigger actions that can be scripted
2019-07-06 09:02:54 +10:00
Peter Barker
a9c4f1d0d5
AP_HAL_Linux: return RC protocol being decoded
2019-06-18 11:35:38 +10:00
Peter Barker
1ce2424e49
AP_HAL_Linux: add required override keyword on configure_parity
...
Also remove virtual - doesn't make sense here.
2019-05-27 09:55:18 -07:00
Andrew Tridgell
a159b01b26
AP_HAL_Linux: removed unusued AP_Common/Semaphore.h
2019-05-15 15:33:48 +10:00
Andrew Tridgell
48aacb9462
HAL_Linux: removed use of RCInput_SBUS and RCInput_115200
2019-05-02 17:58:51 +10:00
Andrew Tridgell
1c322d296f
HAL_Linux: switch Disco to using AP_RCProtocol library for RCIN
...
this is the first step to using AP_RCProtocol for most (or all) RC
input on Linux boards. It also fixes a major bug on Disco where the
old SBUS decoder didn't use strict enough timing checks to filter out
bad frames when video capture is running. That led to erratic flight
mode changes and sometimes loss of control.
2019-05-02 17:58:51 +10:00
Lucas De Marchi
5520b397c2
AP_HAL_Linux: allow disco to use RCInput_UDP
...
This allows to use any device to send RCInput to Disco via network.
Particularly this is useful when paired to additional changes on
SkyController 2 so it can be used to control Ardupilot.
This was tested with https://github.com/lucasdemarchi/dema-rc running
on SkyController 2.
2019-05-02 16:14:17 +10:00
Jeremy Feltracco
100f06614c
AP_HAL_Linux: Add support for setting uart parity on Linux boards
...
Pass set_parity down through UART class so that set_parity actually
works for Linux boards.
2019-04-26 00:49:25 -07:00
Michael du Breuil
7b7b852c75
AP_HAL_Linux: fix GCC warning in storage
2019-04-15 17:46:44 -07:00
Michael du Breuil
4a01cc1666
AH_HAL_Linux: add heap support to the HAL
2019-04-15 17:46:44 -07:00
Andrew Tridgell
6bae0960df
HAL_Linux: added empty flash driver
2019-04-11 13:22:53 +10:00
mirkix
938865da41
AP_HAL_Linux: add override to virtual method
2019-03-24 20:46:17 -07:00
Andrew Tridgell
6251353090
HAL_Linux: removed old px4io protocol header
2019-02-27 20:32:37 +11:00
Peter Barker
eb73a14da8
AP_HAL_Linux: add missing override keywords
2019-02-22 15:01:09 +00:00
Peter Barker
d89f740460
AP_HAL_Linux: AP_Common no longer gives board information; use AP_HAL_Boards
2019-02-15 08:15:45 +11:00
Tom Pittenger
95820c905d
AP_HAL_Linux: unify singleton naming to _singleton and get_singleton()
2019-02-10 19:09:58 -07:00
Aaron Wang Shi
8350943e78
AP_HAL_Linux: reduce RCInput_RPI CPU consumption to 1/4
2019-01-24 19:12:21 -08:00
Andrew Tridgell
15853adb04
build: removed remaining make.inc files
2018-12-22 11:06:59 +11:00
Randy Mackay
790a00d8a6
AP_HAL_Linux: remove debug print when SPI device not found
2018-12-06 16:50:16 +11:00
Andrew Tridgell
63705f858b
HAL_Linux: use mavlink_packetise()
2018-12-06 11:12:40 +11:00
Andrew Tridgell
48475051d9
HAL_Linux: implement get_system_id() on Linux
...
this is needed for UAVCAN dynamic node allocation
2018-11-29 16:36:29 +11:00
Andrew Tridgell
02519afdf4
HAL_Linux: fixed an error found with valgrind
...
sa_flags wasn't initialised
2018-11-27 09:38:18 +11:00
Andrew Tridgell
63556b9804
HAL_Linux: removed hal.util->new_semaphore()
...
replaced with HAL_Semaphore
2018-10-17 12:54:22 +11:00
Michael du Breuil
f506a96b7f
AP_HAL_Linux: Handle scripting priority
2018-10-09 10:08:52 +11:00
Lucas De Marchi
0990fc4400
AP_HAL_Linux: send warning to stderr
2018-09-19 23:21:13 -07:00
Peter Barker
220a3d19bf
AP_HAL_Linux: do not attempt to run examples realtime unless root
2018-09-19 22:40:20 -07:00
Peter Barker
43c07259f3
AP_HAL_Linux: break out init_realtime
2018-09-19 22:40:20 -07:00
Lucas De Marchi
ad8ab97725
AP_HAL_Linux: SPIDevice: compile out debug stuff
...
This should at most be behind a flag. If the device is being used by
other process/drivers, it's a problem with that specific user/distro:
don't penalize everybody else. Besides, changing the mode is not atomic
and nothing guarantees the other side doesn't get scheduled and change
it back before we get to run.
2018-09-08 09:47:33 -07:00
Lucas De Marchi
2c6dd64c67
AP_HAL_Linux: create one thread per spi bus rather than device
...
Do not create one thread per chardev (i.e. bus + kernel's chip select).
Since the shared resources are actually the bus controller and the bus
lines, it makes sense to have 1 thread per bus, otherwise it will just
get locked again on the mutex in the kernel side.
2018-09-08 09:47:33 -07:00
Lucas De Marchi
cf4fb09881
AP_HAL_Linux: Remove hole from SPIBus
...
Also handle a few coding style bikesheds.
2018-09-08 09:47:33 -07:00
Lucas De Marchi
4152b555fd
AP_HAL_Linux: replace kernel_cs with subdev
...
They are the same thing. Using both names however is confusing.
2018-09-08 09:47:33 -07:00
Francisco Ferreira
5b383bae16
AP_HAL_Linux: force Thread stack to have minimum size
...
Check that Thread stack size is the minimum allowed
Also add 256k to HAL-independent request stack size
2018-09-06 19:07:13 +01:00
Peter Barker
42c711a5b2
AP_HAL_Linux: remove pointless attach_interrupt override
2018-08-31 08:32:08 +10:00
Andrew Tridgell
b347027e13
HAL_Linux: added Semaphore_Recursive
2018-08-25 15:44:36 +10:00
Peter Barker
8d5a9ead48
AP_HAL_Linux: attach_interrupt now takes a functor
...
AP_HAL_Linux: add type-safety for interrupt types
2018-08-21 20:34:01 +09:00
Andrew Tridgell
f1e10b0a8f
HAL_Linux: make uart writes thread safe
2018-08-16 12:40:10 +10:00
Andrew Tridgell
f005e60066
HAL_Linux: added support for HAL_Semaphore type
2018-08-16 12:40:10 +10:00
Lucas De Marchi
5068f2e8fd
AP_HAL_Linux: fix log after tonealarm thread removal
...
../../libraries/AP_HAL_Linux/Scheduler.cpp: In member function ‘void Linux::Scheduler::_debug_stack()’:
../../libraries/AP_HAL_Linux/Scheduler.cpp:127:47: warning: format ‘%zu’ expects a matching ‘size_t’ argument [-Wformat=]
_uart_thread.get_stack_usage());
^
2018-08-12 20:29:35 -07:00
Francisco Ferreira
1d7f3e48a4
AP_HAL_Linux: remove CAN thread management
...
Also fix comment
2018-08-12 13:35:01 +01:00