APM:Libraries
libraries
AP_RPM
RPM_PX4_PWM.h
Go to the documentation of this file.
1
/*
2
This program is free software: you can redistribute it and/or modify
3
it under the terms of the GNU General Public License as published by
4
the Free Software Foundation, either version 3 of the License, or
5
(at your option) any later version.
6
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
11
12
You should have received a copy of the GNU General Public License
13
along with this program. If not, see <http://www.gnu.org/licenses/>.
14
*/
15
#pragma once
16
17
#include "
AP_RPM.h
"
18
#include "
RPM_Backend.h
"
19
#include <
Filter/Filter.h
>
20
#include <
AP_Math/AP_Math.h
>
21
22
class
AP_RPM_PX4_PWM
:
public
AP_RPM_Backend
23
{
24
public
:
25
// constructor
26
AP_RPM_PX4_PWM
(
AP_RPM
&ranger, uint8_t instance,
AP_RPM::RPM_State
&_state);
27
28
// destructor
29
~AP_RPM_PX4_PWM
(
void
);
30
31
// update state
32
void
update
(
void
);
33
34
private
:
35
int
_fd
= -1;
36
int
_logfd
= -1;
37
uint64_t
_last_timestamp
= 0;
38
uint32_t
_resolution_usec
= 1;
39
40
ModeFilterFloat_Size5
signal_quality_filter
{3};
41
};
AP_RPM::RPM_State
Definition:
AP_RPM.h:46
AP_RPM_Backend
Definition:
RPM_Backend.h:21
AP_RPM_PX4_PWM::_logfd
int _logfd
Definition:
RPM_PX4_PWM.h:36
AP_RPM.h
AP_RPM_PX4_PWM::signal_quality_filter
ModeFilterFloat_Size5 signal_quality_filter
Definition:
RPM_PX4_PWM.h:40
AP_RPM_PX4_PWM::AP_RPM_PX4_PWM
AP_RPM_PX4_PWM(AP_RPM &ranger, uint8_t instance, AP_RPM::RPM_State &_state)
Definition:
RPM_PX4_PWM.cpp:46
AP_RPM_PX4_PWM::_fd
int _fd
Definition:
RPM_PX4_PWM.h:35
Filter.h
RPM_Backend.h
AP_RPM_PX4_PWM::_resolution_usec
uint32_t _resolution_usec
Definition:
RPM_PX4_PWM.h:38
AP_RPM
Definition:
AP_RPM.h:27
AP_Math.h
AP_RPM_PX4_PWM::update
void update(void)
Definition:
RPM_PX4_PWM.cpp:87
ModeFilter< float, 5 >
AP_RPM_PX4_PWM
Definition:
RPM_PX4_PWM.h:22
AP_RPM_PX4_PWM::_last_timestamp
uint64_t _last_timestamp
Definition:
RPM_PX4_PWM.h:37
AP_RPM_PX4_PWM::~AP_RPM_PX4_PWM
~AP_RPM_PX4_PWM(void)
Definition:
RPM_PX4_PWM.cpp:79
Generated on Sun Jun 17 2018 14:18:51 for APM:Libraries by
1.8.13