13 #include "../includes/config.h"
14 #include "../includes/parameters.h"
44 uint16_t p_timerChannel,
46 uint16_t p_openApertureAngle,
47 uint16_t p_closeApertureAngle);
63 void open(uint16_t p_command);
101 MICROSEC_COMPARE_FORMAT);
Controls a pressure valve.
uint16_t valvePin
Data pin for this valve.
uint16_t maxApertureAngle
Maximum valve aperture angle in degrees.
uint16_t closeApertureAngle
Close aperture angle in degrees.
void setup()
Initialize this valve.
uint16_t minAperture() const
Minimum valve aperture angle in degrees.
PressureValve()
Default constructor.
uint16_t openApertureAngle
Open aperture angle in degrees.
uint16_t command
Value of the requested aperture.
void openSection(int32_t p_sectionMultiplyBy100)
Request opening of the Pressure Valve with a given section (in mm^2)
uint16_t minApertureAngle
Minimum valve aperture angle in degrees.
int32_t getSectionBigHoseX100()
void execute()
Command the valve to go to the requested aperture.
void open()
Request opening of the Pressure Valve.
HardwareTimer * actuator
Hardware time for this valve.
uint16_t timerChannel
TIM channel for this valve.
uint16_t positionLinear
Current aperture linear.
uint16_t maxAperture() const
Maximum valve aperture angle in degrees.
void close()
Request closing of the Pressure Valve.
uint16_t position
Current aperture.
uint16_t openLinear(uint16_t p_command)
Request opening of the Pressure Valve with a given angle with linearization.
PressureValve inspiratoryValve
uint16_t valveAngle2MicroSeconds(uint16_t value)
Convert an angle in degrees to a value in microseconds for the valve controller.
PressureValve expiratoryValve