Commit Graph

86 Commits

Author SHA1 Message Date
Andrew Tridgell
1c5c1a566f AP_RPM: fixed SITL RPM backend for new motor mask 2022-10-16 20:38:19 +11:00
Peter Barker
d4a7ff1ccd AP_RPM: correct compilation when RPM_PIN disabled 2022-10-11 10:50:13 +11:00
Peter Barker
855f4fe2d2 AP_RPM: correct SITL backend compilation if RPM disabled in SITL 2022-09-28 20:10:21 +10:00
Peter Barker
63c551ce13 AP_RPM: add and use AP_RPM_ENABLED
... and backend-specific equivalents
2022-09-20 09:28:27 +10:00
Andy Piper
9d3f4d1906 AP_RPM: fix reporting of RPM from the harmonic notch 2022-09-14 17:45:57 +10:00
Andrew Tridgell
13453f705e AP_RPM: added AP_Generator support
useful for notch filtering of generator vibration
2022-08-30 10:53:45 +10:00
Andrew Tridgell
943b262eef AP_RPM: fixed use of configured() vs configured_in_storage() 2022-06-06 13:11:50 +10:00
Peter Barker
5ddd50fefb AP_RPM: tidy includes 2022-05-03 09:14:58 +10:00
Randy Mackay
da961948db AP_RPM: pre-arm displays gpio vs servo_ch conflict 2022-04-26 15:19:28 +09: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
Henry Wurzburg
8556edc5ad AP_RPM: add note to desc's on how to determine GPIO pin numbers 2022-04-24 08:21:01 +09:00
Andrew Tridgell
e6b56ce9ba AP_RPM: use HarmonicNotch class 2022-04-19 09:39:03 +10:00
Andrew Tridgell
ac50d3cc9f AP_RPM: support two full harmonic notch filters 2022-04-19 09:39:03 +10:00
Peter Barker
ab86dafda7 AP_RPM: move logging of RPM into RPM library 2022-04-13 16:22:19 +10:00
Peter Barker
99a3d253db AP_RPM: move RPM sensor logging into AP_RPM 2022-01-11 11:09:26 +11:00
Gone4Dirt
c94b9e8a19 AP_RPM: Mark type = PWM as not used in docs 2021-08-25 09:36:58 +10:00
Gone4Dirt
df1280e999 AP_RPM: Whitespace changes 2021-08-25 09:36:58 +10:00
Gone4Dirt
5bb4729d61 AP_RPM: Restructure params to be per instance of _params 2021-08-25 09:36:58 +10:00
Andrew Tridgell
45f6b16dec AP_RPM: fixed formatting of pin arming check 2021-08-05 09:43:35 +10:00
bugobliterator
5653f8c08b AP_RPM: change class name from SITL::SITL to SITL::SIM 2021-08-05 07:25:31 +10:00
Andrew Tridgell
d827b35e57 AP_RPM: implement arming_checks() 2021-07-22 07:48:12 +10:00
Andrew Tridgell
095ab7c9d7 AP_RPM: replaced PixhawkAUX1 with AUX1
not everything is a pixhawk
2021-07-22 07:48:12 +10:00
Andrew Tridgell
7eaab583d4 AP_RPM: stop defaulting RPM_PIN to 54 2021-07-22 07:48:12 +10:00
yaapu
28905a1e67 AP_RPM: fixed #ifdef HAL_WITH_ESC_TELEM to #if HAL_WITH_ESC_TELEM 2021-07-02 15:35:05 +10:00
yaapu
cdc874c366 AP_RPM: added a new RPM driver based on ESC telem
this adds a new RPM driver based on average RPM of selected motors.
A new bitmask parameter has been added to select which motor to average.
2021-07-02 15:35:05 +10:00
Andrew Tridgell
6a1e3afe33 AP_RPM: use HAL_EFI_ENABLED 2021-06-09 18:07:00 +10:00
Peter Barker
370db00096 AP_RPM: add explicit RPM_TYPE_SITL
Old behaviour is that anything that wasn't claimed (or failed to
allocate) would become a SITL RPM sensor.  This meant we always had at
least one RPM sensor which was allocated but never provided valid data.

New behaviour is that if you want a SITL RPM sensor you have to set type
to 10.
2021-03-02 15:41:44 +11:00
Peter Barker
01eb64ce73 AP_RPM: don't present RPM2_PIN parameter if RPM_MAX_INSTANCES <=1 2021-02-16 08:26:18 +09:00
Andy Piper
c4217f329b AP_RPM: allow harmonic notch driver to appear as RPM values. 2020-04-14 09:43:16 +10:00
Andrew Tridgell
22ce90af34 AP_RPM: changed get_rpm() API to be scripting compatible
return a bool and use a reference for the value
2020-03-12 08:36:40 +11:00
Andy Piper
449e9ee13d AP_RPM: use updated rpm information for sitl 2019-12-17 10:07:06 +11:00
Gone4Dirt
5f11afde6d AP_RPM: Fix to SITL RPM driver instance 2019-12-09 16:00:20 +11:00
Andrew Tridgell
7e7bae9d55 AP_RPM: added EFI backend 2019-11-17 20:10:54 +11:00
Randy Mackay
353cb648f6 AP_RPM: rename px4-pwm to just pwm 2019-10-22 07:15:48 +08:00
Gone4Dirt
5239d86d13 AP_RPM: Added Arduino RPM Sensor Debug Tool
This debug tool has been created to help users correctly impliment
and debug various RPM sensors when an oscilloscope is unavailable.

The RPM Sensor wiki will direct to this tool to help users.
2019-08-20 09:13:09 +10:00
Peter Barker
503aeba7b7 AP_RPM: remove dangling update_instance declaration 2019-06-04 19:36:57 +09:00
Peter Barker
7498972b8d AP_RPM: add AP::rpm() call for singleton 2019-03-16 10:33:01 +09:00
IamPete1
696953fb97 AP_RPM: create singleton 2019-02-26 09:58:56 +09:00
Peter Barker
5aa5add4bf AP_RPM: add missing override keywords 2019-02-22 15:01:09 +00:00
Tom Pittenger
d27cd19daa AP_RPM: instance range should use define instead of hardcoded value 2019-02-20 00:51:03 -07:00
Tom Pittenger
2646e37e2c AP_RPM: set health false if disabled during runtime 2019-02-01 09:20:30 +09:00
Peter Barker
08173796d9 APM_RPM: remove PX4 backend type 2019-01-17 12:30:56 +11:00
Andrew Tridgell
e862c349e8 AP_RPM: set pin to input before attaching interrupt
this fixes input on AUX6 on CubeBlack
2018-11-08 18:25:14 +11:00
Peter Barker
34008ad29c AP_RPM: add override keyword where required 2018-11-08 11:30:12 +11:00
Andrew Tridgell
9b3788c83c AP_RPM: treat RPM_TYPE 1 as type 2 on non-PX4
makes upgrades easier
2018-10-17 13:55:01 +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
Peter Barker
ec6e2b9da8 AP_RPM: remove unneeded initialisations
These should always be static
2018-07-23 13:53:09 +09:00
Patrick José Pereira
00cb588257 AP_RPM: Use SITL singleton
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
2018-06-26 00:02:01 +01:00
Andrew Tridgell
c2adc26051 AP_RPM: support RPM pin input on ChibiOS 2018-04-07 09:10:29 +10:00