fix: Fixes dewpoint and enthalpy not converting to imperial units.
Some checks failed
CI / Run Tests (push) Has been cancelled
Some checks failed
CI / Run Tests (push) Has been cancelled
This commit is contained in:
@@ -135,7 +135,7 @@ public actor SensorsService: Service {
|
||||
|
||||
private func publishUpdates() async throws {
|
||||
for sensor in sensors.filter(\.needsProcessed) {
|
||||
try await publish(sensor.dewPoint?.value, to: sensor.topics.dewPoint)
|
||||
try await publish(sensor.dewPoint?.fahrenheit, to: sensor.topics.dewPoint)
|
||||
try await publish(sensor.enthalpy?.value, to: sensor.topics.enthalpy)
|
||||
try sensors.hasProcessed(sensor)
|
||||
}
|
||||
@@ -207,6 +207,6 @@ extension Humidity<Relative>: BufferInitalizable {
|
||||
extension Temperature<DryAir>: BufferInitalizable {
|
||||
init?(buffer: ByteBuffer) {
|
||||
guard let value = Double(buffer: buffer) else { return nil }
|
||||
self.init(value)
|
||||
self.init(value, units: .celsius)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user