mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-27 02:55:50 +01:00
Xiaomi: Update weather AQI and warning proto
This commit is contained in:
parent
516b3dbf1e
commit
dad97f9e96
@ -71,7 +71,7 @@ public class XiaomiWeatherService extends AbstractXiaomiService {
|
|||||||
final XiaomiCoordinator coordinator = getSupport().getCoordinator();
|
final XiaomiCoordinator coordinator = getSupport().getCoordinator();
|
||||||
|
|
||||||
if (coordinator.supportsMultipleWeatherLocations()) {
|
if (coordinator.supportsMultipleWeatherLocations()) {
|
||||||
// TODO actually support multiple locations
|
// TODO actually support multiple locations (primary + 4 secondary)
|
||||||
getSupport().sendCommand(
|
getSupport().sendCommand(
|
||||||
"set current location",
|
"set current location",
|
||||||
XiaomiProto.Command.newBuilder()
|
XiaomiProto.Command.newBuilder()
|
||||||
@ -124,7 +124,7 @@ public class XiaomiWeatherService extends AbstractXiaomiService {
|
|||||||
.setAQI(weatherSpec.airQuality != null && weatherSpec.airQuality.aqi >= 0 ? weatherSpec.airQuality.aqi : 0)
|
.setAQI(weatherSpec.airQuality != null && weatherSpec.airQuality.aqi >= 0 ? weatherSpec.airQuality.aqi : 0)
|
||||||
)
|
)
|
||||||
.setWarning(XiaomiProto.WeatherCurrentWarning.newBuilder()
|
.setWarning(XiaomiProto.WeatherCurrentWarning.newBuilder()
|
||||||
.setCurrentWarning1(XiaomiProto.WeatherCurrentWarning1.newBuilder()
|
.addCurrentWarning1(XiaomiProto.WeatherCurrentWarning1.newBuilder()
|
||||||
.setCurrentWarningText("")
|
.setCurrentWarningText("")
|
||||||
.setCurrentWarningSeverityText("")
|
.setCurrentWarningSeverityText("")
|
||||||
)
|
)
|
||||||
|
@ -677,16 +677,19 @@ message WeatherCurrentUnk6 {
|
|||||||
|
|
||||||
message WeatherCurrentAQI {
|
message WeatherCurrentAQI {
|
||||||
optional string AQIText = 1;
|
optional string AQIText = 1;
|
||||||
optional uint32 AQI = 2;
|
optional sint32 AQI = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
message WeatherCurrentWarning {
|
message WeatherCurrentWarning {
|
||||||
optional WeatherCurrentWarning1 currentWarning1 = 1; // FIXME: this is probably an array
|
repeated WeatherCurrentWarning1 currentWarning1 = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message WeatherCurrentWarning1 {
|
message WeatherCurrentWarning1 {
|
||||||
optional string currentWarningText = 1;
|
optional string currentWarningText = 1;
|
||||||
optional string currentWarningSeverityText = 2;
|
optional string currentWarningSeverityText = 2;
|
||||||
|
optional string currentWarningTitle = 3;
|
||||||
|
optional string currentWarningDescription = 4;
|
||||||
|
optional string unk5 = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
message WeatherCurrentLocation {
|
message WeatherCurrentLocation {
|
||||||
|
Loading…
Reference in New Issue
Block a user