Commit Graph

82 Commits

Author SHA1 Message Date
Peter Barker 9bcac597b6 AP_HAL: remove posix test from uart example 2023-05-17 09:40:39 +10:00
Peter Barker ee8a762e1d AP_HAL: replace HAVE_FILESYSTEM_SUPPORT with backend defines 2023-05-17 09:40:39 +10:00
Peter Barker e4a44c30ed AP_HAL: change namespace of MultiCopter and FixedWing params
this stops the libraries knowing anything about AP_Vehicle
2022-11-09 19:04:37 +11:00
Pierre Kancir 58ceecc4bf AP_HAL: fix python files exec permissions 2022-06-08 08:16:42 +09:00
Andy Piper d3e57be6e5 AP_HAL: save a sliding window array of frequency bins
calculate frequency average from sliding window
2022-06-01 15:49:32 +01:00
Andy Piper f57ac4787d AP_HAL: add Jain's estimator
notch tuning using FFT averaging
allocate scratch space for peak finding
return all detected peaks to caller
2022-05-04 17:05:51 +10:00
Peter Barker a9b90a3b5a AP_HAL: stop libraries including AP_Logger.h in .h files
AP_Logger.h is a nexus of includes; while this is being improved over
time, there's no reason for the library headers to include AP_Logger.h
as the logger itself is access by singleton and the structures are in
LogStructure.h

This necessitated moving The PID_Info structure out of AP_Logger's
namespace.  This cleans up a pretty nasty bit - that structure is
definitely not simply used for logging, but also used to pass pid
information around to controllers!

There are a lot of patches in here because AP_Logger.h, acting as a
nexus, was providing transitive header file inclusion in many (some
unlikely!) places.
2022-04-08 19:18:38 +10:00
Andy Piper d4024d9216 AP_HAL: allow configuration of maximum number of notches based on MCU type
increase notch filters in SITL
remove redundant harmonics from DSP
2021-12-22 18:13:38 +11:00
Iampete1 bb04406496 AP_HAL: AnalogSource: set_pin returns bool 2021-10-06 18:42:51 +11:00
Siddharth Purohit 6a0c4ec3f7 AP_HAL: add Random Number Generation test 2021-07-07 18:57:25 +10:00
Arsh 18f56fbac5 AP_HAL:examples:Printf: Improvements in the Printf example 2021-02-03 13:02:49 +11:00
Arsh 3d5addeee0 AP_HAL:examples:AnalogIn: Added comments in the AnalogIn example 2021-01-05 20:43:04 +11:00
Andrew Tridgell 195ec0316a AP_HAL: fixed example fw for SERIAL naming 2020-12-15 10:32:46 +11:00
Andrew Tridgell 95c0852b13 AP_HAL: convert to using hal.serial() instead of hal.uartX 2020-12-15 10:32:46 +11:00
Peter Barker 9bde294112 AP_HAL: add chargen UARTDriver example 2020-10-09 19:14:59 +11:00
Andy Piper e2ef0bd36e AP_HAL: collect data for three largest peaks
new dsp peak detection algorithm
add DSP sketch with frequency ascii art
tool to generate gyro data frames from batch sampled DF logs
add generated data from real Y6B flight
allow fft_start() to use ObjectBuffer<float> for lock-free access
allow ObjectBuffer to be resized
2020-05-24 07:43:34 +10:00
heitiane 931367a7ea AP_HAL: fix RCOutput, RCOutput2 and RCInputToRCOutput examples to prevent the failure of reading and writing channels. 2019-06-11 10:27:44 +10:00
Andrew Tridgell 20d762293d AP_HAL: remove more px4 remnants 2019-02-27 20:32:37 +11:00
Peter Barker f90dd0c156 AP_HAL: add simple tests for null-termination 2018-10-21 07:54:30 +11:00
Peter Barker 15ae453205 AP_HAL: fix RCInput example 2018-08-31 21:08:11 +09:00
Andrew Tridgell 347c774665 AP_HAL: fixed example build on ChibiOS 2018-01-15 11:46:02 +11:00
Chinese66 700aaf2e8f AP_HAL: add delay to UART_test example
For AC3.5 and higher version, serial uartA-USBconsole cannot work. Maybe the code before "setup" has been changed. Ensure that the uartA can be initialized
2017-11-22 09:05:17 +09:00
Lucas De Marchi e98fe2d7d5 AP_HAL: RingBuffer: add missing include 2017-08-02 21:10:55 -07:00
Lucas De Marchi 61aed0f0d7 RingBuffer: example: integrate with build system
It's only compatible with Linux so for now disable the other boards.
2017-08-02 16:08:55 -07:00
Murilo Belluzzo 641671a366 AP_HAL: Add simple stress test for RingBuffer class
It runs a Producer/Consumer thread pair endless reading and writing a
ByteBuffer. Producer writes a number sequence that is twice the
ByteBuffer size so a given position have a different data on each write
pass. Consumer makes sure that this pattern is not broken and aborts the
program if it is.

It is possible to spawn more pairs by informing a number as argument of
the program.
2017-08-02 15:30:35 -07:00
Peter Barker c163915f6e AP_HAL: correct storage example 2017-07-07 16:18:37 +01:00
Pierre Kancir 34199b4af0 AP_HAL: example fix travis warning
missing function declaration
implicit cast
some style fix
2017-04-13 19:56:16 +01:00
murata 03bf57219b AP_HAL: Unify from print or println to printf. 2017-01-27 18:20:22 +11: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
Lucas De Marchi ae53920e5b build: don't build examples with old build system
We currently check examples are buildable with waf which doesn't need
the libraries to be specified in a make.inc file.  Having the makefiles
there is misleading since people try to build and realize the build is
broken.
2016-10-11 13:03:08 +11:00
hiro2233 4a6447575c AP_HAL: fixed and updated RCInput example. 2016-07-27 00:52:13 -03:00
Lucas De Marchi cf11776150 AP_HAL: fix signed and unsigned comparison warning
../../libraries/AP_HAL/examples/Printf/Printf.cpp:63:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
         if (ret != strlen(float_tests[i].result)) {
                 ^
...

ardupilot/modules/gtest/include/gtest/gtest.h:1448:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (expected == actual) {
                ^
And similar ones.
2016-05-04 08:58:37 -03:00
Lucas De Marchi 9ac63d7128 AP_HAL: examples: fix coding style 2016-05-04 08:58:37 -03:00
hiro2233 7814841cd6 AP_HAL: Add RCOutput interactive example with Menu 2016-04-09 07:01:35 -07:00
Lucas De Marchi 1f072c4353 AP_HAL: fix unused variable
../../libraries/AP_HAL/examples/UART_test/UART_test.cpp:13:28: warning: ‘uarts’ defined but not used [-Wunused-variable]
 static AP_HAL::UARTDriver* uarts[] = {
                            ^
2016-02-19 11:51:49 -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 3d22490397 waf: examples: use methods from bld instead of ardupilotwaf 2016-01-22 20:10:29 -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
Jonathan Challinger d7639ce03a AP_HAL: fix example build 2015-12-29 10:46:35 -08:00
Lucas De Marchi a096703b06 Global: don't link with AP_Progmem
AP_Progmem is not used anymore.
2015-12-27 15:58:12 -02:00
Lucas De Marchi a1c3912bd8 AP_HAL: remove unused AP_ADC_AnalogSource 2015-12-03 13:32:43 +11:00
Caio Marcelo de Oliveira Filho 6e7b73610d waf: add waf support 2015-12-03 07:54:30 +11:00
Lucas De Marchi 6bc07da0ee AP_HAL: 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:42:37 -02:00
Caio Marcelo de Oliveira Filho 5292bc0054 AP_HAL: example uses millis/micros/panic functions 2015-11-20 12:31:48 +09:00
Andrew Tridgell 8f4ce7f20b build: removed all nocore.inoflag files
these were APM2 specific
2015-11-16 08:05:17 +11:00
Lucas De Marchi 20c6ffc5e3 Replace use of UARTDriver::printf_P() with UARTDriver::printf()
This also starts to show warnings on places that were already using
wrong printf format strings.
2015-10-30 14:35:25 +09:00
Lucas De Marchi 6f4904189b Replace use of println_P() with println() 2015-10-30 14:35:22 +09:00
Lucas De Marchi 2c38e31c93 Remove use of PSTR
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.

This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.

AVR-specific places were not changed.
2015-10-30 14:35:04 +09:00
Caio Marcelo de Oliveira Filho b98bf2a65e AP_HAL: remove unnecessary includes from examples 2015-10-21 09:16:10 +11:00
Caio Marcelo de Oliveira Filho ec52df991c build: compile only the HAL files needed by the board
Instead of requiring every program to specify the HAL related modules,
let the build system do it (in practice everything we compiled depended
on HAL anyway). This allow including only the necessary files in the
compilation.
2015-10-21 09:16:07 +11:00