Commit Graph

297 Commits

Author SHA1 Message Date
Andrew Tridgell e73ac418df HAL_PX4: prevent error on GPIO line on change of pinMode
thanks to Michael for noticing this
2015-08-17 12:02:03 +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
Andrew Tridgell 1b61f6f636 HAL_PX4: fixed USB connected on AUAV-X2
this is the 2nd attempt at a fix for the usb_connected status on
AUAV-X2
2015-08-11 11:42:02 +10:00
Lucas De Marchi d4d56aef1a AP_HAL_PX4: use ARRAY_SIZE macro 2015-07-21 14:25:01 +09: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 f4a9f9876f HAL_PX4: make usb_connected() more robust
thanks to a suggestion from Phillip Kocmoud, this should fix issues
with the XUAV-X2
2015-07-08 11:19:07 +10:00
Andrew Tridgell d909f11ba3 HAL_PX4: added implementation of NSH shell stream 2015-06-17 20:30:09 +10:00
Andrew Tridgell dea36c1ae9 HAL_PX4: fixed build on non-PX4 systems 2015-06-11 15:17:02 +10:00
Andrew Tridgell 88655b48e1 HAL_PX4: added px4_param stub functions
this replaces the PX4 parameter system with stub functions that fail
all parameter find calls
2015-06-11 13:31:41 +10:00
Eugene Shamaev 40a5aa497a HAL_PX4: added rc_bind for DSM bind 2015-06-10 17:19:09 +10:00
Andrew Tridgell d6af9fd0ee HAL_PX4: prevent uavcan motor spin up while booting 2015-06-09 19:45:01 +10:00
Andrew Tridgell 6a33aeef67 HAL_PX4: cope with multi-instance actuator_outputs uORB
we need to subscribe to all of them
2015-06-09 19:45:00 +10:00
Andrew Tridgell 333778bac1 HAL_PX4: updates for upstream merge 2015-06-09 19:44:20 +10:00
Andrew Tridgell c44ab01be8 AP_HAL: use noreturn attribute on panic
should reduce coverity warnings
2015-06-08 21:09:08 +10:00
Andrew Tridgell ca8482b4d6 AP_HAL_PX4: convert example from .pde to .cpp 2015-06-01 17:07:04 +10:00
Andrew Tridgell 43fb1202f2 HAL_PX4: fixed functor comparison with NULL 2015-05-26 13:54:38 +10:00
Tom Pittenger 98c5137107 AP_HAL_PX4: compiler warnings: float to doubles 2015-05-05 13:26:56 +10:00
Andrew Tridgell 40e3b422b5 HAL_SITL: rename HAL_AVR_SITL to HAL_SITL
it is nothing to do with the original AVR emulation now
2015-05-05 09:45:54 +10:00
Randy Mackay 187dd0dccd HAL_PX4: fix example sketch 2015-05-01 16:44:10 +09:00
Andrew Tridgell 020d9ea78a HAL_PX4: only consider power to have changed when armed
this prevents false positives with multi-battery setups
2015-04-28 11:05:29 +10:00
Tom Pittenger 3b3752468d HAL_PX4: fix compile warnings re unused variables 2015-04-24 14:18:24 +09:00
Tom Pittenger 179c72bfa9 HAL_PX4: fix compile warning re member init order 2015-04-24 14:14:38 +09:00
Tom Pittenger 7e18480cd2 HAL_PX4: fix compile warnings re float constants 2015-04-24 12:49:18 +09:00
Andrew Tridgell 7cd7ff89fd HAL_PX4: recover 12k of ram from USB buffers
faster NuttX means we don't need such larger buffers
2015-03-27 15:08:52 -07:00
Andrew Tridgell 086f878bdc HAL_PX4: split IO thread into separate IO and storage threads
this prevents a blocked microSD card from blocking IO to the FRAM,
causing parameter changes not to be sticky
2015-03-04 20:18:17 +11: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 619196b6b3 HAL_PX4: fixes for new PX4 device paths 2015-02-14 12:25:44 +11:00
Andrew Tridgell 001643d5a3 HAL_PX4: always use the hrt semaphore based delay
the up_udelay() could cause too much timing jitter
2015-02-14 12:25:43 +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 ebacb2b496 HAL_PX4: call parent Util constructor 2015-02-11 20:57:28 +11:00
Jonathan Challinger e908fcafb1 AP_HAL_PX4: attempt to initialize USB while soft-disarmed 2015-02-11 20:57:27 +11:00
Andrew Tridgell f548d48fdc HAL_PX4: implement updated new_input() semantics 2015-02-09 10:39:12 +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
Randy Mackay 12bd5cd6b1 AP_HAL_PX4: fix example sketch 2015-01-28 21:00:30 +09:00
Andrew Tridgell 464714f1ab HAL_PX4: fixed build warning 2015-01-09 11:37:46 +11:00
Andrew Tridgell 0c73dc2440 HAL_PX4: use common RingBuffer.h 2015-01-07 08:41:14 +11:00
Andrew Tridgell 4a91546ced HAL_PX4: FRAM does not support fsync
the fsync just wastes time reopening /fs/mtd
2014-12-09 14:35:36 +11:00
Andrew Tridgell 4132b53541 HAL_PX4: publish actuator values for UAVCAN ESCs
this publishes scaled actuator values so that the uavcan module can
drive ESCs
2014-11-26 11:14:44 +11:00
Matthias Badaire 1d3a49e466 AP_HAL_PX4 : make UARTDriver capable to be called from different threads.
The modification allows the read and write functions to be called by any thread but the calling thread must be the last one that called the begin() function.
2014-11-14 13:51:16 +11:00
Andrew Tridgell 154bf51279 HAL_PX4: minor tidy up of if statement 2014-11-14 13:51:16 +11:00
Holger Steinhaus 9e9c62d245 HAL_PX4: work-around for periodic enable_ch() calls 2014-11-14 13:51:16 +11:00
Holger Steinhaus e5549c90a1 HAL_PX4: do not overwrite disabled channels with zeros
Fixes #1321
2014-11-14 13:51:16 +11:00
Andrew Tridgell e22c8b27a9 HAL_PX4: if there are no enabled channels don't send to PX4IO
this makes it possible to disable PWM output to IO to test override
2014-11-07 10:39:07 +11:00
Andrew Tridgell 7e3b8a30f5 HAL_PX4: use px4io generated values for servo output readback
this makes it easier to observe the behaviour of IO failsafe
2014-11-05 21:54:53 +11:00
Andrew Tridgell 10b0ca7ea8 HAL_PX4: reduce the number of times we split up UART reads and writes 2014-10-09 12:29:25 +11:00
Randy Mackay ffcd259b4e HAL_PX4: implement force_safety_on 2014-09-18 09:58:46 +09:00
Andrew Tridgell 74525cad89 HAL_PX4: fixed dirty_mask calculation in FRAM storage
this could lead to a number of bytes on 512 byte boundaries not being
written when changed in ram, so they would revert on next boot
2014-09-11 18:58:54 +10:00
Andrew Tridgell 48247b6adc HAL_PX4: minimise usage of hrt_absolute_time() 2014-08-20 09:10:24 +10:00
Andrew Tridgell 1241da466b HAL_PX4: added millis64() and micros64() 2014-08-20 08:01:06 +10:00
Andrew Tridgell 0a20d0db60 HAL_PX4: prevent read past end of buffer 2014-08-19 10:08:17 +10:00
Andrew Tridgell 41f7ad42d4 HAL_PX4: fixed example build 2014-08-13 21:48:35 +10:00
Andrew Tridgell c864f3eed5 HAL_PX4: enable full storage size on PX4 2014-08-13 18:46:45 +10:00
Andrew Tridgell d40d0f6aec AP_HAL: removed old storage type read/write functions
not needed any more
2014-08-13 18:46:44 +10:00
Andrew Tridgell d1a75874a1 HAL_PX4: don't report power status change if in first 5 seconds 2014-08-09 22:50:14 +10:00
Andrew Tridgell 02dec5634f AP_HAL: fixed example builds 2014-07-25 17:52:01 +10:00
Andrew Tridgell b2bc098aee HAL_PX4: avoid some float conversion warnings 2014-07-08 20:27:19 +10: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 fa4eb5475a HAL_PX4: implement analog input stop pins
this allows multiple sonars to cooperate without interference
2014-06-02 08:35:41 +10:00
Andrew Tridgell 37c50d9587 HAL_PX4: fixed use of FMU servo pins as digital inputs
these pins can be PWM output or digital input or digital output
2014-05-25 22:03:44 +10:00
Andrew Tridgell a7d6a26bec HAL_PX4: fixed auto-flow control
the 6 bytes written to break the radio out of bootloader broke
auto flowcontrol detection
2014-05-19 22:02:39 +10:00
Andrew Tridgell 320834a5e7 HAL_PX4: read from FRAM in 128 byte chunks (2nd try)
this time without the amazingly silly bug
2014-05-02 22:12:45 +10:00
Andrew Tridgell db6b96caa0 Revert "HAL_PX4: read from FRAM in 128 byte chunks"
This reverts commit a92366c455.

This commit may be associated with FRAM corruption on Pixhawk. Revert
until we understand why
2014-05-02 21:52:26 +10:00
Andrew Tridgell a92366c455 HAL_PX4: read from FRAM in 128 byte chunks
this fixes FRAM read on Roberts Pixhawk. We don't know why yet.
2014-05-02 12:24:54 +10:00
Andrew Tridgell 5cd145a307 AP_HAL: added set_failsafe_pwm() API
this allows the PWM values for FMU firmware failure to be setup
2014-04-21 08:36:52 +10:00
Andrew Tridgell 6eee2421cc AP_HAL: removed RCInput valid_channels() and added new_input() and num_channels()
the valid_channels() method was inconsistently implemented between
boards, and served two quite different purposes. It is clearer as two
functions
2014-03-25 14:39:41 +11:00
Andrew Tridgell 2a9a89e020 HAL_PX4: fixes for merged upstream PX4Firmware 2014-03-25 10:30:00 +11:00
Andrew Tridgell d36989f6a1 AP_HAL: fixed example build 2014-03-19 12:14:06 +09: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 830afefcef AP_HAL: fixed example build 2014-02-15 06:40:29 +11:00
Andrew Tridgell bea0a46410 AP_HAL: added servorail_voltage and power_status_flags() API on AnalogIn 2014-02-15 05:00:09 +11:00
Andrew Tridgell 7c1b9b344f AP_HAL: added get_flow_control() API 2014-02-14 21:51:00 +11:00
Andrew Tridgell 1849db7074 AP_HAL: added board_voltage AnalogIn method
this makes it easier to get the board voltage from any library,
without having to allocate another analog channel object
2014-02-14 21:25:38 +11:00
Andrew Tridgell 4e2e685d7a HAL_PX4: better fix for IFLOW on all ports
the tcsetattr() call fails to apply the baudrate if the port has no
RTS pin and we ask for IFLOW. So just make a separate call.
2014-02-12 17:47:23 +11:00
Andrew Tridgell b2cdd39a99 HAL_PX4: don't enable IFLOW on ports without flow control
this should have been harmless, but breaks the GPS on Pixhawk. This
disables it until we work out why.
2014-02-12 17:32:07 +11:00
Andrew Tridgell c93794999e HAL_PX4: remove an old conditional define 2014-02-11 15:58:25 +11:00
Andrew Tridgell 439a075b30 AP_HAL: added force_safety_off rcoutput function
this forces the safety switch off, enabling PWM on the IO board
2014-02-11 15:58:25 +11:00
Andrew Tridgell c5c1d1358a HAL_PX4: added automatic hardware flow control detection
this allows us to detect if hardware flow control is not available and
automatically disable it
2014-02-11 12:11:26 +11:00
Andrew Tridgell 3e637ac5d9 AP_HAL: added enable_flow_control() option in AP_HAL 2014-02-10 12:54:50 +11:00
Andrew Tridgell 99b41f110f HAL_PX4: enable the FMU PWM pins to be used as GPIO when needed 2014-01-20 17:06:28 +11:00
Andrew Tridgell 87cc95dd7f AP_HAL: removed unused enable_mask and disable_mask functions 2014-01-16 17:16:17 +11:00
Andrew Tridgell e1f06c532a HAL_PX4: more checking of IO results in eeprom driver 2014-01-16 13:11:14 +11:00
Andrew Tridgell 3ae6f03761 HAL_PX4: be less verbose about disarmed PWM setup 2014-01-16 13:11:13 +11:00
Andrew Tridgell db1d438e97 HAL_PX4: implement set_safety_pwm() API
used to set PWM on motors when disarmed
2014-01-15 22:25:50 +11:00
Andrew Tridgell 64fbadcc21 HAL_PX4: use eeprom on PX4 FMUv1 as well
this means we no longer store params on SD at all
2014-01-15 19:33:13 +11:00
Andrew Tridgell 376ab30366 HAL_PX4: disable rename of old parameter file for now
be nice to release candidate users
2014-01-14 22:00:56 +11:00
Andrew Tridgell 626086063e HAL_PX4: added a signature to FRAM
this makes for more reliable update
2014-01-14 15:06:51 +11:00
Andrew Tridgell b88bb0751c HAL_PX4: added support for MTD (FRAM) parameters
this allows us to store parameters and waypoints in FRAM, and
auto-upgrade from microSD
2014-01-14 12:46:26 +11:00
Andrew Tridgell e78e35f3bd HAL_PX4: try to use uppercase names on NuttX microSD card 2014-01-14 12:46:26 +11:00
Andrew Tridgell 63586e3e23 HAL_PX4: fixed build for new PX4Firmware 2014-01-13 13:54:51 +11:00
Andrew Tridgell 89676be825 HAL_PX4: fixed RCInput race condition
the number of channels could be zero with thread switch at the wrong
time
2013-12-31 22:25:16 +11:00
Andrew Tridgell a2997704eb HAL_PX4: removed code which drops throttle to 900 on loss of RC
rely on vehicle code checking for last data coming in
2013-12-31 10:58:49 +11:00
Andrew Tridgell ea649e036b AP_HAL: added HAL_CPU_CLASS define for selecting algorithms
this will make it easier to select the appropiate level of algorithm
for a CPU
2013-12-31 10:28:37 +11:00
Andrew Tridgell a95868e124 HAL_PX4: even larger tx buffer size for faster log transfer 2013-12-28 16:01:48 +11:00
Andrew Tridgell 22bdee8727 HAL_PX4: implement available_memory() 2013-12-28 16:01:28 +11:00
Andrew Tridgell ff7004fcc5 HAL_PX4: use larger buffers on USB 2013-12-28 14:25:54 +11:00
Andrew Tridgell e321ad65f4 AP_HAL: fixed example build 2013-12-17 11:51:37 +11:00
Andrew Tridgell f433796435 HAL_PX4: removed an unused variable 2013-12-11 10:22:34 +11:00
Andrew Tridgell 4b4f5ed1c0 HAL_PX4: support get_system_id() on PX4 2013-11-26 13:00:03 +11:00
Andrew Tridgell 0b25ff0a16 HAL_PX4: added uartD 2013-11-23 19:29:22 +11:00