Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: Main.cpp
- Revision:
- 9:256989faeb3b
- Parent:
- 8:fa5cc1397510
- Child:
- 10:09fe2b1474bf
diff -r fa5cc1397510 -r 256989faeb3b Main.cpp --- a/Main.cpp Thu Apr 09 03:18:31 2020 +0000 +++ b/Main.cpp Fri Apr 10 11:56:58 2020 +0000 @@ -6,33 +6,7 @@ This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, you can obtain one at <https://mozilla.org/MPL/2.0/>. */ - -#define GHVDebug 1 //< Set to 0 or 1 to enable or disable debugging. - -#include "GHVentilator.h" -using namespace SickBay; - +#include "GHVentilatorTargetMbed.hpp" int main () { - int UpdatesPerSecond = 250; - I2C I2CBus(A4, A5); - int Address = BMP280SlaveAddressDefault; - GHVentilator GHV (UpdatesPerSecond, - UpdatesPerSecond >> 4, //<-- Max PEEP ticks before inhale. - UpdatesPerSecond * 10, //<-- Calibration state tick count. - I2CBus, Address, - 0.25f, //<-------------- Pressure chamber hysteresis %. - 0.01f, // <------------- Patient pressure hysteresis, - D0, // <------------- Blower pin. - D1, // <------------- Status pin. - // +------------------ Pulse oximiter pin. - // | +-------------- Flow sensor interrupt pin. - // | | +-------- Solenoid Vavle. - // | | | +--- PWM Servo - // v v v v - GHVentilatorChannel (A0, D3, D4, D5, I2CBus,Address+1).This(), - GHVentilatorChannel (A1, D6, D7, D8, I2CBus,Address+2).This(), - GHVentilatorChannel (A2, D9, D10, D11, I2CBus,Address+3).This(), - // This channel is for an STM Nucleo-L152RE; use your dev boards pins. - GHVentilatorChannel (A3, PC_8, PC_6, PC_5, I2CBus,Address+4).This() - ); + return SickBay::GHVentilator().Status; }