fix: Fixes dewpoint and enthalpy not converting to imperial units.
Some checks failed
CI / Run Tests (push) Has been cancelled

This commit is contained in:
2024-11-20 15:07:33 -05:00
parent 916fcb3584
commit df05898a65
2 changed files with 7 additions and 4 deletions

View File

@@ -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)
}
}