Commit Graph

7 Commits

Author SHA1 Message Date
Peter Barker 63c551ce13 AP_RPM: add and use AP_RPM_ENABLED
... and backend-specific equivalents
2022-09-20 09:28:27 +10:00
Randy Mackay bfd168dd4f AP_RPM: avoid attach interrupt retry and spam to GCS if PIN = -1 2022-04-25 08:59:03 +09:00
Peter Barker 34008ad29c AP_RPM: add override keyword where required 2018-11-08 11:30:12 +11:00
Peter Barker a8d8e5c0ef AP_RPM: remove unused variable 2018-10-16 10:17:12 +11:00
Peter Barker 20027bad17 AP_RPM: attach_interrupt now takes a functor
AP_RPM: move PX4 IRQ handling into AP_HAL_PX4

AP_RPM: correct RPM sensor initialisation

The initialisation code used the type from the wrong configuration
parameters (if the first rpm sensor wasn't configured then the sensing
for the second sensor would use the type from the first).

The packing of drivers[...] was done in a non-sparse manner - i.e. if a
sensor wasn't detected then it would not take up space in the array.
The PX4 PWM backend relies on the instance number (offset in the drivers
array) corresponding to the parameters, so making this sparse is
required.

The main detection block fills in drivers based on the number of
instances detected so far, but the nullptr check checks based on the
number of detected backends.  If the second instance wasn't configured we
wouldn't attempt to configure a third.

AP_RPM: add error reporting for attaching of interrupts

AP_RPM: use detach_interrupt method

AP_RPM: use (uint8_t)-1 in place of 255
2018-08-21 20:34:01 +09:00
Andrew Tridgell c2adc26051 AP_RPM: support RPM pin input on ChibiOS 2018-04-07 09:10:29 +10:00
Andrew Tridgell 9e2cfabb8a AP_RPM: support RPM input on any AUX pin 2017-04-04 16:33:45 +10:00