Lucas De Marchi
7debd14683
AP_HAL_Linux: Scheduler: remove unused _in_io_proc
2016-02-12 23:42:34 -02:00
Lucas De Marchi
fbb3bb2fd0
AP_HAL_Linux: Scheduler: remove unused _timer_event_missed
2016-02-12 23:42:34 -02:00
Lucas De Marchi
f39a6745d1
Global: remove unused _timer_pending from scheduler
2016-02-12 23:42:34 -02:00
Lucas De Marchi
0ad436c337
AP_HAL_Linux: Scheduler: bring back scheduler table
...
Use a scheduler table to list threads' properties in a single place.
2016-02-12 23:42:34 -02:00
Lucas De Marchi
a1b62b4984
AP_HAL_Linux: Scheduler: use PeriodicThread
...
Some tasks were not accounting for the time to execute the tasks. Now
that we are using the infra from PeriodicThread all of them are.
2016-02-12 23:42:34 -02:00
Lucas De Marchi
48e81c8589
AP_HAL_Linux: Thread: add PeriodicThread helper
...
This is a helper class to run a single periodic function like the ones
used in the scheduler.
2016-02-12 23:42:34 -02:00
Lucas De Marchi
860d5aaf84
AP_HAL_Linux: Scheduler: move rpcmem initialization to setup phase
...
This was the only piece remaining in the timer thread that was used only
to setup the thread.
2016-02-12 23:42:34 -02:00
Lucas De Marchi
0282ebb8ff
AP_HAL_Linux: add method to check caller same as thread
2016-02-12 23:42:34 -02:00
Lucas De Marchi
e3beef0f77
AP_HAL_Linux: Scheduler: remove unused parameter
2016-02-12 23:42:34 -02:00
Lucas De Marchi
2b61eaf9f2
Global: remove {begin,end}_atomic from scheduler
...
These are never used and largely not implemented.
2016-02-12 23:42:34 -02:00
Lucas De Marchi
9aa49cda93
Global: remove system_initializing() from scheduler
...
This is not used anymore.
2016-02-12 23:42:34 -02:00
Lucas De Marchi
9cf9fc152b
AP_HAL_Linux: use pthread's barrier instead of polling
...
Use pthread's barrier so we don't keep waking up threads with possibly
higher priority during initialization phase.
This also synchronizes all of them to a single point. With the previous
approach it was possible (but unlikely) that a thread hadn't reach the
synchronization point when main thread signalize "system initialized".
2016-02-12 23:42:34 -02:00
Lucas De Marchi
2b0e214168
AP_HAL_Linux: Scheduler: move synchronization to common method
2016-02-12 23:42:34 -02:00
Lucas De Marchi
66e6cd60d8
AP_HAL_Linux: Thread: allow to override run method
2016-02-12 23:42:34 -02:00
Lucas De Marchi
a183ff8d32
AP_HAL_Linux: Scheduler: use Thread abstraction
2016-02-12 23:42:34 -02:00
Lucas De Marchi
3e0a83ede9
AP_HAL_Linux: add Thread abstraction class
2016-02-12 23:42:34 -02:00
Lucas De Marchi
5e9b45ebc2
AP_HAL_Linux: Scheduler: make microsleep() public
...
This will be used outside of scheduler class.
2016-02-12 23:42:34 -02:00
Lucas De Marchi
27999b339d
AP_HAL_Linux: Scheduler: include cleanups
...
While at it also remove some wrong whitespaces.
2016-02-08 13:28:31 -02:00
mirkix
5b8de06beb
AP_HAL_Linux: Enable optical flow onboard for BBBMINI
2016-02-08 08:52:10 -02:00
Lucas De Marchi
2296139516
AP_HAL_Linux: remove unused constant
2016-02-01 14:18:51 -02:00
Lucas De Marchi
21b2d5d34c
AP_HAL_Linux: AnalogIn_Raspilot: rename classes to follow other names
2016-02-01 14:18:51 -02:00
Lucas De Marchi
87e7704b1c
AP_HAL_Linux: ADS1115: rename classes to follow other names
...
While at it, remove some dead/commented-out code.
2016-02-01 14:18:51 -02:00
Lucas De Marchi
5bb2716081
AP_HAL_Linux: add name to SPI device table
...
A string name allows to more easily expand the table: the board is
responsible for the name and doesn't have to declare it as a enum or
define. It's also easier to add 2 sensors of the same type.
2016-02-01 14:18:50 -02:00
Lucas De Marchi
9d5fb97819
Global: rename enum SPIDevice to SPIDeviceType
...
Free the SPIDevice name so to have a consistent name for I2C/SPI device
classes.
2016-02-01 14:18:50 -02:00
mirkix
c622ff1539
AP_HAL_Linux: Enable AnalogIN_IIO for BBBMINI
2016-01-28 13:44:43 -02:00
mirkix
fe404c8a5d
AP_HAL_Linux: AnalogIIO: Remove unused code, add scaling for BBBMINI, rework
2016-01-28 13:44:43 -02:00
Gustavo Jose de Sousa
c2e3f05dbf
waf: ardupilotwaf: prefix build context methods with ap_
...
It helps to distinguish between things from waf and things from ardupilotwaf.
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa
a2d2661765
waf: use methods from bld instead of ardupilotwaf for the remaining
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa
3d22490397
waf: examples: use methods from bld instead of ardupilotwaf
2016-01-22 20:10:29 -02:00
mirkix
86e335b6b6
AP_HAL_Linux: Prevent buffer overflow
2016-01-19 00:14:48 -02: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
Julien BERAUD
4acc121bd6
AP_HAL_Linux: support for timesliced timers
...
In order for lower frequency timers not to be called at the same iteration
of the main timer loop. This improves scheduling.
2016-01-18 16:57:48 -02:00
Gustavo Jose de Sousa
d281067bcc
waf: make example binaries be placed in 'examples' dir
...
This commit makes examples' wscripts use ardupilotwaf.example() instead of
ardupilot.program().
2016-01-15 16:46:41 -02:00
Ricardo de Almeida Gonzaga
4c60dd5e44
AP_HAL_Linux: improve yuyv_to_grey() performance
...
Based on gbenchmark metrics.
Before:
Benchmark Time(ns) CPU(ns) Iterations
----------------------------------------------------
BM_YuyvToGrey/4k 3109 3114 233334
BM_YuyvToGrey/75k 55777 55857 12353
BM_YuyvToGrey/300k 231829 232227 3043
After:
Benchmark Time(ns) CPU(ns) Iterations
----------------------------------------------------
BM_YuyvToGrey/4k 1713 1716 411765
BM_YuyvToGrey/75k 32124 32152 21875
BM_YuyvToGrey/300k 128530 128753 5385
2016-01-15 16:43:52 -02:00
Ricardo de Almeida Gonzaga
3748760ead
AP_HAL_Linux: improve crop_8bpp() performance
...
Based on gbenchmark metrics.
Before:
Benchmark Time(ns) CPU(ns) Iterations
----------------------------------------------------
BM_Crop8bpp/64/64 3206 3197 198113
BM_Crop8bpp/240/240 38166 38181 18421
BM_Crop8bpp/640/480 193589 193317 3621
After:
Benchmark Time(ns) CPU(ns) Iterations
----------------------------------------------------
BM_Crop8bpp/64/64 2652 2657 232103
BM_Crop8bpp/240/240 33532 33506 20792
BM_Crop8bpp/640/480 187848 188201 3684
2016-01-15 16:43:52 -02:00
Ricardo de Almeida Gonzaga
210c90e784
AP_HAL_Linux: add benchmark for crop_8bpp() and yuyv_to_grey()
...
We had to check for board subtypes in the benchmark since VideoIn.cpp
does these checks.
2016-01-15 16:43:52 -02:00
Julien BERAUD
43307d95c8
OpticalFlow_Onboard: fix body rate calculation
...
The correct integral of the body rate is (rate + last_rate)/2*dt
and not rate * dt
2016-01-15 16:11:19 -02:00
Ricardo de Almeida Gonzaga
753f7d864a
AP_HAL_Linux: add a shrink by software option in OpticalFlow
...
This shrink must be used when the output camera sizes doesn't fit
the expected output.
We don't need to crop it even when the camera sizes aren't squared since
the shrink_8bpp() function shrinks a selected area.
2016-01-15 16:05:47 -02:00
Ricardo de Almeida Gonzaga
553d36c860
AP_HAL_Linux: add shrink_8bpp() to VideoIn
...
This function shrinks a selected area on a 8bpp image.
The focus in this function was the performance, so this may not be the
clearer or the most understandable way to write it. The performance
was measured using GoogleBenchmark[1].
[1] - https://github.com/google/benchmark.git
2016-01-15 16:05:47 -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
Julien BERAUD
f449107563
AP_HAL_Linux: Add Perf Lttng
...
Support for perf api using lttng.
Some additional build tricks needed for bebop because lttng uses dl_open
which is not compatible with a static link on a different libc as used
on the bebop
2016-01-14 19:13:35 -02:00
Lucas De Marchi
a3cac102cd
AP_HAL_Linux: AnalogIn_Raspilot: rename misleading variables
...
We are not doing any dma here, it's just an SPI transaction. Name them
only rx/tx (although io_packet_tx/io_packet_rx could be another option).
This also zero-initialize the struct to keep valgrind happy about not
calling ioctl() with uninitialized variables.
2016-01-11 16:03:28 -02:00
Lucas De Marchi
0cff40ed7b
AP_HAL_Linux: AnalogIn_Raspilot: remove unused debug
2016-01-11 15:58:49 -02:00
Pritam Ghanghas
60636c1653
AP_HAL_Linux: rename RaspilotAnalogIn.cpp to AnalogIn_Raspilot.cpp
2016-01-11 15:56:20 -02:00
Lucas De Marchi
1fde473afc
AP_HAL_Linux: AnalogIn_IIO: normalize names
...
Use same name for file and classes, preferring AnalogIn_IIO over
IIOAnalogIn.
2016-01-11 15:44:24 -02:00
Lucas De Marchi
be2af0877c
AP_HAL_Linux: AnalogIn_IIO: formatting fixes
...
- remove trailing whitespaces
- use pragma 0 for header guard
2016-01-11 15:44:24 -02:00
Víctor Mayoral Vilches
8195631fac
HAL_Linux: AnalogIn_IIO update reopen_pin
2016-01-11 15:44:24 -02:00