software:firmware
MakAir Firmware
|
Controls a pressure valve. More...
#include <pressure_valve.h>
Public Member Functions | |
PressureValve () | |
Default constructor. More... | |
PressureValve (HardwareTimer *p_hardwareTimer, uint16_t p_timerChannel, uint16_t p_valvePin, uint16_t p_openApertureAngle, uint16_t p_closeApertureAngle) | |
Parameterized constructor. More... | |
void | setup () |
Initialize this valve. More... | |
void | open () |
Request opening of the Pressure Valve. More... | |
void | open (uint16_t p_command) |
Request opening of the Pressure Valve with a given angle. More... | |
uint16_t | openLinear (uint16_t p_command) |
Request opening of the Pressure Valve with a given angle with linearization. More... | |
int32_t | getSectionBigHoseX100 () |
void | openSection (int32_t p_sectionMultiplyBy100) |
Request opening of the Pressure Valve with a given section (in mm^2) More... | |
void | close () |
Request closing of the Pressure Valve. More... | |
void | execute () |
Command the valve to go to the requested aperture. More... | |
uint16_t | minAperture () const |
Minimum valve aperture angle in degrees. More... | |
uint16_t | maxAperture () const |
Maximum valve aperture angle in degrees. More... | |
Public Attributes | |
uint16_t | command |
Value of the requested aperture. More... | |
uint16_t | position |
Current aperture. More... | |
uint16_t | positionLinear |
Current aperture linear. More... | |
Private Attributes | |
uint16_t | minApertureAngle |
Minimum valve aperture angle in degrees. More... | |
uint16_t | maxApertureAngle |
Maximum valve aperture angle in degrees. More... | |
uint16_t | openApertureAngle |
Open aperture angle in degrees. More... | |
uint16_t | closeApertureAngle |
Close aperture angle in degrees. More... | |
HardwareTimer * | actuator |
Hardware time for this valve. More... | |
uint16_t | timerChannel |
TIM channel for this valve. More... | |
uint16_t | valvePin |
Data pin for this valve. More... | |
Controls a pressure valve.
Definition at line 29 of file pressure_valve.h.
PressureValve::PressureValve | ( | ) |
PressureValve::PressureValve | ( | HardwareTimer * | p_hardwareTimer, |
uint16_t | p_timerChannel, | ||
uint16_t | p_valvePin, | ||
uint16_t | p_openApertureAngle, | ||
uint16_t | p_closeApertureAngle | ||
) |
Parameterized constructor.
p_hardwareTimer | Hardware time for this valve |
p_timerChannel | TIM channel for this valve |
p_valvePin | Data pin for this valve |
p_openApertureAngle | Open aperture angle in degrees |
p_closeApertureAngle | Close aperture angle in degrees |
Definition at line 30 of file pressure_valve.cpp.
void PressureValve::close | ( | ) |
|
inline |
Command the valve to go to the requested aperture.
Definition at line 90 of file pressure_valve.h.
int32_t PressureValve::getSectionBigHoseX100 | ( | ) |
Definition at line 139 of file pressure_valve.cpp.
|
inline |
|
inline |
void PressureValve::open | ( | ) |
void PressureValve::open | ( | uint16_t | p_command | ) |
Request opening of the Pressure Valve with a given angle.
p_command | The angle in degree |
Definition at line 56 of file pressure_valve.cpp.
uint16_t PressureValve::openLinear | ( | uint16_t | p_command | ) |
Request opening of the Pressure Valve with a given angle with linearization.
p_command | The angle in degree |
Definition at line 81 of file pressure_valve.cpp.
void PressureValve::openSection | ( | int32_t | p_sectionMultiplyBy100 | ) |
Request opening of the Pressure Valve with a given section (in mm^2)
p_sectionMultiplyBy100 | The section to open tha valve (in mm^2 multiplied by 100) |
Definition at line 58 of file pressure_valve.cpp.
void PressureValve::setup | ( | ) |
Initialize this valve.
This must be called once to be able to use this Pressure Valve
Definition at line 47 of file pressure_valve.cpp.
|
private |
Hardware time for this valve.
Definition at line 135 of file pressure_valve.h.
|
private |
Close aperture angle in degrees.
Definition at line 132 of file pressure_valve.h.
uint16_t PressureValve::command |
Value of the requested aperture.
Definition at line 113 of file pressure_valve.h.
|
private |
Maximum valve aperture angle in degrees.
Definition at line 126 of file pressure_valve.h.
|
private |
Minimum valve aperture angle in degrees.
Definition at line 123 of file pressure_valve.h.
|
private |
Open aperture angle in degrees.
Definition at line 129 of file pressure_valve.h.
uint16_t PressureValve::position |
Current aperture.
Definition at line 116 of file pressure_valve.h.
uint16_t PressureValve::positionLinear |
Current aperture linear.
Definition at line 119 of file pressure_valve.h.
|
private |
TIM channel for this valve.
Definition at line 138 of file pressure_valve.h.
|
private |
Data pin for this valve.
Definition at line 141 of file pressure_valve.h.