UseMySentrySelectionView.swift 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // UseMySentrySelectionView.swift
  3. // MinimedKitUI
  4. //
  5. // Created by Pete Schwamb on 11/30/22.
  6. // Copyright © 2022 LoopKit Authors. All rights reserved.
  7. //
  8. import SwiftUI
  9. import MinimedKit
  10. import LoopKitUI
  11. struct UseMySentrySelectionView: View {
  12. @Binding var mySentryConfig: MySentryConfig
  13. var body: some View {
  14. VStack {
  15. List {
  16. Picker("Use MySentry", selection: $mySentryConfig) {
  17. ForEach(MySentryConfig.allCases, id: \.self) { config in
  18. Text(config.localizedDescription)
  19. }
  20. }
  21. .pickerStyle(.inline)
  22. Section(content: {}, footer: {
  23. Text(LocalizedString("Medtronic pump models 523, 723, 554, and 754 have a feature called 'MySentry' that periodically broadcasts the reservoir and pump battery levels. Listening for these broadcasts allows Loop to communicate with the pump less frequently, which can increase pump battery life. However, when using this feature the RileyLink stays awake more of the time and uses more of its own battery. Enabling this may lengthen pump battery life, while disabling it may lengthen RileyLink battery life. This setting is ignored for other pump models.", comment: "Instructions on selecting setting for MySentry"))
  24. })
  25. }
  26. }
  27. .insetGroupedListStyle()
  28. .navigationTitle(LocalizedString("Use MySentry", comment: "navigation title for pump battery type selection"))
  29. }
  30. }