Commit Graph

451 Commits

Author SHA1 Message Date
Eugene Shamaev 36655310b3 AP_HAL_PX4: support for several CAN interfaces and drivers, filtering support 2017-07-03 11:44:32 +01:00
Andrew Tridgell a88693c487 HAL_PX4: support RSSI from receiver protocols 2017-07-03 11:22:21 +10:00
Andrew Tridgell b8f628da83 HAL_PX4: fixed bug in last_sent
thanks to Francisco
2017-06-21 11:40:12 +10:00
Andrew Tridgell 17893958bf HAL_PX4: cope with brushed motors in read_last_sent()
we need the value before scaling is applied, so slew rates can work
2017-06-21 10:55:24 +10:00
Andrew Tridgell 11396919c8 HAL_PX4: changed BRUSHED16kHz to BRUSHED 2017-06-17 17:37:45 +10:00
Andrew Tridgell 96627bc4e5 HAL_PX4: allow any pulse freq in brushed mode 2017-06-17 17:37:45 +10:00
Peter Barker 7ce353e652 AP_HAL_PX4: use HAL_SEMAPHORE_BLOCK_FOREVER macro 2017-05-08 10:23:03 +09:00
Andrew Tridgell b72532164b AP_HAL_PX4: rename macros to avoid conflicts
these macros were also defined in NuttX in clock.h
2017-05-06 15:21:14 +10:00
Andrew Tridgell 37166301c9 HAL_PX4: use sensor_config_error() 2017-05-03 11:37:02 +10:00
Peter Barker 3ff4cd8c07 AP_HAL_PX4: use HAL_SEMAPHORE_BLOCK_FOREVER 2017-05-01 15:05:51 +01:00
Andrew Tridgell 9bdb6838e6 HAL_PX4: cope with nested cork/push 2017-05-01 14:32:18 +10:00
Francisco Ferreira 7dca7933fa AP_HAL_PX4: fix UAVCAN armed state to depend on safety switch 2017-04-27 14:04:56 +01:00
Francisco Ferreira 965eda69f3 AP_HAL_PX4: remove left-overs of legacy UAVCAN support 2017-04-27 13:32:43 +01:00
Andrew Tridgell ca4cde9770 HAL_PX4: fixed safety switch light pattern
this was broken by the recent CAN merge. My fault for not checking it
carefully. We have to publish the armed state so the fmu driver on
pixracer can update the light
2017-04-27 13:32:43 +01:00
Andrew Tridgell 3415dfb46c HAL_PX4: implement split transfers for I2C 2017-04-18 18:15:04 +10:00
Eugene Shamaev 0c4a68314b AP_HAL_PX4: removal of legacy UAVCAN support 2017-04-17 17:27:18 +10:00
Pierre Kancir a2eeab4db7 AP_HAL_PX4: example fix travis warning
missing function declaration
implicit cast
some style fix
2017-04-13 19:56:16 +01:00
Eugene Shamaev 55a0bd081f AP_HAL_PX4: ESC scaling 2017-04-10 22:38:12 +01:00
Eugene Shamaev 7caeaf4be6 AP_HAL_PX4: RCOutput support for UAVCAN 2017-04-10 22:38:12 +01:00
Eugene Shamaev 865392f034 AP_HAL_PX4: CAN bus driver 2017-04-10 22:38:12 +01:00
Andrew Tridgell dbfdfa2261 HAL_PX4: fixed a bug in setup of alt rates for upper channels
this affected vehicles with high rates on upper channels, such as hexa
and octa quadplanes. The bug caused the rates set on the upper channels
to also be set on the primary channels, which means the low channels
containing aileron, elevator etc ran at 400Hz instead of 50Hz, resulting
in potential damage to the servos
2017-04-07 20:32:19 +10:00
Andrew Tridgell a8b12dcf3c HAL_PX4: never wait on a semaphore in interrupt context
this shouldn't ever happen, but better to check
2017-04-07 18:16:14 +10:00
Peter Barker 724be3878c AP_HAL_PX4: correct output of system-id on px4-v3 2017-04-03 14:14:59 +10:00
Andrew Tridgell 02976168cc HAL_PX4: fixed RC rate when BRD_PWM_COUNT=0
if BRD_PWM_COUNT is zero then alt_fd is -1, and we were not setting
servo output rate
2017-04-03 10:05:30 +09:00
Lucas De Marchi 7c246847de AP_HAL_PX4: replace board ifdef with feature ifdef 2017-03-24 12:06:19 +11:00
Lucas De Marchi 2e4e4365d0 AP_InertialSensor: enable fast sampling for aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi 7c1f255258 AP_HAL_PX4: add pin to monitor battery 2017-03-24 12:06:19 +11:00
Lucas De Marchi 91dabbe418 AP_HAL_PX4: implement method to ajust periodic callback
Just setting up the periodic callback sampling time on initialization
may not work well for sensors that need to request for a sample with a
bus transaction, sleep and then read the new data. That's because the
function will be kept calling at a periodic rate, while the time in
which we can read the value is not really that sampling time, but rather
the time in which sensor was last read + the time spent in the function
before sending a new sample request.

Instead of creating a new type of thread to handle this case, just
implement the minimal and easy case of updating the period for this
callback, that can only be called from inside the callback function.
2017-03-24 12:06:19 +11:00
Lucas De Marchi 2349909033 AP_BoardConfig: start mtd driver 2017-03-24 12:06:19 +11:00
Lucas De Marchi fad583b259 AP_HAL_PX4: RCOoutput_Tap: map to [ RPMSTOPPED, RPMMAX ] range
When it's not armed we get _esc_pwm_min from the AP_Motors library,
which would cause motors to start spinning.  Map it to start from
RPMSTOPPED so it doesn't spin when it's not armed.
2017-03-24 12:06:19 +11:00
Lucas De Marchi 5e26940070 AP_HAL_PX4: disable safety switch for aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi 327de91b5c AP_HAL_Px4: use RCOutput_Tap for aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi 75977cd890 AP_HAL_PX4: implement motor output for aerofc
This uses tap ESCs, as found on the PX4 project, translated to our
internal APIs. It doesn't have the feedback from ESCs yet.
2017-03-24 12:06:19 +11:00
Lucas De Marchi ce9013b8ee AP_HAL_PX4: add RCOutput skeleton for aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi 87846fe049 AP_InertialSensor: use MPU6500 on aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi b4d0569339 AP_HAL_PX4: Use empty RCOutput driver for aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi 00c2949dfb Add support for baro on aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi b17acfee12 Add aerofc support
Flight Controller board that comes on Intel Aero RTF Drone.
2017-03-24 12:06:19 +11:00
Siddharth Bharat Purohit 5029dd1bab AP_HAL_PX4: GPIO: return correct FMU pin read even if IO not connected/detected 2017-03-22 12:15:05 +11:00
Andrew Tridgell fc4caf51e9 HAL_PX4: fixed RC failsafe for SBUS on FMUv4
the FMUv4 SBUS parser sets timestamp_last_signal even if we are in
failsafe

thanks to Mark Whitehorn for finding this
2017-03-18 17:36:13 +11:00
Lucas De Marchi f972fed70b AP_HAL_PX4: rename method to follow AP_HAL
This allows to avoid the cast in the HAL, making it easier to replace
the implementation with an Empty::RCOutput while prototyping.
2017-02-26 13:38:24 +11:00
Lucas De Marchi e1eda3066c AP_HAL_PX4: SPIDevice: add missing ifdefs
These sensors may always be present on px4fmu* boards, but they are not
always present for all boards supported by the PX4Firmware.
2017-02-26 13:37:13 +11:00
Andrew Tridgell 787a2093ec HAL_PX4: fixed motor test for brushed motors
this fixes zero pwm output on a subset of channels. When using
motortest and asking for a single channel, multiple channels fired due
to an incorrect optimisation
2017-02-02 09:27:48 +09:00
murata 9b1dadd93e AP_HAL_PX4: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
iseries1 e6a643f805 AP_HAL: define pixracer LED pins 2017-01-27 11:01:17 +09:00
Andrew Tridgell 1bd9d0b7f9 HAL_PX4: cleanup whitespace 2017-01-12 17:39:37 +11:00
Andrew Tridgell 05d9455f87 Revert "HAL_PX4: Add input parameter check."
This reverts commit 5f41b09fde.

This change is completely incorrect. It is quite common to do SPI
transfers with zero send bytes, and is required for many sensors and
other devices
2016-12-07 12:47:10 +11:00
murata d619d33374 AP_HAL_PX4: UARTDriver: Delete the condition that does not hold. 2016-12-05 16:53:36 -08:00
Andrew Tridgell e2192d5b4d HAL_PX4: report user bus number not system bus number 2016-12-05 16:51:49 -08:00
murata 5f41b09fde HAL_PX4: Add input parameter check. 2016-12-02 17:09:47 -08:00