Commit Graph

38 Commits

Author SHA1 Message Date
Peter Barker
99a3d253db AP_RPM: move RPM sensor logging into AP_RPM 2022-01-11 11:09:26 +11: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
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
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
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
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
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
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
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
Andrew Tridgell
c2adc26051 AP_RPM: support RPM pin input on ChibiOS 2018-04-07 09:10:29 +10:00
LukeMike
a319f6632f VRBRAIN / AP_RPM: removed RPM_PX4_PWM for VR Brain 5.1 and VR Micro Brain 5.2 (they haven't this input pin) 2018-02-05 08:26:49 +11:00
Andrew Tridgell
9e2cfabb8a AP_RPM: support RPM input on any AUX pin 2017-04-04 16:33:45 +10: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
Peter Barker
ecd061dad5 AP_RPM: add missing parameter metadata 2016-10-27 09:15:03 -07: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
Andrew Tridgell
8571202199 AP_RPM: allow for low RPM measurements on PX4
this automatically adjusts the timer resolution to allow for low RPM
measurements on PX4
2016-05-14 18:05:13 +10:00
Robert Lefebvre
59a44008d7 AP_RPM: Move timeout check into synthetic quality check. 2015-12-08 08:25:19 +11:00
Robert Lefebvre
fd106b20c7 AP_RPM: Add Minimum Quality Parameter 2015-12-08 08:25:19 +11:00
Robert Lefebvre
f04668307d AP_RPM: Add Minimum RPM parameter 2015-12-08 08:25:18 +11:00
Robert Lefebvre
a08fa50fda AP_RPM: Add enabled() method to check if sensor is enabled 2015-12-08 08:25:18 +11:00
Andrew Tridgell
45ea2a9b68 AP_RPM: added a SITL RPM backend 2015-11-23 14:30:42 +11:00
Caio Marcelo de Oliveira Filho
9639add306 AP_RPM: use millis/micros/panic functions 2015-11-20 12:33:57 +09:00
Lucas De Marchi
831d8acca5 Remove use of PROGMEM
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:

    git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
    git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'

The 2 commands were done so we don't leave behind spurious spaces.

AVR-specific places were not changed.
2015-10-30 14:35:16 +09:00
Andrew Tridgell
ac363c5447 AP_RPM: added RPM_MAX parameter
attempt to avoid noise in the pulses
2015-09-25 12:05:43 +10:00
Andrew Tridgell
39c219d452 AP_RPM: first version of RPM sensor driver 2015-08-12 15:03:49 +10:00