1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-12-01 14:32:54 +01:00

Xiaomi: Send AQI

Todo: map to strings
This commit is contained in:
Andreas Shimokawa 2023-10-25 18:11:42 +02:00 committed by José Rebelo
parent 047cc71d28
commit 0e3e406320
2 changed files with 7 additions and 7 deletions

View File

@ -103,9 +103,9 @@ public class XiaomiWeatherService extends AbstractXiaomiService {
.setUnk1("") .setUnk1("")
.setUnk2(0) .setUnk2(0)
) )
.setUnk7(XiaomiProto.WeatherCurrentUnk7.newBuilder() .setAQI(XiaomiProto.WeatherCurrentAQI.newBuilder()
.setUnk1("") .setAQIText("Unknown") // some string like "Moderate"
.setUnk2(0) .setAQI(weatherSpec.airQuality.aqi)
) )
.setWarning(XiaomiProto.WeatherCurrentWarning.newBuilder() .setWarning(XiaomiProto.WeatherCurrentWarning.newBuilder()
.setCurrentWarning1(XiaomiProto.WeatherCurrentWarning1.newBuilder() .setCurrentWarning1(XiaomiProto.WeatherCurrentWarning1.newBuilder()

View File

@ -643,7 +643,7 @@ message WeatherCurrent {
optional WeatherCurrentHumidity humidity= 4; optional WeatherCurrentHumidity humidity= 4;
optional WeatherCurrentUnk5 unk5 = 5; optional WeatherCurrentUnk5 unk5 = 5;
optional WeatherCurrentUnk6 unk6 = 6; optional WeatherCurrentUnk6 unk6 = 6;
optional WeatherCurrentUnk7 unk7 = 7; optional WeatherCurrentAQI AQI = 7;
optional WeatherCurrentWarning warning = 8; // Seems to be an array? optional WeatherCurrentWarning warning = 8; // Seems to be an array?
optional float pressure = 9; optional float pressure = 9;
} }
@ -675,9 +675,9 @@ message WeatherCurrentUnk6 {
optional uint32 unk2 = 2; optional uint32 unk2 = 2;
} }
message WeatherCurrentUnk7 { message WeatherCurrentAQI {
optional string unk1 = 1; optional string AQIText = 1;
optional uint32 unk2 = 2; optional uint32 AQI = 2;
} }
message WeatherCurrentWarning { message WeatherCurrentWarning {