Moyoung: Fix weather forecast being one day off

This commit is contained in:
Arjan Schrijver
2025-06-11 20:58:00 +02:00
parent 80a8d81384
commit 29a2e820a1
@@ -1499,7 +1499,10 @@ public class MoyoungDeviceSupport extends AbstractBTLEDeviceSupport {
packetWeatherToday.put(weatherToday.city.getBytes("unicodebigunmarked"));
sendPacket(builder, MoyoungPacketOut.buildPacket(mtu, MoyoungConstants.CMD_SET_WEATHER_TODAY, packetWeatherToday.array()));
ByteBuffer packetWeatherForecast = ByteBuffer.allocate(7 * 3);
ByteBuffer packetWeatherForecast = ByteBuffer.allocate(8 * 3);
packetWeatherForecast.put(weatherToday.conditionId);
packetWeatherForecast.put(weatherToday.currentTemp);
packetWeatherForecast.put(weatherToday.currentTemp);
for(int i = 0; i < 7; i++)
{
MoyoungWeatherForecast forecast;