Started on Network(Passive) datasource for use with esp8266 based seizure detector.

This commit is contained in:
Graham Jones
2017-09-01 22:10:37 +01:00
parent 87774a10ef
commit fc1683ad36
10 changed files with 968 additions and 36 deletions

View File

@@ -3,10 +3,12 @@
<string-array name="datasource_list">
<item>"Pebble Watch"</item>
<item>"Network"</item>
<item>"Network (passive)"</item>
</string-array>
<string-array name="datasource_list_values">
<item>"Pebble"</item>
<item>"Network"</item>
<item>"NetworkPassive"</item>
</string-array>
</resources>

View File

@@ -0,0 +1,122 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- The ListPreference data is defined in pebble_datasource_values.xml -->
<PreferenceScreen
xmlns:android="http://schemas.android.com/apk/res/android">
<PreferenceCategory android:title="User Interface Settings">
<EditTextPreference
android:defaultValue="5"
android:key="PebbleUpdatePeriod"
android:summary="Time period at which data is sent to the phone (does not affect analysis frequency - see Sample Period setting for that)"
android:title="Data Transfer Period (sec)" />
<EditTextPreference
android:defaultValue="300"
android:key="MutePeriod"
android:summary="Time that alarms are muted following a long press of the UP button"
android:title="Mute Period (sec)" />
<EditTextPreference
android:defaultValue="30"
android:key="ManAlarmPeriod"
android:summary="Time that manual alarms sound following a long press of the DOWN button"
android:title="Manual Alarm Period (sec)" />
</PreferenceCategory>
<PreferenceCategory android:title="Seizure Detector Settings">
<EditTextPreference
android:defaultValue="5"
android:key="WarnTime"
android:summary="Time to wait before initiating warning (Default = 5 sec)"
android:title="WarnTime (sec)" />
<EditTextPreference
android:defaultValue="10"
android:key="AlarmTime"
android:summary="Time to wait before initiating alarm (Default = 10 sec)"
android:title="AlarmTime (sec)" />
<EditTextPreference
android:defaultValue="100"
android:key="AlarmThresh"
android:summary="Alarm Threshold (Default = 100)"
android:title="AlarmThresh" />
<EditTextPreference
android:defaultValue="50"
android:key="AlarmRatioThresh"
android:summary="Alarm Ratio Threshold (Default = 50). Increase this value to reduce sensitivity if false alarms are a problem."
android:title="AlarmRatioThresh" />
<EditTextPreference
android:defaultValue="3"
android:key="AlarmFreqMin"
android:summary="Minimum Frequency of ROI (Hz) (Default = 3 Hz)"
android:title="AlarmFreqMin (Hz)" />
<EditTextPreference
android:defaultValue="10"
android:key="AlarmFreqMax"
android:summary="Maximum Frequency of ROI (Hz) (Default = 10 Hz)"
android:title="AlarmFreqMax (Hz)" />
<EditTextPreference
android:defaultValue="5"
android:key="SamplePeriod"
android:summary="Period (in seconds) between data analyses"
android:title="SamplePeriod (sec)" />
<ListPreference
android:key="PebbleSdMode"
android:title="Seizure Detector Mode"
android:summary="Select one of the three available modes of operation."
android:entries="@array/pebble_sd_mode_list"
android:entryValues="@array/pebble_sd_mode_list_values"
android:defaultValue="0"
android:dialogTitle="Select Seizure Detector Mode" />
<ListPreference
android:key="SampleFreq"
android:title="Select Sample Frequency"
android:summary="Higher Frequency is more Accurate, but uses more battery power."
android:entries="@array/pebble_sample_freq_list"
android:entryValues="@array/pebble_sample_freq_list_values"
android:defaultValue="100"
android:dialogTitle="Select Sample Frequency"
android:enabled="true"
/>
</PreferenceCategory>
<PreferenceCategory android:title="Fall Detector Settings">
<CheckBoxPreference
android:defaultValue="false"
android:key="FallActive"
android:summary=""
android:title="Activate Fall Detection Function" />
<EditTextPreference
android:defaultValue="200"
android:key="FallThreshMin"
android:summary=""
android:title="Fall Detection Lower Threshold (milli-g)" />
<EditTextPreference
android:defaultValue="1200"
android:key="FallThreshMax"
android:summary=""
android:title="Fall Detection Upper Threshold (milli-g)" />
<EditTextPreference
android:defaultValue="1500"
android:key="FallWindow"
android:summary=""
android:title="Fall Detection Window (milli-seconds)" />
</PreferenceCategory>
<PreferenceCategory
android:title="Watch Communications Settings">
<ListPreference
android:key="PebbleDebug"
android:title="Seizure Detector Debug Mode"
android:summary="Set Debug mode on or off."
android:entries="@array/pebble_debug_list"
android:entryValues="@array/pebble_debug_values"
android:defaultValue="0"
android:dialogTitle="Select Debug Mode" />
<EditTextPreference
android:defaultValue="10"
android:key="AppRestartTimeout"
android:numeric="integer"
android:summary="Period (seconds) that we wait for data from the watch before assuming the watch app is not running and re-starting it."
android:title="Period (sec) we wait for data before restarting watch app." />
</PreferenceCategory>
</PreferenceScreen>