Skip to content

Commit

Permalink
Merge pull request #17 from makers-for-life/reset-blower-speed-when-s…
Browse files Browse the repository at this point in the history
…topped

reset blower speed
  • Loading branch information
dsferruzza authored May 19, 2020
2 parents 4c977cf + b152d54 commit 4ddbb49
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions includes/pressure_controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ class PressureController {
*/
void updateDt(int32_t p_dt);

void resetBlowerDefaultSpeed();

private:
/**
* Update the cycle phase
Expand Down
2 changes: 2 additions & 0 deletions srcs/pressure_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -875,3 +875,5 @@ PressureController::pidPatient(int32_t targetPressure, int32_t currentPressure,

return patientAperture;
}

void PressureController::resetBlowerDefaultSpeed() { m_blower->runSpeed(DEFAULT_BLOWER_SPEED); }
1 change: 1 addition & 0 deletions srcs/respirator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ void loop(void) {
pController.compute(centiSec);
} else {
digitalWrite(PIN_LED_START, LED_START_INACTIVE);
pController.resetBlowerDefaultSpeed();
blower.stop();

// Stop alarms related to breathing cycle
Expand Down

0 comments on commit 4ddbb49

Please sign in to comment.