APM:Libraries
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 
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 
41 };
ModeFilterFloat_Size5 signal_quality_filter
Definition: RPM_PX4_PWM.h:40
AP_RPM_PX4_PWM(AP_RPM &ranger, uint8_t instance, AP_RPM::RPM_State &_state)
Definition: RPM_PX4_PWM.cpp:46
uint32_t _resolution_usec
Definition: RPM_PX4_PWM.h:38
Definition: AP_RPM.h:27
void update(void)
Definition: RPM_PX4_PWM.cpp:87
uint64_t _last_timestamp
Definition: RPM_PX4_PWM.h:37
~AP_RPM_PX4_PWM(void)
Definition: RPM_PX4_PWM.cpp:79