repo time

Dependencies:   mbed MAX14720 MAX30205 USBDevice

Revision:
20:6d2af70c92ab
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/res/layout/activity_sensor.xml	Tue Apr 06 06:41:40 2021 +0000
@@ -0,0 +1,528 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:id="@+id/activity_sensor1"
+    android:orientation="vertical" android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:weightSum="1"
+    tools:context="com.example.android.bluetoothlegatt.SensorActivity"
+    android:background="#d7d7d7">
+
+    <GridLayout
+        android:id="@+id/deviceInformation"
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_alignParentTop="true"
+        android:columnCount="2"
+        android:useDefaultMargins="true"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:layout_marginTop="5dp"
+        android:background="#f4f4f4">
+
+        <TextView
+            style="@style/GridLayoutTitleTextView"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textSize="10sp"
+            android:text="@string/label_device_address"/>
+
+        <TextView
+            android:id="@+id/device_address"
+            android:textSize="10sp"
+            style="@style/GridLayoutDataTextView"/>
+
+        <TextView
+            android:textSize="10sp"
+            style="@style/GridLayoutTitleTextView"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="@string/label_state"/>
+
+        <TextView
+            android:textSize="10sp"
+            android:id="@+id/connection_state"
+            style="@style/GridLayoutDataTextView"/>
+    </GridLayout>
+
+
+    <!-- Temperature Top (WSN Temperature) -->
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="65dp"
+        android:id="@+id/relativeLayout1"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:layout_marginTop="5dp"
+        android:background="#f4f4f4">
+
+        <ImageView
+            android:layout_width="40dp"
+            android:layout_height="40dp"
+            android:id="@+id/imageView"
+            android:layout_marginTop="7dp"
+            android:background="@drawable/temperature"
+            android:layout_gravity="left"
+            android:layout_marginLeft="5dp" />
+
+        <LinearLayout
+            android:orientation="vertical"
+            android:layout_width="100dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="5dp"
+            android:layout_alignParentStart="false"
+            android:layout_toEndOf="@id/imageView"
+            android:layout_alignParentEnd="false"
+            android:id="@+id/layout1">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:text="MAX30205 1"
+                android:textSize="15sp"
+                android:id="@+id/textView3"
+                android:textColor="#0a5dff" />
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:text="---- F"
+                android:textSize="22dp"
+                android:id="@+id/textTempTop"
+                android:textColor="#5e5e5e" />
+
+        </LinearLayout>
+
+        <view
+            android:layout_width="fill_parent"
+            android:layout_height="match_parent"
+            android:layout_gravity="right"
+            android:layout_marginRight="5dp"
+            class="graphing.LineGraphing"
+            android:id="@+id/lineGraphingTemperature1"
+            android:layout_toEndOf="@id/layout1" />
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:text="-- --"
+            android:textSize="10dp"
+            android:id="@+id/textTempTopRaw"
+            android:textColor="#5e5e5e"
+            android:layout_alignParentBottom="true"
+            android:layout_alignStart="@+id/layout1" />
+    </RelativeLayout>
+
+    <!-- Temperature Bottom (WSN Humidity) -->
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="65dp"
+        android:id="@+id/relativeLayout2"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:layout_marginTop="5dp"
+        android:background="#f4f4f4">
+
+        <ImageView
+            android:layout_width="40dp"
+            android:layout_height="40dp"
+            android:id="@+id/imageView2"
+            android:layout_marginTop="7dp"
+            android:background="@drawable/temperature"
+            android:layout_gravity="left"
+            android:layout_marginLeft="5dp" />
+
+        <LinearLayout
+            android:orientation="vertical"
+            android:layout_width="100dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="5dp"
+            android:layout_alignParentStart="false"
+            android:layout_toEndOf="@id/imageView2"
+            android:layout_alignParentEnd="false"
+            android:id="@+id/layout2">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:text="MAX30205 2"
+                android:textSize="15sp"
+                android:id="@+id/textView2"
+                android:textColor="#0a5dff" />
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:text="---- F"
+                android:textSize="22dp"
+                android:id="@+id/textTempBottom"
+                android:textColor="#5e5e5e" />
+        </LinearLayout>
+
+        <view
+            android:layout_width="fill_parent"
+            android:layout_height="match_parent"
+            android:layout_gravity="right"
+            android:layout_marginRight="5dp"
+            class="graphing.LineGraphing"
+            android:id="@+id/lineGraphingTemperature2"
+            android:layout_toEndOf="@id/layout2" />
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:text="-- --"
+            android:textSize="10dp"
+            android:id="@+id/textTempBottomRaw"
+            android:textColor="#5e5e5e"
+            android:layout_alignParentBottom="true"
+            android:layout_alignStart="@+id/layout2" />
+    </RelativeLayout>
+
+
+
+
+
+
+
+
+    <!-- LIS2DH (WSN Light) -->
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="65dp"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:layout_marginTop="5dp"
+        android:id="@+id/relativeLayout3"
+        android:background="#f4f4f4">
+
+        <ImageView
+            android:layout_width="30dp"
+            android:layout_height="40dp"
+            android:id="@+id/imageView3"
+            android:background="@drawable/accelerometer2"
+            android:layout_gravity="left"
+            android:layout_marginLeft="10dp"
+            android:layout_marginTop="5dp"
+            android:layout_marginBottom="5dp" />
+
+        <LinearLayout
+            android:orientation="vertical"
+            android:layout_width="100dp"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="10dp"
+            android:layout_alignParentStart="false"
+            android:layout_toEndOf="@id/imageView3"
+            android:layout_alignParentEnd="false"
+            android:id="@+id/layout3">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:text="LIS2DH"
+                android:textSize="17sp"
+                android:id="@+id/textView4"
+                android:textColor="#0a5dff" />
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:text="X: ---"
+                android:textSize="6dp"
+                android:id="@+id/textLIS2DH_X"
+                android:textColor="#5e5e5e" />
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:text="Y: ---"
+                android:textSize="6dp"
+                android:id="@+id/textLIS2DH_Y"
+                android:textColor="#5e5e5e" />
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:text="Z: ---"
+                android:textSize="6dp"
+                android:id="@+id/textLIS2DH_Z"
+                android:textColor="#5e5e5e" />
+        </LinearLayout>
+
+
+
+
+        <view
+            android:layout_width="fill_parent"
+            android:layout_height="match_parent"
+            android:layout_gravity="right"
+            android:layout_marginRight="5dp"
+            class="graphing.LineGraphing"
+            android:id="@+id/lineGraphingAccelerometer"
+            android:visibility="visible"
+            android:layout_toEndOf="@id/layout3"
+            />
+
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:text="  Mission Stopped"
+            android:id="@+id/textView7"
+            android:layout_centerVertical="true"
+            android:layout_alignEnd="@+id/lineGraphingAccelerometer"
+            android:textAlignment="center"
+            android:textColor="#bfbfbf"
+            android:layout_toEndOf="@+id/layout3"
+            android:visibility="invisible" />
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:text="-- --"
+            android:textSize="10dp"
+            android:id="@+id/textLIS2DHRaw"
+            android:textColor="#5e5e5e"
+            android:layout_alignParentBottom="true"
+            android:layout_alignStart="@+id/layout3" />
+
+
+    </RelativeLayout>
+
+
+    <!-- BMP280 (WSN Pressure) -->
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="65dp"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:layout_marginTop="5dp"
+        android:id="@+id/relativeLayout4"
+        android:background="#f4f4f4">
+
+        <ImageView
+            android:layout_width="35dp"
+            android:layout_height="40dp"
+            android:layout_weight="1"
+            android:id="@+id/imageView4"
+            android:layout_marginTop="5dp"
+            android:background="@drawable/pressure"
+            android:layout_gravity="left"
+            android:layout_marginLeft="7dp"
+            android:layout_marginRight="3dp" />
+
+        <LinearLayout
+            android:orientation="vertical"
+            android:layout_width="100dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:layout_marginTop="0dp"
+            android:layout_alignParentStart="false"
+            android:layout_toEndOf="@id/imageView4"
+            android:layout_alignParentEnd="false"
+            android:layout_marginLeft="5dp"
+            android:id="@+id/layout4">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:text="BMP280"
+                android:textSize="17sp"
+                android:id="@+id/textView"
+                android:textColor="#0a5dff" />
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:text="---- Pa"
+                android:textSize="15dp"
+                android:id="@+id/textPressure"
+                android:textColor="#5e5e5e" />
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:text="---- F"
+                android:textSize="22dp"
+                android:id="@+id/textTemperature"
+                android:textColor="#5e5e5e"
+                android:visibility="gone" />
+        </LinearLayout>
+
+        <view
+            android:layout_width="fill_parent"
+            android:layout_height="match_parent"
+            android:layout_gravity="right"
+            android:layout_marginRight="5dp"
+            class="graphing.LineGraphing"
+            android:id="@+id/lineGraphingPressure"
+            android:layout_toEndOf="@id/layout4" />
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:text="-- --"
+            android:textSize="10dp"
+            android:id="@+id/textPressureRaw"
+            android:textColor="#5e5e5e"
+            android:layout_alignParentBottom="true"
+            android:layout_alignStart="@+id/layout4" />
+    </RelativeLayout>
+
+
+
+    <!-- ECG Heartrate -->
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="65dp"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:layout_marginTop="5dp"
+        android:id="@+id/relativeLayout5"
+        android:background="#f4f4f4">
+
+        <ImageView
+            android:layout_width="35dp"
+            android:layout_height="40dp"
+            android:layout_weight="1"
+            android:id="@+id/imageView5"
+            android:layout_marginTop="5dp"
+            android:background="@drawable/heart"
+            android:layout_gravity="left"
+            android:layout_marginLeft="7dp"
+            android:layout_marginRight="3dp" />
+
+        <LinearLayout
+            android:orientation="vertical"
+            android:layout_width="100dp"
+            android:layout_height="wrap_content"
+            android:layout_weight="1"
+            android:layout_marginTop="0dp"
+            android:layout_alignParentStart="false"
+            android:layout_toEndOf="@id/imageView5"
+            android:layout_alignParentEnd="false"
+            android:layout_marginLeft="5dp"
+            android:id="@+id/layout5">
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:text="ECG HeartRate"
+                android:textSize="12sp"
+                android:id="@+id/textView5"
+                android:textColor="#0a5dff" />
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textAppearance="?android:attr/textAppearanceLarge"
+                android:text="-- BPM"
+                android:textSize="16dp"
+                android:id="@+id/textHeartRate"
+                android:textColor="#5e5e5e" />
+        </LinearLayout>
+
+        <view
+            android:layout_width="fill_parent"
+            android:layout_height="match_parent"
+            android:layout_gravity="right"
+            android:layout_marginRight="5dp"
+            class="graphing.LineGraphing"
+            android:id="@+id/lineGraphingHeartrate"
+            android:layout_toEndOf="@id/layout5"
+            android:visibility="visible" />
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:text="-- --"
+            android:textSize="10dp"
+            android:id="@+id/textHeartRateRaw"
+            android:textColor="#5e5e5e"
+            android:layout_alignParentBottom="true"
+            android:layout_alignStart="@+id/layout5" />
+        <TextView
+            android:id="@+id/clickStartBtn"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="Start"
+            android:textSize="12sp"
+            android:onClick="onClick"
+            android:clickable="true"
+            android:layout_alignBottom="@+id/textHeartRateRaw"
+            android:layout_alignEnd="@+id/layout5"
+            android:background="#505050"
+            android:textColor="#ffffff"
+            android:paddingLeft="5dp"
+            android:paddingRight="5dp"
+            android:layout_marginBottom="1dp"
+            android:visibility="gone" />
+
+        <TextView
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:textAppearance="?android:attr/textAppearanceLarge"
+            android:text="  Mission Stopped"
+            android:id="@+id/textView8"
+            android:textAlignment="center"
+            android:textColor="#bfbfbf"
+            android:layout_alignBottom="@+id/imageView5"
+            android:layout_toEndOf="@+id/layout5"
+            android:visibility="invisible" />
+    </RelativeLayout>
+
+
+
+
+    <RelativeLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:layout_marginLeft="10dp"
+        android:layout_marginRight="10dp"
+        android:layout_marginTop="5dp"
+        android:id="@+id/relativeLayout6"
+        android:background="#f4f4f4"
+        android:visibility="gone">
+
+        <Button
+            style="?android:attr/buttonStyleSmall"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="test"
+            android:id="@+id/btnTest"
+            android:layout_alignParentTop="true"
+            android:layout_alignParentStart="true" />
+
+        <Button
+            style="?android:attr/buttonStyleSmall"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="Update"
+            android:id="@+id/btnUpdate"
+            android:layout_alignParentTop="true"
+            android:layout_toEndOf="@+id/btnTest" />
+
+        <Button
+            style="?android:attr/buttonStyleSmall"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:text="Subscribe"
+            android:id="@+id/btnSubscribe"
+            android:layout_alignParentTop="true"
+            android:layout_toEndOf="@+id/btnUpdate" />
+    </RelativeLayout>
+
+    <Button
+    style="?android:attr/buttonStyleSmall"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content"
+    android:text="Start Mission"
+    android:id="@+id/clickStartBtn2"
+    android:backgroundTint="#00b2a9" />
+
+</LinearLayout>
\ No newline at end of file