1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-07-24 15:43:46 +02:00

Fix typos for Pinetime weather expiry time

The expiry time should be 6h (60 * 60 * 6), but has been set to 6 minutes (60 * 6) unintentionally in 3 places. 
This change sets the expiry to the correct value throughout the file.

Signed-off-by: kieranc001 <kieranc001@noreply.codeberg.org>
This commit is contained in:
kieranc001 2023-06-01 09:36:45 +00:00 committed by José Rebelo
parent dd01c77aca
commit 9c682da4cc

View File

@ -697,7 +697,7 @@ public class PineTimeJFSupport extends AbstractBTLEDeviceSupport implements DfuL
new CborEncoder(baos).encode(new CborBuilder()
.startMap() // This map is not fixed-size, which is not great, but it might come in a library update
.put("Timestamp", System.currentTimeMillis() / 1000L)
.put("Expires", 60 * 6) // 6h
.put("Expires", 60 * 60 * 6) // 6h
.put("EventType", WeatherData.EventType.Location.value)
.put("Location", weatherSpec.location)
.put("Altitude", 0)
@ -730,7 +730,7 @@ public class PineTimeJFSupport extends AbstractBTLEDeviceSupport implements DfuL
new CborEncoder(baos).encode(new CborBuilder()
.startMap() // This map is not fixed-size, which is not great, but it might come in a library update
.put("Timestamp", System.currentTimeMillis() / 1000L)
.put("Expires", 60 * 6) // 6h this should be the weather provider's interval, really
.put("Expires", 60 * 60 * 6) // 6h this should be the weather provider's interval, really
.put("EventType", WeatherData.EventType.Humidity.value)
.put("Humidity", (int) weatherSpec.currentHumidity)
.end()
@ -755,7 +755,7 @@ public class PineTimeJFSupport extends AbstractBTLEDeviceSupport implements DfuL
new CborEncoder(baos).encode(new CborBuilder()
.startMap() // This map is not fixed-size, which is not great, but it might come in a library update
.put("Timestamp", System.currentTimeMillis() / 1000L)
.put("Expires", 60 * 6) // 6h this should be the weather provider's interval, really
.put("Expires", 60 * 60 * 6) // 6h this should be the weather provider's interval, really
.put("EventType", WeatherData.EventType.Temperature.value)
.put("Temperature", (int) ((weatherSpec.currentTemp - 273.15) * 100))
.put("DewPoint", (int) (-32768))