Andrew Tridgell
f1c6538f34
AP_HAL_Linux: use NEW_NOTHROW for new(std::nothrow)
2024-06-04 09:20:21 +10:00
Ka Ru
ce177a3637
AP_HAL_Linux: add can-zero board
2023-12-05 07:41:06 -06:00
Mohammad Hefny
9314163bb0
AP_HAL_Linux: Fix RPI check using enumerations
2023-06-17 14:44:38 +10:00
Richard Allen
90cbb6ad26
AP_HAL_Linux: Update GPIO and RCInput for pi version change
...
Update version numbers according to earlier change.
Fixes: 53c1c235b8
2023-02-22 21:10:04 -08:00
Richard Allen
693068e68a
AP_HAL_Linux: more rpi initialization checks
...
Check more mmap() call sites for failure and exit.
Also exit when starting on an unknown board.
2023-02-22 21:10:04 -08:00
Mohammad Hefny
feece150c6
AP_HAL_Linux: Raspberry 64OS Address fix
2022-12-27 10:03:41 +11:00
Mohammad Hefny
5eb28be8e6
AP_HAL_Linux: define board features on Linux module
2021-09-10 08:17:37 +10:00
MHefny
6bbfdbaf6a
AP_HAL_LINUX:fix missing setting physical address
2021-04-07 10:36:31 -07:00
MHefny
30382740d2
AP_HAL_Linux:fix code style
2021-04-07 10:36:31 -07:00
MHefny
8767112a77
AP_HAL_LINUX:remove duplicates and fix _version
2021-04-07 10:36:31 -07:00
MHefny
c57764e9b4
linux: RCInput_RPI RPI-4 Support
2021-04-07 10:36:31 -07:00
mhefny
e137698a4a
AP_HAL_Linux: Fix RCInput_RPI Segmentation Fault
2020-08-08 10:01:57 -07:00
Patrick José Pereira
3268c234d8
AP_HAL_Linux: Add PAGE_SIZE in RCInput_RPI
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-04-29 02:12:58 -07:00
Patrick José Pereira
e65cc35fb0
AP_HAL_Linux: Use template to generate raspberry pins
...
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-03-15 22:35:50 -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
Aaron Wang Shi
4f2d9c2c4d
AP_HAL_Linux: support PWM input for BH hat
2018-07-20 00:32:55 -07:00
Andrew Tridgell
8fea99e1da
HAL_Linux: use calloc in preferance to malloc
2018-01-17 11:22:05 +11:00
Georgii Staroselskii
56534b34c5
AP_HAL_Linux: use GPIO_Sysfs for Navio
...
/boot/config.txt: dtoverlay=navio-rgb should be disabled for this thing
to work, though.
2017-11-17 09:20:55 -08:00
Aaron Wang Shi
6a82e3aecd
AP_HAL_Linux: Add debug message in RCInput_RPI _timer_tick()
2017-09-25 21:11:56 -07:00
Aaron Wang Shi
ccde7cfdd4
AP_HAL_Linux: Restart RCInput_RPI DMA sampling if it stops
2017-09-25 21:10:54 -07:00
Francisco Ferreira
4398be2275
AP_HAL_Linux: remove URUS
2017-09-11 10:04:11 -07:00
Peter Barker
23d91c93c8
AP_HAL_Linux: correct compilation warning
...
../../../libraries/AP_HAL_Linux/RCInput_RPI.cpp:129:35: warning: ignoring return value of ‘ssize_t read(int, void*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
::read(file, &pageInfo, 8);
2017-08-17 11:28:36 +01:00
Lucas De Marchi
ee0f46e3aa
AP_HAL_Linux: RCInput_RPI: ignore unwanted signals
...
We are setting a termination handler for some signals which are of not
interest. Just ignore them. Ignoring SIGWINCH allows for example to
run on a screen and change the window size later without killing
ardupilot.
2017-05-23 09:09:51 +10:00
Lucas De Marchi
504de3ea9e
AP_HAL_Linux: RCInput_RPI: fix whitespaces
...
Also add/change some minor coding style issues, reducing scope of
variables.
2016-11-19 14:05:22 -02:00
Lucas De Marchi
8d3361cef4
AP_HAL_Linux: RCInput_RPI: fix using Util class on constructor
...
Program received signal SIGSEGV, Segmentation fault.
0x000b8760 in Linux::UtilRPI::get_rpi_version() const ()
(gdb) bt
#0 0x000b8760 in Linux::UtilRPI::get_rpi_version() const ()
#1 0x000b57ac in Linux::RCInput_RPI::RCInput_RPI() ()
#2 0x0000acfc in _GLOBAL__sub_I__ZN9HAL_LinuxC2Ev ()
#3 0x000e1600 in __libc_csu_init ()
#4 0x76cad228 in __libc_start_main (main=0x7efff774, argc=1994186752,
argv=0x76cad228 <__libc_start_main+168>, init=0xe15b4 <__libc_csu_init>,
fini=0xe1614 <__libc_csu_fini>, rtld_fini=0x76fdf464 <_dl_fini>,
stack_end=0x7efff774) at libc-start.c:246
#5 0x0000afa4 in _start ()
2016-11-19 14:05:22 -02:00
Lucas De Marchi
490841a814
AP_HAL_Linux: add O_CLOEXEC in places missing it
...
By opening with O_CLOEXEC we make sure we don't leak the file descriptor
when we are exec'ing or calling out subprograms. Right now we currently
don't do it so there's no harm, but it's good practice in Linux to have
it.
2016-11-07 12:37:30 -03:00
Lucas De Marchi
89420e4b2d
AP_HAL_Linux: add signal handler for normal termination
...
This allows to terminate the flight stack nicely, ensuring it returns 0
so init system can check by return code if it terminated nicely or if it
was due to a crash.
2016-11-02 16:28:20 -02:00
Lucas De Marchi
312a27dd20
AP_HAL: RCInput: rename deinit() to teardown()
2016-11-02 16:28:20 -02:00
murata
c808ee2f49
Global: To nullptr from NULL.
...
RC_Channel: To nullptr from NULL.
AC_Fence: To nullptr from NULL.
AC_Avoidance: To nullptr from NULL.
AC_PrecLand: To nullptr from NULL.
DataFlash: To nullptr from NULL.
SITL: To nullptr from NULL.
GCS_MAVLink: To nullptr from NULL.
DataFlash: To nullptr from NULL.
AP_Compass: To nullptr from NULL.
Global: To nullptr from NULL.
Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
hiro2233
cdfd057690
AP_HAL_LINUX: Added urus macro RCInput_RPI
2016-10-27 11:51:53 -02:00
Martin Evans
6f6112d7c2
AP_HAL_Linux: Add setting for GPIO for Dark board
...
Just like other RPI-based boards.
2016-10-24 10:00:24 -02:00
Staroselskii Georgii
8d2b587f71
AP_HAL_Linux: RPI: set signal handler iff nobody has already done it before
2016-07-27 21:30:19 +10:00
Staroselskii Georgii
5e8edcb1db
AP_HAL_Linux: use NSIG instead of a hardcoded number in RCInput_RPI
2016-07-27 21:30:19 +10:00
Lucas De Marchi
71e10c9132
AP_HAL_Linux: fix include order
...
Sort include alphabetically and make them in order:
Main header
system headers
library headers
local headers
While reordering, change a include of endian.h to our sparse-endian.h
which is more reliant to toolchain changes.
2016-05-18 23:05:56 -03:00
Ricardo de Almeida Gonzaga
2236640f66
AP_HAL_Linux: Fix typos
2016-05-13 19:20:06 -03:00
Lucas De Marchi
2d3a62eae3
AP_HAL_Linux: RCInput_RPI: revert PWM support
...
This reverts support for RCInput via PWM. This is causing trouble in
some RPI-based boards, receiving a SIGSEGV. Let's revert it for now and
retry this later.
This reverts commit 5629f38b2c
.
This reverts commit 51fd0b3d55
.
This reverts commit 79d56073f7
.
2016-01-18 20:07:42 -02:00
Lucas De Marchi
c8947c3e9c
AP_HAL_Linux: RCInput_RPI: provide signal information
...
Otherwise it's difficult to know what signal is causing the program to
exit.
2016-01-18 19:20:44 -02:00
Lucas De Marchi
5629f38b2c
AP_HAL_Linux: RCInput_RPI: fix use of uninitiliazed value
...
../../libraries/AP_HAL_Linux/RCInput_RPI.cpp: In member function ‘virtual void Linux::RCInput_RPI::_timer_tick()’:
../../libraries/AP_HAL_Linux/RCInput_RPI.cpp:489:127: warning: ‘x’ may be used uninitialized in this function [-Wmaybe-uninitialized]
counter = circle_buffer->bytes_available(curr_pointer, circle_buffer->get_offset(circle_buffer->_virt_pages, (uintptr_t)x));
^
2016-01-18 19:19:36 -02:00
Lucas De Marchi
51fd0b3d55
AP_HAL_Linux: RCInput_RPI: fix coding style
...
- Remove trailing whitespaces
- Remove some uneeded comments
- Fix indentation
- Replace some breaks inside the loop by checking in the loop itself
2016-01-15 00:16:14 -02:00
Aaron Wang Shi
79d56073f7
AP_HAL_Linux: support PWM input for BH hat
2016-01-15 00:16:14 -02:00
Lucas De Marchi
a803cfd1e8
AP_HAL_Linux: RCInput: use GPIO5 for PPMSUM in bhat
2016-01-07 10:28:16 -02:00
Lucas De Marchi
321803919c
Revert "AP_HAL_Linux: support PWM input for BH hat"
...
This reverts commit 8cca0beba9
.
The PWM input using the RPI DMA is causing trouble with RPI boards using
PPMSUM. Let's revert it until the solution is found. We still leave the
ifdef in RCInput for BH hat.
2016-01-07 10:27:07 -02:00
Lucas De Marchi
e0d19dc87d
AP_HAL_Linux: RCInput_RPI: fix coding style
2016-01-05 15:35:34 -02:00
Víctor Mayoral Vilches
fdf490dad1
HAL_Linux: RCInput support for PXFmini
2016-01-05 15:34:50 -02:00
Aaron Wang Shi
8cca0beba9
AP_HAL_Linux: support PWM input for BH hat
...
Support 8 PWM channels as RCInput.
2015-12-21 15:54:31 +11:00
Lucas De Marchi
2439826c19
AP_HAL_Linux: use init() method without arguments
...
Override the init() method from parent class that doesn't have a
parameter since it's not used here.
2015-12-02 14:49:11 -02:00
Caio Marcelo de Oliveira Filho
7675913d5b
AP_HAL_Linux: use millis/micros/panic functions
2015-11-20 12:31:04 +09:00
Víctor Mayoral Vilches
47d43c64ef
AP_HAL_Linux: Add RCInput_RPI, merge common code
2015-11-04 13:58:24 +11:00