Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPReady #86

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
21 changes: 21 additions & 0 deletions open_earable/lib/apps_tab/apps_tab.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:open_earable/apps_tab/cpready/cpready.dart';
import 'package:open_earable/apps_tab/posture_tracker/model/earable_attitude_tracker.dart';
import 'package:open_earable/apps_tab/posture_tracker/view/posture_tracker_view.dart';
import 'package:open_earable/apps_tab/neck_stretch/view/stretch_app_view.dart';
Expand Down Expand Up @@ -189,6 +190,26 @@ class AppsTab extends StatelessWidget {
);
},
),
AppInfo(
logoPath: "lib/apps_tab/cpready/assets/logo.png",
title: "CPReady",
description: "Guided CPR procedure.",
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Material(
child: Theme(
data: materialTheme,
child: CPReady(
openEarable,
),
),
),
),
);
},
),
// ... similarly for other apps
];
}
Expand Down
30 changes: 30 additions & 0 deletions open_earable/lib/apps_tab/cpready/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# CPReady

CPReady is an application for the [OpenEarable](https://open-earable.teco.edu).
It helps the user while performing CPR.

## Features
- Measures the frequency with which the user is currently performing CPR.
- Gives feedback according to the current frequency.
- Gives the user audio or visual support for staying within the recommended frequency range.
- Optionally supports mouth-to-mouth resuscitation by prompting the user to do so at the recommended times.

## Visual support
By default, a visual support is shown.
This visual support consists of an animation that shows an CPR procedure with a frequency of 110 bpm.
If the audio support is activated, the visual support is deactivated.

## Audio Support
It is possible to enable audio support.
For this feature to work, an audio file (.wav format) named "frequency.wav" needs to be on the SD card inserted into the earable.
This file needs to contain the metronome sound in the desired frequency.
An exemplary file is provided in the assets folder.
If the prerequisites are met, the audio support can be enabled with a button while doing CPR.

## Mouth-to-mouth resuscitation
Optionally, the app can prompt the user to do mouth-to-mouth resuscitation.
This is done by showing a pop-up dialogue after every 30 pushes.

## Tests
Since I only have an windows laptop and because of the gradle error, I could not test on an Emulator or physical android device.
The app is therefore only tested on Edge(Web) and Chrome(Web).
211 changes: 211 additions & 0 deletions open_earable/lib/apps_tab/cpready/assets/CPRBottom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading