software:firmware
MakAir Firmware
pressure_valve.h File Reference

Tools to control pressure valves. More...

Go to the source code of this file.

Classes

class  PressureValve
 Controls a pressure valve. More...
 

Functions

uint16_t valveAngle2MicroSeconds (uint16_t value)
 Convert an angle in degrees to a value in microseconds for the valve controller. More...
 

Variables

PressureValve expiratoryValve
 
PressureValve inspiratoryValve
 

Detailed Description

Tools to control pressure valves.

Author
Makers For Life

Definition in file pressure_valve.h.

Function Documentation

◆ valveAngle2MicroSeconds()

uint16_t valveAngle2MicroSeconds ( uint16_t  value)

Convert an angle in degrees to a value in microseconds for the valve controller.

Parameters
valueAngle in degrees
Returns
Value in microsends for the valve controller

Definition at line 152 of file pressure_valve.cpp.

152  {
153  // Faulhaber motors works with PWM
154  return map(value, 0, 125, FAULHABER_OPENED, FAULHABER_CLOSED);
155 }
#define FAULHABER_CLOSED
Definition: parameters.h:173
#define FAULHABER_OPENED
Definition: parameters.h:172

Variable Documentation

◆ expiratoryValve

PressureValve expiratoryValve
extern

Definition at line 23 of file pressure_valve.cpp.

◆ inspiratoryValve

PressureValve inspiratoryValve
extern

Definition at line 24 of file pressure_valve.cpp.