You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: MinimedKit/PumpEvents/BasalProfileStartPumpEvent.swift
+4-1
Original file line number
Diff line number
Diff line change
@@ -44,5 +44,8 @@ public struct BasalProfileStartPumpEvent: TimestampedPumpEvent {
44
44
"profileIndex": profileIndex,
45
45
]
46
46
}
47
-
47
+
48
+
publicvardescription:String{
49
+
returnString(format:NSLocalizedString("Basal Profile %1$@: %2$@ U/hour", comment:"The format string description of a BasalProfileStartPumpEvent. (1: The index of the profile)(2: The basal rate)"),profileIndex, rate)
returnString(format:NSLocalizedString("Temporary Basal: %1$d min", comment:"The format string description of a TempBasalDurationPumpEvent. (1: The duration of the temp basal in minutes)"), duration)
Copy file name to clipboardexpand all lines: MinimedKit/PumpEvents/TempBasalPumpEvent.swift
+9
Original file line number
Diff line number
Diff line change
@@ -52,5 +52,14 @@ public struct TempBasalPumpEvent: TimestampedPumpEvent {
52
52
"temp": rateType.rawValue,
53
53
]
54
54
}
55
+
56
+
publicvardescription:String{
57
+
switch rateType {
58
+
case.Absolute:
59
+
returnString(format:NSLocalizedString("Temporary Basal: %1$.3f U/hour", comment:"The format string description of a TempBasalPumpEvent. (1: The rate of the temp basal in minutes)"), rate)
60
+
case.Percent:
61
+
returnString(format:NSLocalizedString("Temporary Basal: %1$d%%", comment:"The format string description of a TempBasalPumpEvent. (1: The rate of the temp basal in percent)"),Int(rate))
Copy file name to clipboardexpand all lines: MinimedKit/PumpMessage.swift
+6-1
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
9
9
import Foundation
10
10
11
-
publicstructPumpMessage{
11
+
publicstructPumpMessage:CustomStringConvertible{
12
12
publicletpacketType:PacketType
13
13
publicletaddress:NSData
14
14
publicletmessageType:MessageType
@@ -49,5 +49,10 @@ public struct PumpMessage {
49
49
50
50
returnNSData(data: data)
51
51
}
52
+
53
+
publicvardescription:String{
54
+
returnString(format:NSLocalizedString("PumpMessage(%1$@, %2$@, %3$@, %4$@)", comment:"The format string describing a pump message. (1: The packet type)(2: The message type)(3: The message address)(4: The message data"),String(self.packetType),String(self.messageType),self.address.hexadecimalString,self.messageBody.txData.hexadecimalString)
0 commit comments