1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-28 12:56:49 +01:00

Huami: set forecast limit to 6 days (current + 6 in future)

This commit is contained in:
Andreas Shimokawa 2020-06-29 19:41:56 +02:00
parent b7a1f469ee
commit 3940387b1a

View File

@ -1965,8 +1965,8 @@ public class HuamiSupport extends AbstractBTLEDeviceSupport {
try {
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();
if (weatherSpec.forecasts.size() > 6) { //TDOD: find out the limits for each device
weatherSpec.forecasts.subList(6, weatherSpec.forecasts.size()).clear();
}
final byte NR_DAYS = (byte) (1 + weatherSpec.forecasts.size());
int bytesPerDay = 4;