Commit Graph

958 Commits

Author SHA1 Message Date
Willian Galvani
65576b7895 AP_HAL_Linux: add LEAK probe pin to Navigator gpio whitelist 2022-12-01 17:30:52 -03:00
Lucas De Marchi
78d2b0a61d AP_HAL_Linux: small fixes to cpu affinity
- Do not mention x:y form in the comment since it's not supported
  - Give more detail in the help output regarding the meaning of each form
  - No prints in the helper parse function, let the caller print it
2022-10-04 17:51:35 -03:00
HefnySco
44efff30e2 AP_HAL_Linux: cpu affinity 2022-10-04 17:51:35 -03:00
Willian Galvani
124721f42e AP_HAL_Linux: create GPIO_Navigator 2022-09-26 19:55:17 -03:00
Willian Galvani
6e14f14e09 RCOutput_PC9685: refactor write/write_gpio 2022-09-26 19:55:17 -03:00
Willian Galvani
20be1a6d44 RCOutput_PCA9685: implement gpio methods 2022-09-26 19:55:17 -03:00
Willian Galvani
a7bb57c319 AP_Hal_Linux: PCA9685: do not shutdown
Shutting down causes the pulses to be cut short, often causing
ESCs to interpret this pulse
2022-03-03 13:03:18 -03:00
Willian Galvani
251f6b0b04 HAL_Linux: update SPI speeds for Navigator
As @jaxxzer found out, if SCL goes under 1MHz, the MMC sometimes
glitches out, freezing.
2022-01-03 15:11:34 -03:00
Patrick José Pereira
ede6f3ff99 AP_HAL_Linux: Update SPIDevice for Navigator R4
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2022-01-03 11:40:48 -03:00
Willian Galvani
1d14ea4f54 HAL_Linux: RCOutput_PCA9685: implement force_safety_on/off 2022-01-03 11:40:48 -03:00
Willian Galvani
3bf4ebaa4d HAL_Linux: try to stop PWMs before shutting down due to SIGTERM 2022-01-03 11:40:48 -03:00
Mohammad Hefny
11944811df AP_HAL_Linux: define board features on Linux module 2021-11-29 19:02:38 +09:00
Siddharth Purohit
35344d1aef AP_HAL_Linux: Use HAL_CANMANAGER_ENABLED instead of HAL_ENABLE_LIBUAVCAN_DRIVERS 2021-06-24 09:02:42 +10:00
Tom Pittenger
4054b5e891 AP_HAL_Linux: AP::can().log_text() needs HAL_ENABLE_LIBUAVCAN_DRIVERS 2021-06-09 18:36:18 +10:00
Andrew Tridgell
dfc4b37df1 AP_HAL_Linux: removed perf counters 2021-06-07 14:29:27 +10:00
Andy Piper
ba96f4491d AP_HAL_Linux: allow tone alarm types 2021-05-05 17:41:24 +10:00
Andrew Tridgell
fd3bf0f639 HAL_Linux: added --defaults option to Linux HAL
useful for initial parameters
2021-04-13 09:36:52 +10:00
Jacob Walser
5537f5564c AP_HAL: update imu hardware for navigator r3 2021-04-07 15:08:18 -04:00
Jacob Walser
3a433cd71e AP_HAL: update pwm hardware for navigator r3 2021-04-07 15:08:18 -04:00
Jacob Walser
421638453f AP_HAL: update Notify LED hardware for navigator r3 2021-04-07 15:08:18 -04: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
Peter Barker
d0b3b926c0 AP_HAL_Linux: split out a calculate_thread_priority method 2021-03-30 10:49:06 +11:00
Iampete1
4315a69b9d AP_HAL_Linux: add semaphore to AnalogIn::channel to make it thread safe 2021-03-30 10:44:43 +11:00
Andrew Tridgell
0601259d20 AP_HAL_Linux: removed assert calls
these waste flash space and do not do us any good
2021-03-25 14:03:40 +11:00
Andrew Tridgell
9db0862d61 HAL_Linux: use nullptr for vnav rcinput
this makes it clearer what is going on
2021-01-20 13:49:26 +11:00
Andrew Tridgell
009cb8f62b HAL_Linux: setup RCIN for vnav 2021-01-20 10:06:45 +11:00
Andrew Tridgell
16753a51f4 HAL_Linux: use ExpandingString 2021-01-05 10:52:00 +11:00
Andy Piper
74633e55cc AP_HAL_Linux: rename system_initialized() and add is_system_initialized() 2020-12-30 18:16:59 +11:00
Andrew Tridgell
d6c5fc36d8 HAL_Linux: only init serial(0)
we should not pre-init all uarts, it wastes memory if unused
2020-12-15 10:32:46 +11:00
Andrew Tridgell
348dfeff6e HAL_Linux: use a loop for serial tick 2020-12-15 10:32:46 +11:00
Andrew Tridgell
db76eebd85 AP_HAL_Linux: convert to using hal.serial() instead of hal.uartX 2020-12-15 10:32:46 +11:00
Andrew Tridgell
78711e05b7 AP_HAL_Linux: support uartI, allowing a total of 9 uarts
this allows for OTG2 on the MatekH743 board, which makes SLCAN much
easier
2020-11-30 14:09:31 +11:00
Jacob Walser
35c2d13e2f HAL_Linux_Class: specify per board external clock frequency for RCOutput_PCA9685 drivers 2020-11-21 00:25:19 -08:00
Jacob Walser
e64d9816ce RCOutput_PCA9685: allow different external clock frequencies
The PCA9685 may use an external clock 0~50MHz
Specify the external clock frequency in constructor arguments for each board HAL
2020-11-21 00:25:19 -08:00
bugobliterator
d0cf3365ee AP_HAL_Linux: handle uninitialised soCAN file descriptor 2020-11-11 19:52:37 +11:00
Vinicius Juvinski
36204e5dae AP_HAL_Linux: Fix PWM FS to follow the Kernel's 4.X instead 3.9
Checking the ToneAlarm under AP_HAL_Linux(BBBMINI is using that)  I realize was using old kernek
3.9 device tree, so I updated to 4.X - this will affect only BBBMINI and
Blue boards.
2020-10-26 22:55:03 -07:00
bugobliterator
ba576247f0 AP_HAL_Linux: configure filter only if in filtered mode 2020-10-08 09:31:35 +11:00
Peter Barker
4ebde78bbf AP_HAL_Linux: throw warning if we ever stop-clock backwards
Also don't compile in the stop_clock symbol to make it clear changes in
this method won't affect vehicles
2020-09-15 10:02:36 +10:00
Patrick José Pereira
5746943f50 AP_HAL_Linux: Use pthread_self in place of _ctx
Avoid aproblem where _ctx is initialized in a race condition.

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-08-25 07:15:00 -07:00
Patrick José Pereira
248daa85a1 AP_HAL_Linux: Scheduler: Use pthread_* over sched_* calls for setschedparam
musl implements `sched_*` following the posix standard,
where `sched_setschedule` is used for process scheduling.
Linux implementation defines `sched_*` functions based in
the thread scheduler and not with the process.

Using `pthread_*` should be used to follow such standard.

Ref: https://pubs.opengroup.org/onlinepubs/9699919799/

From: https://www.openwall.com/lists/musl/2016/03/01/5

> ... Linux does not provide a way
> to set scheduling parameters for a _process_, only for threads. The
> sched_setscheduler syscall is documented as taking a pid but actually
> takes a thread id and only operates on that thread. glibc just ignores
> this and provides sched_* functions that do the wrong thing.

This can be fixed by using `pthread_setschedparam` and requesting the current
thread id via `pthread_self`.

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2020-08-25 07:15:00 -07:00
Siddharth Purohit
0e923fe061 HAL_Linux: add methods for native clock info methods 2020-08-19 17:31:09 +10:00
Siddharth Purohit
7de444ec53 HAL_Linux: add uavcan agnostic CANSocket Iface Driver 2020-08-19 17:31:09 +10:00
Isaac Ault
e74acba4ec AP_HAL_Linux: Allow for parameters to be passed with -G, -H
All other work has been previously implemented, however when fetching
params these values were ignored.
2020-08-10 10:03:12 +10:00
mhefny
e137698a4a AP_HAL_Linux: Fix RCInput_RPI Segmentation Fault 2020-08-08 10:01:57 -07:00
Andrew Tridgell
c5a60c31a7 HAL_Linux: fixed build warnings in RC input methods 2020-07-07 10:23:00 +10:00
Peter Barker
f3bee7fa03 AP_HAL_Linux: correct clearing of UART drivers 2020-06-03 17:00:44 +10:00
Peter Barker
1ebfc79eb0 AP_HAL_Linux: enable console for examples
Turns out we *do* need this for examples.  We're back to stuffing up
terminals where examples have been run, but that can be addressed later.
2020-05-28 13:49:47 +10:00