Commit Graph

50 Commits

Author SHA1 Message Date
Lucas De Marchi 8de329fc81 AP_HAL_PX4: use empty I2CDevice 2016-02-16 19:49:09 -02:00
Julien BERAUD c0f65ff6e1 AP_HAL_PX4: add empty optical flow
No onboard optical flow on PX4
2015-12-18 17:56:04 +11:00
Lucas De Marchi 503533c6fe AP_HAL_PX4: rename AP_HAL_Empty instances 2015-12-08 11:12:14 +11:00
Lucas De Marchi 0c3733601b AP_HAL_PX4: 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
Andrew Tridgell 9835043dd5 HAL_PX4: support FMUv4 2015-11-27 18:54:30 +11:00
Caio Marcelo de Oliveira Filho cb61bdd8d1 AP_HAL_PX4: merge init() and run() 2015-10-21 09:16:08 +11:00
Caio Marcelo de Oliveira Filho 0dab23c4df AP_HAL_PX4: implement HAL::run() 2015-10-21 09:16:08 +11:00
Caio Marcelo de Oliveira Filho 2e464a53c2 AP_HAL: make code not depend on concrete HAL implementations
The switching between different AP_HAL was happening by giving different
definitions of AP_HAL_BOARD_DRIVER, and the programs would use it to
instantiate.

A program or library code would have to explicitly include (and depend)
on the concrete implementation of the HAL, even when using it only via
interface.

The proposed change move this dependency to be link time. There is a
AP_HAL::get_HAL() function that is used by the client code. Each
implementation of HAL provides its own definition of this function,
returning the appropriate concrete instance.

Since this replaces the job of AP_HAL_BOARD_DRIVER, the definition was
removed.

The static variables for PX4 and VRBRAIN were named differently to avoid
shadowing the extern symbol 'hal'.
2015-10-21 09:16:07 +11:00
Andrew Tridgell cbd43ee6ea HAL_PX4: added hal.i2c support on PX4 boards
this allows I2C based devices to use in-tree drivers
2015-09-08 16:46:52 +10:00
Gustavo Jose de Sousa 08333f1ffe AP_HAL_PX4: 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
Julien BERAUD 7275e33e79 AP_HAL: add the possibility to have more than 1 i2c
Bebop drone has 3 i2c
2015-07-10 14:23:17 +10:00
Andrew Tridgell 333778bac1 HAL_PX4: updates for upstream merge 2015-06-09 19:44:20 +10:00
Andrew Tridgell 18131eae13 HAL_PX4: added delay_microseconds_boost()
implemented using hrt callback with sem_post wrapper
2015-02-16 12:19:13 +11:00
Andrew Tridgell 7f0060b881 HAL_PX4: reduce the amount of time between loop() calls
500usec is too long for 400Hz copter
2015-02-14 12:25:43 +11:00
Andrew Tridgell f2a919c55e AP_HAL_PX4: moved size of main thread stack to Scheduler.h
make it more obvious
2015-02-07 08:06:53 +11:00
Andrew Tridgell 849c4905fb HAL_PX4: print overtime message on stuck task
this should make it easier to narrow down stuck task bugs
2014-07-03 09:11:24 +10:00
Andrew Tridgell 5f85e7af6a HAL_PX4: switch to new serial port for 2nd GPS 2014-03-04 20:34:44 +11:00
Andrew Tridgell bf2dd141e9 HAL_PX4: support uartE for 2nd GPS 2014-02-26 08:18:11 +11:00
Andrew Tridgell f433796435 HAL_PX4: removed an unused variable 2013-12-11 10:22:34 +11:00
Andrew Tridgell 0b25ff0a16 HAL_PX4: added uartD 2013-11-23 19:29:22 +11:00
Andrew Tridgell 5800c2a2c8 HAL_PX4: prevent excessive writes on startup from blocking
this could cause copter on PX4 to hang on startup
2013-10-28 16:12:44 +11:00
Andrew Tridgell 1c091cbca5 HAL_PX4: fixed a scheduler bug that affects UART IO
we need to detect if we are in a timer task using a PID, not a
flag. This is the same type of bug I fixed last week, but now fixed
properly.

The bug could well be the "USB bug" that Craig has been chasing
2013-10-19 16:50:38 +11:00
Andrew Tridgell d973730b88 HAL_PX4: use hrt timer and semaphores to improve timing
this gives much more accurate microsecond delays, while also ensuring
we yield the CPU when possible
2013-10-14 08:29:30 +11:00
Andrew Tridgell 63bee0b2d8 HAL_PX4: disable checks for in_timerprocess
these are not valid in this form for the way the timer thread works on
PX4.
2013-10-11 16:06:35 +11:00
Andrew Tridgell 7cab8cb3bb HAL_PX4: removed Console driver 2013-10-05 18:33:07 +10:00
Julian Oes 56e94d70e9 PX4: Adaptations to latest build changes 2013-08-30 13:01:32 +10:00
Marco Bauer a3b216bce3 HAL_PX4: added GPIO driver 2013-07-11 13:50:22 +10:00
Andrew Tridgell 02c5c3ec4a HAL_PX4: changed scheduler priorities
put sensor priority above main sketch, to prevent occasional blocking
for sensor data
2013-02-20 11:30:54 +11:00
Andrew Tridgell 8e2a20bea8 HAL_PX4: enable ttyACM0 as main console, ttyS1 as telemetry port 2013-02-18 13:55:33 +11:00
Andrew Tridgell d7409b6a25 HAL_PX4: startup in low priority to fix CLI
this ensures that tight sensor loops in setup() can run without
sleeping
2013-01-25 20:44:36 +11:00
Andrew Tridgell f9d43f4c3e HAL_PX4: prevent loop() overruns using hrt
this ensures if loop() takes more than 1 second, the main task gets
its priority dropped until loop() completes
2013-01-24 15:04:57 +11:00
Andrew Tridgell 952df2fced HAL_PX4: new buffered storeage driver for microsd cards
this does all IO in the timer thread, avoids writes that don't change
data, and does all writes in multiples of 128 byte chunks. This should
be about as friendly to SD cards as we can get.
2013-01-23 16:37:40 +11:00
Andrew Tridgell 2a10727902 HAL_PX4: run timer thread as SCHED_FIFO
this ensures it never yields to the main thread, which would break our
locking assumptions
2013-01-23 09:21:50 +11:00
Andrew Tridgell 06e63d3167 HAL_PX4: use pthread_yield() in main loop
this lowers the latency of the main loop somewhat
2013-01-23 07:36:13 +11:00
Andrew Tridgell 1188c9e335 HAL_PX4: added Util instance
this fixes hal.util->vsnprintf_P()
2013-01-21 17:10:42 +11:00
Andrew Tridgell 52f560a4c2 HAL_PX4: enabled AnalogIn driver 2013-01-21 13:56:57 +11:00
Andrew Tridgell 0655b1a925 HAL_PX4: fixed thread_running on failed startup 2013-01-20 22:13:20 +11:00
Andrew Tridgell bd9c61562f HAL_PX4: added -d command line option to app
allows control of serial device
2013-01-14 16:21:27 +11:00
Andrew Tridgell 7c7a215934 HAL_PX4: fixes for new Scheduler API 2013-01-11 12:25:26 +11:00
Andrew Tridgell 5ac23d358f HAL_PX4: update for new i2cdriver interface 2013-01-07 11:05:30 +11:00
Andrew Tridgell 0fcc6d7389 HAL_PX4: added an RC Output driver 2013-01-04 22:25:36 +11:00
Andrew Tridgell 965fc8a9d1 HAL_PX4: enable uartB as GPS port 2013-01-04 19:41:50 +11:00
Andrew Tridgell 155fca8a4b HAL_PX4: make APM sketches into daemons
this also moves uartA onto UART5, allowing ttyS0 for nsh
2013-01-04 11:14:35 +11:00
Andrew Tridgell 38bccee230 HAL_PX4: initial RCInput driver (overrides only) 2013-01-03 21:30:35 +11:00
Andrew Tridgell d492b72a2c HAL_PX4: use /dev/ttyS0 for uartA
this also changes txspace and available to use FIONWRITE and FIONREAD
2013-01-03 21:12:10 +11:00
Andrew Tridgell ac7117245a HAL_PX4: added a storage driver
stores 'eeprom' to a sdcard file
2013-01-03 19:35:05 +11:00
Andrew Tridgell 9373a4e5b3 HAL_PX4: added a uartA driver
uses stdin/stdout for IO
2013-01-03 11:03:05 +11:00
Andrew Tridgell 5a70f3becf HAL_PX4: added a scheduler implementation 2013-01-02 21:39:26 +11:00
Andrew Tridgell da10e68e87 HAL_PX4: added basic console driver (output only) 2013-01-01 18:19:18 +11:00
Andrew Tridgell b41440175f HAL_PX4: started on new PX4 HAL structures 2012-12-30 20:02:45 +11:00