Skip to content

Commit

Permalink
ajout valve
Browse files Browse the repository at this point in the history
  • Loading branch information
Benhalor committed Mar 25, 2024
1 parent 1e12962 commit 253b6a8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions srcs/pc_cmv_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void PC_CMV_Controller::inhale() {
mainController.pressure(), mainController.dt());

inspiratoryValve.open(inspiratoryPidValue);
expiratoryValve.close();
//expiratoryValve.close();

// m_plateauStartTime is used for blower regulations, -5 is added to help blower convergence
if ((mainController.pressure() > (mainController.plateauPressureCommand() - 5))
Expand All @@ -109,11 +109,12 @@ void PC_CMV_Controller::inhale() {

void PC_CMV_Controller::exhale() {
// Close the inspiratory valve
inspiratoryValve.close();
inspiratoryValve.open(VALVE_CLOSED_STATE-PCexpiratoryPID(mainController.pressureCommand(),
mainController.pressure(), mainController.dt()));

// Open the expiratos valve so the patient can exhale outside
expiratoryValve.open(PCexpiratoryPID(mainController.pressureCommand(),
mainController.pressure(), mainController.dt()));
// expiratoryValve.open(PCexpiratoryPID(mainController.pressureCommand(),
// mainController.pressure(), mainController.dt()));
}

void PC_CMV_Controller::endCycle() { calculateBlowerIncrement(); }
Expand Down

0 comments on commit 253b6a8

Please sign in to comment.