Browse Source

Commit before cleaning project for merge

tw
Tobias Wolz 1 year ago
parent
commit
81e04e370a

+ 1
- 1
app/src/main/java/com/example/ueberwachungssystem/Detector.java View File





/** Triggers onDetectionListener - call this to trigger violation/alarm */ /** Triggers onDetectionListener - call this to trigger violation/alarm */
private void reportViolation(String detectorID, String detectionType, float amplitude) {
public void reportViolation(String detectorID, String detectionType, float amplitude) {
if (listener != null) { if (listener != null) {
DetectionReport detectionReport = new DetectionReport(detectorID, detectionType, amplitude); DetectionReport detectionReport = new DetectionReport(detectorID, detectionType, amplitude);
listener.onDetection(detectionReport); listener.onDetection(detectionReport);

+ 1
- 0
app/src/main/java/com/example/ueberwachungssystem/MicrophoneDetector.java View File

if (progress[0].maxAmp >= Schwellwert_Alarm+kalibierWert && armed == true) { if (progress[0].maxAmp >= Schwellwert_Alarm+kalibierWert && armed == true) {
armed = false; armed = false;
detectionReport = new DetectionReport("Mic1", "Audio", maxAmpPrint); detectionReport = new DetectionReport("Mic1", "Audio", maxAmpPrint);
//reportViolation("Mic1", "Audio", maxAmpPrint);
logger.log(""); logger.log("");
logger.log("Alarm!"); logger.log("Alarm!");
logger.log(detectionReport.toString()); logger.log(detectionReport.toString());

+ 2
- 0
app/src/main/res/layout/activity_main.xml View File

android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Log" android:text="Log"
app:layout_constraintBottom_toTopOf="@+id/graph"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/TglBtn_Mic" /> app:layout_constraintTop_toBottomOf="@+id/TglBtn_Mic" />



Loading…
Cancel
Save