Commit Graph

20 Commits

Author SHA1 Message Date
José Roberto de Souza 5ff67a41a1 AP_HAL_Linux: Implement perf API
Initial implementation of perf API on Linux, for now just saving
perf data, in a further patch this data will be exported.
2015-11-13 12:16:19 +11:00
Lucas De Marchi 392879112e AP_HAL_Linux: document functions to write file
Document function and add attributes to mark then as printf- and
scanf-like functions.
2015-11-10 17:05:34 +11:00
José Roberto de Souza 39bd5fa80e AP_HAL_Linux: Add PWM_Sysfs
This class makes easy to use Linux PWM sysfs interface, available since
Linux 3.10.

More information https://www.kernel.org/doc/Documentation/pwm.txt
2015-11-10 17:05:34 +11:00
Andrew Tridgell 883ac59e4a HAL_Linux: always report 256k of available memory 2015-11-05 16:09:00 +11:00
Lucas De Marchi 2ac96b942c AP_HAL_Linux: remove prefix from AP_HAL_Linux classes
We have already a Linux namespace, so there's no need to prefix Linux on
all names.
2015-10-21 10:11:19 +11:00
Julien BERAUD ffbb892a01 AP_HAL_Linux: add support for a pwm heater
It uses a heating resistor controlled by a pwm.
By changing the duty cycle of the pwm, we can control the temperature.
A simple PI algorithm is used in order to get to the correct temperature
fast enough and without too much overshoot
It is implemented as a member of the Util class in order not to make to much
modification to the current codebase
2015-10-06 15:21:39 +11:00
Lucas De Marchi 54c2c5f682 AP_HAL_Linux: use method for downcast
Instead of just doing a static cast to the desired class, use a method
named "from". Pros:

  - When we have data shared on the parent class, the code is cleaner in
    child class when it needs to access this data. Almost all the data
    we use in AP_HAL benefits from this

  - There's a minimal type checking because now we are using a method
    that can only receive the type of the parent class
2015-09-23 09:01:29 +10:00
Gustavo Jose de Sousa 124b750c10 AP_HAL_Linux: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:28:43 +10:00
Andrew Tridgell a3c7297d8e HAL_Linux: fixed setting of custom directories 2015-06-30 15:08:10 +10:00
Víctor Mayoral Vilches 2e7a4aa1e6 HAL_Linux: Implement custom dir. methods 2015-06-30 14:36:42 +10:00
Víctor Mayoral Vilches 790f4ec56c HAL_Linux: Util fix indentation 2015-06-30 14:35:59 +10:00
Lucas De Marchi acc571c2c5 AP_HAL_Linux: add function to check if path is chardev
Utility function to allow checking if a certain path is a character
device.
2015-06-30 09:10:54 +10:00
Víctor Mayoral Vilches 974f243c7e HAL_Linux: Add set_system_clock 2015-01-22 15:43:16 +11:00
bugobliterator 329c1f5190 HAL_Linux:create ToneAlarmDriver as a separate class
ToneAlarm is now declared as a separate class instance of which is added as a private member of LinuxUtil
Some minor fixes in this patch include changing return type of tonealarm_init() to bool and use dprintf
2014-11-15 16:59:06 +11:00
bugobliterator 3b94cb3072 HAL_Linux: make tonealarm generation a passthrough operation
get rid of all delays and while loops(that may turn into infinite loop)
2014-11-15 16:59:06 +11:00
bugobliterator e254b406d0 HAL_Linux: make rtttl tune and tune repeat flag list static members
instead of initialising them inside constructor
2014-11-15 16:59:06 +11:00
bugobliterator af203760bd HAL_Linux: change the return type of AP_HAL::Util::tonealarm_init() to signed int8_t.
This is a part of a set of fixes for the bugs and typos tridge discovered and shared inside earlier commits for setting up tonealarm.
2014-11-10 06:27:48 +11:00
bugobliterator 298b27444a HAL_Linux: Add ToneAlarm Driver to Linux_HAL
ToneAlarm is setup for Beaglebone Black using pwm, toneAlarm thread runs on second last priority.
2014-11-10 06:27:48 +11:00
Andrew Tridgell 735c6449a1 AP_HAL: added support for commandline arguments
useful for log replay, specifying log file
2014-02-23 08:15:39 +11:00
Andrew Tridgell 4ba044c441 AP_HAL_Linux: initial Linux AP_HAL 2013-09-28 21:24:01 +10:00