Skip to content

Commit c023c88

Browse files
committed
Adding SundialKit dependencies
1 parent a168245 commit c023c88

54 files changed

Lines changed: 120 additions & 569 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Examples/Sundial/Sources/Shared/Models/ComplexMessageExtensions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ extension Sundial_Demo_ComplexMessage {
5151
var sensor1 = Sundial_Demo_ComplexMessage.SensorData()
5252
sensor1.temperature = 22.5
5353
sensor1.humidity = 45.0
54-
sensor1.pressure = 1013.25
54+
sensor1.pressure = 1_013.25
5555
sensor1.readingTimeMs = Date.nowMilliseconds
5656
msg.sensors = [sensor1]
5757

Examples/Sundial/Sources/Shared/Models/LatencyTestRequestExtensions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ extension Sundial_Demo_LatencyTestRequest {
4545
case .medium:
4646
size = 500
4747
case .large:
48-
size = 5000
48+
size = 5_000
4949
case .UNRECOGNIZED:
5050
size = 50
5151
}

Examples/Sundial/Sources/Shared/Models/LatencyTracker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public final class LatencyTracker: ObservableObject {
3434

3535
/// Round-trip time in milliseconds
3636
public var rttMilliseconds: Double {
37-
roundTripTime * 1000
37+
roundTripTime * 1_000
3838
}
3939

4040
public init(

Examples/Sundial/Sources/Shared/Utilities/Date+Milliseconds.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Foundation
1111
public extension Date {
1212
/// Milliseconds since Unix epoch
1313
var timeIntervalSince1970Milliseconds: Int64 {
14-
Int64(timeIntervalSince1970 * 1000)
14+
Int64(timeIntervalSince1970 * 1_000)
1515
}
1616

1717
/// Convenience alias for timeIntervalSince1970Milliseconds
@@ -21,7 +21,7 @@ public extension Date {
2121

2222
/// Create a Date from milliseconds since Unix epoch
2323
init(millisecondsSince1970: Int64) {
24-
self.init(timeIntervalSince1970: Double(millisecondsSince1970) / 1000.0)
24+
self.init(timeIntervalSince1970: Double(millisecondsSince1970) / 1_000.0)
2525
}
2626

2727
/// Current time in milliseconds

Examples/Sundial/Sources/Shared/Views/ColorPreview.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public struct ColorPreview: View {
105105
if let timestamp = timestamp {
106106
#if os(watchOS)
107107
Text(timestamp, style: .relative)
108-
108+
109109
.font(.system(size: 10, weight: .semibold))
110110
#else
111111
Text(timestamp, style: .time)

Examples/Sundial/Sources/Shared/Views/LatencyGraph.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public struct LatencyGraph: View {
9292
Chart {
9393
ForEach(measurements.indices, id: \.self) { index in
9494
let measurement = measurements[index]
95-
let rttMs = measurement.roundTripTime * 1000
95+
let rttMs = measurement.roundTripTime * 1_000
9696

9797
LineMark(
9898
x: .value("Sequence", measurement.sequenceNumber),

Examples/Sundial/Sources/Shared/Views/MessageHistoryRow.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public struct MessageHistoryRow: View {
8383
}
8484

8585
private var sizeFormatted: String {
86-
let kb = Double(size) / 1024.0
86+
let kb = Double(size) / 1_024.0
8787
if kb < 1 {
8888
return "\(size) B"
8989
} else {
@@ -95,7 +95,7 @@ public struct MessageHistoryRow: View {
9595
guard let rtt = rtt else {
9696
return ""
9797
}
98-
let ms = rtt * 1000
98+
let ms = rtt * 1_000
9999
return String(format: "%.1f ms", ms)
100100
}
101101

@@ -169,7 +169,7 @@ public struct MessageHistoryRow: View {
169169
MessageHistoryRow(
170170
timestamp: Date().addingTimeInterval(-10),
171171
method: .sendMessageData,
172-
size: 1024,
172+
size: 1_024,
173173
rtt: 0.018,
174174
success: true
175175
)
@@ -196,7 +196,7 @@ public struct MessageHistoryRow: View {
196196
MessageHistoryRow(
197197
timestamp: Date().addingTimeInterval(-40),
198198
method: .sendMessageData,
199-
size: 16384,
199+
size: 16_384,
200200
rtt: 0.045,
201201
success: true
202202
)

Examples/Sundial/Sources/SundialDemoCombine/ViewModels/MessageLabViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ final class MessageLabViewModel: ObservableObject {
334334
var sensor = Sundial_Demo_ComplexMessage.SensorData()
335335
sensor.temperature = Float.random(in: -10...40) // Celsius
336336
sensor.humidity = Float.random(in: 0...100) // Percentage
337-
sensor.pressure = Float.random(in: 980...1050) // hPa
337+
sensor.pressure = Float.random(in: 980...1_050) // hPa
338338
sensor.readingTimeMs = Date().millisecondsSince1970
339339
return sensor
340340
}

Examples/Sundial/Sources/SundialDemoStream/ViewModels/StreamMessageLabViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ final class StreamMessageLabViewModel {
473473
var sensor = Sundial_Demo_ComplexMessage.SensorData()
474474
sensor.temperature = Float.random(in: -10...40) // Celsius
475475
sensor.humidity = Float.random(in: 0...100) // Percentage
476-
sensor.pressure = Float.random(in: 980...1050) // hPa
476+
sensor.pressure = Float.random(in: 980...1_050) // hPa
477477
sensor.readingTimeMs = Date().millisecondsSince1970
478478
return sensor
479479
}

Tests/SundialKitConnectivityTests/BinaryMessagableTests.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
//
2-
// BinaryMessagableTests.swift
3-
// SundialKit
4-
//
5-
// Created by Leo Dion.
6-
// Copyright © 2025 BrightDigit.
2+
// BinaryMessagableTests.swift
3+
// Copyright (c) 2025 BrightDigit.
74
//
85

96
import Foundation

0 commit comments

Comments
 (0)