APM:Libraries
libraries
AP_HAL_Linux
Heat_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_HAL_Linux.h
"
18
#include "
PWM_Sysfs.h
"
19
#include "
Heat.h
"
20
21
namespace
Linux
{
22
23
class
HeatPwm
:
public
Heat
{
24
public
:
25
HeatPwm
(uint8_t pwm_num,
float
Kp,
float
Ki,
26
uint32_t period_ns);
27
void
set_imu_temp
(
float
current)
override
;
28
void
set_imu_target_temp
(int8_t *target)
override
;
29
30
private
:
31
PWM_Sysfs_Base
*
_pwm
;
32
uint32_t
_last_temp_update
= 0;
33
float
_Kp
;
34
float
_Ki
;
35
uint32_t
_period_ns
;
36
float
_sum_error
;
37
int8_t *
_target
=
nullptr
;
38
};
39
40
}
Linux::HeatPwm::HeatPwm
HeatPwm(uint8_t pwm_num, float Kp, float Ki, uint32_t period_ns)
Definition:
Heat_Pwm.cpp:39
Heat.h
Linux::HeatPwm::_Kp
float _Kp
Definition:
Heat_Pwm.h:33
PWM_Sysfs.h
Linux::HeatPwm::_target
int8_t * _target
Definition:
Heat_Pwm.h:37
Linux::HeatPwm::_Ki
float _Ki
Definition:
Heat_Pwm.h:34
Linux::HeatPwm::_sum_error
float _sum_error
Definition:
Heat_Pwm.h:36
Linux::HeatPwm::_last_temp_update
uint32_t _last_temp_update
Definition:
Heat_Pwm.h:32
Linux::Heat
Definition:
Heat.h:19
Linux::PWM_Sysfs_Base
Definition:
PWM_Sysfs.h:10
Linux::HeatPwm
Definition:
Heat_Pwm.h:23
AP_HAL_Linux.h
Linux
Definition:
CameraSensor.h:19
Linux::HeatPwm::_period_ns
uint32_t _period_ns
Definition:
Heat_Pwm.h:35
Linux::HeatPwm::set_imu_target_temp
void set_imu_target_temp(int8_t *target) override
Definition:
Heat_Pwm.cpp:92
Linux::HeatPwm::_pwm
PWM_Sysfs_Base * _pwm
Definition:
Heat_Pwm.h:31
Linux::HeatPwm::set_imu_temp
void set_imu_temp(float current) override
Definition:
Heat_Pwm.cpp:57
Generated on Sun Jun 17 2018 14:18:49 for APM:Libraries by
1.8.13