mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-18 14:47:46 +01:00
Huami: limit forecast days to 3 days
Fixes problems with new weather notificaion on Mi Band 4 and others Fixes #1910
This commit is contained in:
parent
4135eae793
commit
b7a1f469ee
@ -1965,7 +1965,9 @@ public class HuamiSupport extends AbstractBTLEDeviceSupport {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
TransactionBuilder builder = performInitialized("Sending weather forecast");
|
TransactionBuilder builder = performInitialized("Sending weather forecast");
|
||||||
|
if (weatherSpec.forecasts.size() > 3) { //TDOD: find out the limits for each device
|
||||||
|
weatherSpec.forecasts.subList(3, weatherSpec.forecasts.size()).clear();
|
||||||
|
}
|
||||||
final byte NR_DAYS = (byte) (1 + weatherSpec.forecasts.size());
|
final byte NR_DAYS = (byte) (1 + weatherSpec.forecasts.size());
|
||||||
int bytesPerDay = 4;
|
int bytesPerDay = 4;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user