Andrew Tridgell
84f93439ca
HAL_PX4: delay peripheral starup
...
moved to AP_BoardConfig
2016-11-09 17:07:59 +11:00
Andrew Tridgell
c2c7284a94
HAL_PX4: implement SPIDevice code for PX4
...
with thread per bus
2016-11-09 17:07:56 +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
Mathieu OTHACEHE
152edf7189
Global: remove mode line from headers
...
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02:00
Lucas De Marchi
2ef78051c1
AP_HAL_PX4: remove I2CDriver
...
I2CDevice now serves for the same purpose.
2016-07-28 18:08:56 -03:00
Andrew Tridgell
1b8da3bce2
HAL_PX4: implement I2CDevice driver for PX4
2016-07-15 12:24:03 -03:00
Andrew Tridgell
8a7627474f
Revert "AP_HAL_PX4: use new I2CDevice interface"
...
This reverts commit f767918e0e
.
These commits broke startup on PX4
2016-05-11 12:19:00 +10:00
Luiz Ywata
f767918e0e
AP_HAL_PX4: use new I2CDevice interface
2016-05-10 15:12:30 -03:00
Andrew Tridgell
28aa4c40cc
HAL_PX4: fixed order of wifi and frsky on FMUv4
...
thanks to OXINARF for noticing!
2016-04-20 10:23:11 +10:00
Andrew Tridgell
4a35f8e9fc
HAL_PX4: fixed comments for FMUv4 uarts
2016-04-20 10:08:48 +10:00
Andrew Tridgell
18ccaf7e2b
HAL_PX4: added uartF
2016-04-20 09:39:49 +10:00
Andrew Tridgell
8695668da3
HAL_PX4: enable wifi port on FMUv4
2016-04-14 08:05:06 +10:00
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