Commit Graph

846 Commits

Author SHA1 Message Date
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
Andrew Tridgell 03b7c08be6 HAL_Linux: added duration to toneAlarm_set_buzzer_tone
required for disco
2018-07-30 14:02:12 +10:00
Jonathan Challinger ddf0333a24 AP_HAL_Linux: reflect changes to tonealarm interface 2018-07-30 14:02:12 +10:00
Aaron Wang Shi 1304d37699 AP_HAL_Linux: fix bhat GPS SPI conflict 2018-07-24 11:28:22 -07:00
Aaron Wang Shi 4f2d9c2c4d AP_HAL_Linux: support PWM input for BH hat 2018-07-20 00:32:55 -07:00
Michael du Breuil 2e135f4fc4 AP_HAL_Linux: Remove unused ADC include 2018-07-17 09:29:50 +10:00
Michael du Breuil 0aaa029f9b AP_HAL_Linux: GPIO_RPi: Fix UB when reading a pin
You can't shift by more then the word width
2018-07-11 23:09:52 -07:00
Michael du Breuil 1f7ee55211 AP_HAL_Linux: Remove GPIO::analogPinToDigitalPin() 2018-07-11 23:09:52 -07:00
Andrew Tridgell 1d1af5fd68 HAL_Linux: don't clear buffers on no baud change 2018-07-12 11:41:31 +10:00
Lucas De Marchi d2446e1219 AP_HAL_Linux: use Thread abstraction to create thread
The open coded version has the same problem fixed by Thread abstraction:
the order of the calls matters and it's easy to call in the wrong order.
Here pthread_attr_setschedparam() and pthread_attr_setschedpolicy()
should be swapped, like in 62c2f737d5 (AP_HAL_Linux: fix setting RT priorities.)
2018-07-11 10:00:29 +10:00
Lucas De Marchi e11d268818 AP_HAL_Linux: Thread: allow loose running thread 2018-07-11 10:00:29 +10:00
Jack 4b24a61023 AP_HAL_Linux: fix spelling of generated in panics 2018-07-10 09:55:01 -07:00
Andrew Tridgell 070e3cf37b HAL_Linux: implement I2C bus masks 2018-07-10 15:39:47 +10:00
Andrew Tridgell 492978c0fa HAL_Linux: removed restriction on delay in threads
threads other than the main thread should be able to sleep, but not
call the delay callback
2018-07-09 19:41:18 +10:00
Andrew Tridgell 9918ae3209 HAL_Linux: implement thread_create() 2018-07-09 19:41:18 +10:00
Andrew Tridgell 9ae6734469 HAL_Linux: support uartG 2018-06-29 08:17:38 +10:00
Lucas De Marchi 49d08ba72a Global: remove minlure
Minlure is a port of ArduPilot to Minnow Board connected to daughter
board. Very few of those were produced and nobody is flying with it.

It served its purpose and all the the improvements to ArduPilot remain
regardless of it not being supported anymore. Now it's just adding
maintenance work with no clear benefit, so pull the plug.
2018-06-26 07:32:08 -07:00
Lucas De Marchi d31e85e738 AP_HAL_Linux: fix copy and paste error on gpio table 2018-06-26 07:32:08 -07:00
Michael du Breuil 7043738f3b AP_HAL_Linux: Clear UART buffers when opening a port 2018-06-26 02:18:18 +01:00
Hyungsub 97b93920b3 AP_HAL_Linux: fix memory leaks
Fixes #8642
2018-06-18 10:30:56 +01:00
Peter Barker c9dbdd7a5c AP_HAL_Linux: clarify method name, use common methods for setting time 2018-06-15 08:01:22 +10:00
Eugene Shamaev 7dd8308a8c AP_HAL_Linux: reducing indenting by linearizing the logic 2018-06-09 22:46:48 -07:00
mirkix b32b57ad75 AP_HAL_Linux: change SPI Bus for PocketPilot final design 2018-06-07 12:28:21 -07:00
Michael du Breuil 80d1a1de9a AP_HAL_Linux: Remove timer process suspension interface 2018-06-06 07:16:58 +10:00
Michael du Breuil 737c4ac36f AP_HAL_Linux: Remove RC overrides 2018-06-05 09:51:09 +10:00
Lucas De Marchi 88dc17fe6e AP_HAL_Linux: Storage: fix initialization
Use init() to lazily create/open storage directory and keep fd open
afterwards. This avoids duplicate code opening the storage in several
places.
2018-05-24 08:00:33 -07:00
Lucas De Marchi 1f3b7b5687 AP_HAL_Linux: Storage: fix writing garbage while creating file
By the time we create the storage we hadn't still initialized the
buffer. Remove the writes during storage creation since ftruncate() will
take care of the file size aspect and MAX storage write chunk is taken
care by Linux according to the media/fs that is there.
2018-05-24 08:00:33 -07:00
Lucas De Marchi 5526997d45 AP_HAL_Linux: Storage: prefer custom storage
If ardupilot was started with --storage-directory option, use that
directory to save/load parameters.
2018-05-24 08:00:33 -07:00
Lucas De Marchi ff6e76ea6a AP_HAL_Linux: add custom storage directory 2018-05-24 08:00:33 -07:00
Lucas De Marchi 9e538632b3 AP_HAL_Linux: use AP_HAL_STORAGE_DIRECTORY
Add mkdir_p implementation copied from kmod and create the directory
with all possible components.
2018-05-24 08:00:33 -07:00
Andrew Tridgell b396b2a2e0 HAL_Linux: take account of available bytes in receive_time_constraint_us 2018-05-21 14:53:18 +10:00
Francisco Ferreira 5e821428a1 AP_HAL_Linux: remove Qualcomm board support 2018-05-17 09:57:20 +10:00
Andrew Tridgell b8eeac41c8 HAL_Linux: implement uart timestamp API 2018-05-16 18:49:22 +10:00
Michael du Breuil 517e20093e AP_HAL_Linux: Remove set_overrides() method 2018-05-11 12:13:39 +01:00
mirkix 95fbc222d5 AP_HAL_Linux: enable GPIOs for PocketPilot 2018-05-09 16:16:42 -07:00
Peter Barker d5cad015dc AP_HAL_Linux: move delay callback handling to base HAL Scheduler class 2018-05-09 16:15:38 +10:00
Andrew Tridgell 4404c95cc8 HAL_Linux: use ceilf() 2018-05-07 11:43:23 +10:00
Lucas De Marchi b1b4b66e65 AP_HAL_Linux: minlure: fix uart path
In some point in past it may have been ttyS2, but right now on kernel
4.16+ the UART is on ttyS5. We could do like is done for I2C and search
on sysfs, but it requires additional changes.
2018-05-04 11:47:04 -07:00
Lucas De Marchi 320db1d79b AP_HAL_Linux: remove unused i2c devpaths 2018-05-04 11:47:04 -07:00
Lucas De Marchi 2000e17646 AP_HAL: move get_device() method from AP_HAL_Linux
This way it's possible to use the method in platform-independent code
without a need to up cast.
2018-05-04 11:47:04 -07:00
Lucas De Marchi 4f2498947b AP_HAL_Linux: remove redundant ifdef
CONFIG_HAL_BOARD_SUBTYPE should be set in the boards header.
2018-05-04 11:42:55 -07:00
mirkix 0c353d2af0 AP_HAL_Linux: change PocketPilot to final baro sensor 2018-05-04 08:00:49 +10:00
mirkix 598ae5c3f7 AP_HAL_Linux: PocketPilot: change pru to final design 2018-05-04 08:00:49 +10:00
Mark Whitehorn 7ad0318d4f AP_HAL_Linux: fix latent bug in ToneAlarm 2018-04-10 21:48:16 +10:00
Lucas De Marchi cf3a9cddc8 AP_HAL_Linux: fix build error with flexible array
Apparently this code came in part from libuavcan that defines this
struct Control. They also had the same issue detailed on
https://github.com/UAVCAN/libuavcan/issues/116.

The solution here is much simpler though: stick to the design of cmsg()
even if it's C. As per cmsg(3), use a union together with CMSG_SPACE().
2018-03-22 00:49:58 -07:00