Browse Source

thermostat: settings: fix array size when writing configuration

master
Richard Genoud 4 years ago
parent
commit
0476d03381
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      soft/thermostat/src/settings.cpp

+ 2
- 2
soft/thermostat/src/settings.cpp View File

@ -124,7 +124,7 @@ void Settings::setRoomDefaultTemperature(int idx, double temperature)
return;
}
this->beginWriteArray("rooms");
this->beginWriteArray("rooms", nbZones());
this->setArrayIndex(idx);
this->setValue("default_temperature", temperature);
this->endArray();
@ -138,7 +138,7 @@ void Settings::setRoomPrograms(int idx, QVector<struct Program> &progs)
return;
}
this->beginWriteArray("rooms");
this->beginWriteArray("rooms", nbZones());
this->setArrayIndex(idx);
this->remove("temperature_schedule");


Loading…
Cancel
Save