Bladeren bron

Cleanup unused function

and a couple extraneous comments
Mike Plante 1 jaar geleden
bovenliggende
commit
24afd7cfeb
2 gewijzigde bestanden met toevoegingen van 0 en 8 verwijderingen
  1. 0 6
      Trio/Sources/APS/APSManager.swift
  2. 0 2
      Trio/Sources/Modules/Treatments/View/PopupView.swift

+ 0 - 6
Trio/Sources/APS/APSManager.swift

@@ -24,7 +24,6 @@ protocol APSManager {
     func determineBasalSync() async throws
     func determineBasalSync() async throws
     func simulateDetermineBasal(simulatedCarbsAmount: Decimal, simulatedBolusAmount: Decimal) async -> Determination?
     func simulateDetermineBasal(simulatedCarbsAmount: Decimal, simulatedBolusAmount: Decimal) async -> Determination?
     func roundBolus(amount: Decimal) -> Decimal
     func roundBolus(amount: Decimal) -> Decimal
-    func roundBolusNoCap(amount: Decimal) -> Decimal
     var lastError: CurrentValueSubject<Error?, Never> { get }
     var lastError: CurrentValueSubject<Error?, Never> { get }
     func cancelBolus(_ callback: ((Bool, String) -> Void)?) async
     func cancelBolus(_ callback: ((Bool, String) -> Void)?) async
 }
 }
@@ -498,11 +497,6 @@ final class BaseAPSManager: APSManager, Injectable {
         return min(rounded, maxBolus)
         return min(rounded, maxBolus)
     }
     }
 
 
-    func roundBolusNoCap(amount: Decimal) -> Decimal {
-        guard let pump = pumpManager else { return amount }
-        return Decimal(pump.roundToSupportedBolusVolume(units: Double(amount)))
-    }
-
     private var bolusReporter: DoseProgressReporter?
     private var bolusReporter: DoseProgressReporter?
 
 
     func enactBolus(amount: Double, isSMB: Bool, callback: ((Bool, String) -> Void)?) async {
     func enactBolus(amount: Double, isSMB: Bool, callback: ((Bool, String) -> Void)?) async {

+ 0 - 2
Trio/Sources/Modules/Treatments/View/PopupView.swift

@@ -243,7 +243,6 @@ struct PopupView: View {
             Text(maxCobReached ? "Max COB:" : "COB:")
             Text(maxCobReached ? "Max COB:" : "COB:")
                 .foregroundColor(maxCobReached ? Color.loopRed : .secondary)
                 .foregroundColor(maxCobReached ? Color.loopRed : .secondary)
 
 
-            // Middle column
             Text(
             Text(
                 state.wholeCob
                 state.wholeCob
                     .formatted(.number.grouping(.never).rounded().precision(.fractionLength(fractionDigits)))
                     .formatted(.number.grouping(.never).rounded().precision(.fractionLength(fractionDigits)))
@@ -255,7 +254,6 @@ struct PopupView: View {
             .foregroundColor(.secondary)
             .foregroundColor(.secondary)
             .gridColumnAlignment(.leading)
             .gridColumnAlignment(.leading)
 
 
-            // Right column
             HStack {
             HStack {
                 Text(self.insulinFormatter(state.wholeCobInsulin))
                 Text(self.insulinFormatter(state.wholeCobInsulin))
                 Text("U").foregroundColor(.secondary)
                 Text("U").foregroundColor(.secondary)