Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jamorham committed Dec 17, 2024
2 parents c26fefe + 0cf8d8f commit d829e21
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ public static List<StatusItem> megaStatus() {
for (Map.Entry entry : indexed.entrySet()) {
final RollCall rc = (RollCall) entry.getValue();
// TODO refactor with stringbuilder
lf.add(new StatusItem(rc.role + (desert_sync ? rc.getRemoteWifiIndicate(our_wifi_ssid) : "") + (engineering ? ("\n" + JoH.niceTimeSince(rc.last_seen) + " ago") : ""), rc.bestName() + (desert_sync ? rc.getRemoteIpStatus() : "") + (engineering && rc.batteryValid() ? ("\n" + rc.battery + "%") : "") + (engineering && rc.bridgeBatteryValid() ? (" " + rc.bridge_battery+"%") : "")));
lf.add(new StatusItem(rc.role + (desert_sync ? rc.getRemoteWifiIndicate(our_wifi_ssid) : "") + (engineering ? ("\n" + JoH.niceTimeSince(rc.last_seen) + " ago") : ""), rc.bestName() + (desert_sync ? rc.getRemoteIpStatus() : "") + (rc.batteryValid() ? ("\n" + rc.battery + "%") : "") + (engineering && rc.bridgeBatteryValid() ? (" " + rc.bridge_battery+"%") : "")));
}

Collections.sort(lf, new Comparator<StatusItem>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1144,7 +1144,6 @@ public void onCreate(Bundle savedInstanceState) {
bindPreferenceSummaryToValue(findPreference("cloud_storage_mongodb_uri"));
bindPreferenceSummaryToValue(findPreference("cloud_storage_mongodb_collection"));
bindPreferenceSummaryToValue(findPreference("cloud_storage_mongodb_device_status_collection"));
bindPreferenceSummaryToValue(findPreference("cloud_storage_api_base"));

addPreferencesFromResource(R.xml.pref_advanced_settings);
addPreferencesFromResource(R.xml.xdrip_plus_prefs);
Expand Down
15 changes: 15 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
<string name="pref_title_api_enabled">Enabled</string>
<string name="pref_summary_api_enabled">The REST API is the standard way to connect to Nightscout</string>
<string name="pref_title_api_url">Base URL</string>
<string name="pref_summary_api_url">Format: https://password@hostname/api/v1/</string>
<string name="pref_dialog_api_url">Enter Base API URL</string>
<string name="pref_message_api_url">This only the base URL, the uploader will automatically append /entries for the POST. API_SECRET on the server should match yourpassphrase in this setting.</string>
<string name="pref_default_api_url">https://yourpassphrase@{YOUR-SITE}.azurewebsites.net/api/v1/</string>
Expand Down Expand Up @@ -780,6 +781,8 @@
<string name="glucose_meters">Glucose Meters</string>
<string name="glucose_meter_options">Options for wireless glucose meters</string>
<string name="auto_connect_to_meter">Automatically connect and retrieve data from a standard\'s compliant glucose meter like the Contour Next One</string>
<string name="summary_use_nfc_meter">Download glucose records from NFC meter when xDrip is open</string>
<string name="title_use_nfc_meter">Use NFC Meter</string>
<string name="use_bluetooth_meter">Use Bluetooth Meter</string>
<string name="scan_for_bluetooth_meter">Scan for Bluetooth Meter</string>
<string name="meter_connect_sound">Enable this to play sound effects when the meter connects, disconnects or syncs data</string>
Expand Down Expand Up @@ -1248,6 +1251,12 @@
<string name="title_tidepool_window_latency">Data Age Mins</string>
<string name="summary_tidepool_dev_servers">If enabled, uploads will go to https://int-app.tidepool.org instead of the regular https://app.tidepool.org/</string>
<string name="title_tidepool_dev_servers">Use Integration (test) servers</string>
<string name="summary_tidepool_upload_when_chargeonly">Upload data only when charging</string>
<string name="title_tidepool_upload_when_chargeonly">Only when charging</string>
<string name="summary_tidepool_upload_only_wifi">Upload data only when connected to an unmetered network like Wifi</string>
<string name="title_tidepool_upload_only_wifi">Only on Wifi</string>
<string name="summary_tidepool_upload_no_treatment">Upload only CGM data to avoid duplicates with manual pump upload</string>
<string name="title_tidepool_upload_no_treatment">Don\'t upload treatments</string>
<string name="title_tidepool">Tidepool</string>
<string name="show_help">Show Help</string>
<string name="load_save_settings_on_sdcard">Load / Save Settings</string>
Expand Down Expand Up @@ -1330,6 +1339,8 @@
<string name="summary_lefun_send_alarms">Send notifications to the band for glucose alarms</string>
<string name="title_lefun_send_alarms">Send Alarms</string>
<string name="title_lefun_option_shake_snoozes">Shake to Snooze</string>
<string name="summary_lefun_send_calls">Send call notifications to the band</string>
<string name="title_lefun_send_calls">Send Calls</string>
<string name="title_lefun_screens_features">Lefun Screens / Features</string>
<string name="title_features">Features</string>
<string name="title_lefun_feature_lift_to_wak">Lift to Wake</string>
Expand Down Expand Up @@ -1397,6 +1408,8 @@
<string name="title_ob1_g5_fallback_to_xdrip">Fallback to xDrip</string>
<string name="summary_ob1_minimize_scanning">Use heuristics to minimize Bluetooth scanning + save power</string>
<string name="title_ob1_minimize_scanning">Minimize Scanning</string>
<string name="summary_ob1_avoid_scanning">Avoid scanning as much as possible (reduces battery usage further)</string>
<string name="title_ob1_avoid_scanning">Avoid Scanning</string>
<string name="summary_using_g6">I am using a G6, G7, Dexcom 1 or One+ Sensor</string>
<string name="title_using_g6">G6/G7/Dex1/One+ Support</string>
<string name="summary_ob1_g5_allow_resetbond">OB1 collector can unbond if it thinks the encryption has failed. If you get problems with it unpairing then disable this option. If you then totally lose connection, make sure this is enabled.</string>
Expand Down Expand Up @@ -1920,6 +1933,8 @@
<string name="audio_focus_lower_volume_of_other_apps">Lower volume of other apps</string>
<string name="audio_focus_pause_other_apps_playing_audio">Pause other apps playing audio</string>
<string name="audio_focus_pause_all_other_sounds">Pause all other sounds</string>
<string name="wake_up_screen">Wake Screen</string>
<string name="wake_up_screen_summary">Wake up screen during alerts. Might unlock devices that don\'t have screen lock enabled.</string>
<string name="use_camera_light">Use Camera Light</string>
<string name="use_camera_light_summary">Flash camera light during alerts when connected to a charger</string>
<string name="g7_should_start_automatically">G7 should start automatically</string>
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/xml/pref_advanced_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,8 @@
android:defaultValue="false"
android:dependency="lefun_enabled"
android:key="lefun_option_call_notifications"
android:summary="Send call notifications to the band (Android 6+)"
android:title="Send Calls" />
android:summary="@string/summary_lefun_send_calls"
android:title="@string/title_lefun_send_calls" />

<PreferenceScreen android:title="@string/title_lefun_screens_features"
android:key="lefun_features">
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/xml/pref_data_source.xml
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@
android:dependency="ob1_minimize_scanning"
android:enabled="true"
android:key="ob1_avoid_scanning"
android:summary="Avoid scanning as much as possible (reduces battery usage further)"
android:title="Avoid Scanning" />
android:summary="@string/summary_ob1_avoid_scanning"
android:title="@string/title_ob1_avoid_scanning" />
<CheckBoxPreference
android:defaultValue="false"
android:key="using_g6"
Expand Down
19 changes: 10 additions & 9 deletions app/src/main/res/xml/pref_data_sync.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@
android:dialogTitle="@string/pref_dialog_api_url"
android:inputType="textUri"
android:key="cloud_storage_api_base"
android:title="@string/pref_title_api_url" />
android:title="@string/pref_title_api_url"
android:summary="@string/pref_summary_api_url"/>

<PreferenceScreen
android:key="download_treatments_screen"
Expand Down Expand Up @@ -310,18 +311,18 @@
<CheckBoxPreference
android:defaultValue="false"
android:key="tidepool_only_while_charging"
android:summary="Upload data only when charging"
android:title="Only when charging" />
android:summary="@string/summary_tidepool_upload_when_chargeonly"
android:title="@string/title_tidepool_upload_when_chargeonly" />
<CheckBoxPreference
android:defaultValue="false"
android:key="tidepool_only_while_unmetered"
android:summary="Upload data only when connected to an unmetered network like Wifi"
android:title="Only on Wifi" />
android:summary="@string/summary_tidepool_upload_only_wifi"
android:title="@string/title_tidepool_upload_only_wifi" />
<CheckBoxPreference
android:defaultValue="false"
android:key="tidepool_no_treatments"
android:summary="Upload only CGM data to avoid duplicates with manual pump upload"
android:title="Don't upload treatments" />
android:summary="@string/summary_tidepool_upload_no_treatment"
android:title="@string/title_tidepool_upload_no_treatment" />
<CheckBoxPreference
android:defaultValue="false"
android:key="tidepool_new_auth"
Expand Down Expand Up @@ -374,10 +375,10 @@
<SwitchPreference
android:defaultValue="false"
android:key="nfc_meter_enabled"
android:summary="Download glucose records from NFC meter when xDrip is open"
android:summary="@string/summary_use_nfc_meter"
android:switchTextOff="@string/short_off_text_for_switches"
android:switchTextOn="@string/short_on_text_for_switches"
android:title="Use NFC Meter" />
android:title="@string/title_use_nfc_meter" />
<SwitchPreference
android:defaultValue="false"
android:key="bluetooth_meter_enabled"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/xml/pref_notifications.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@
<SwitchPreference
android:defaultValue="false"
android:key="wake_phone_during_alerts"
android:summary="Wake up screen during alerts. Might unlock devices that don't have screen lock enabled."
android:summary="@string/wake_up_screen_summary"
android:switchTextOff="@string/short_off_text_for_switches"
android:switchTextOn="@string/short_on_text_for_switches"
android:title="Wake Screen" />
android:title="@string/wake_up_screen" />

<SwitchPreference
android:defaultValue="false"
Expand Down

0 comments on commit d829e21

Please sign in to comment.