MainObject: ensure sunsensor dose not report before stored sensors are reloaded
This commit is contained in:
parent
a96b27c741
commit
cfe51b0fd3
1 changed files with 2 additions and 2 deletions
|
|
@ -90,8 +90,6 @@ PrimaryMainObject::PrimaryMainObject(QIODevice* microDevice, const QString& sett
|
||||||
connect(µ, &Microcontroller::gotSensorState, &globalSensors, &SensorStore::sensorGotState);
|
connect(µ, &Microcontroller::gotSensorState, &globalSensors, &SensorStore::sensorGotState);
|
||||||
connect(&mqttSensorSource, &MqttSensorSource::stateChanged, &globalSensors, &SensorStore::sensorGotState);
|
connect(&mqttSensorSource, &MqttSensorSource::stateChanged, &globalSensors, &SensorStore::sensorGotState);
|
||||||
|
|
||||||
sunSensorSource.run();
|
|
||||||
|
|
||||||
globalItems.registerItemSource(&fixedItems);
|
globalItems.registerItemSource(&fixedItems);
|
||||||
globalItems.registerItemSource(tcpServer);
|
globalItems.registerItemSource(tcpServer);
|
||||||
globalItems.registerItemSource(webServer);
|
globalItems.registerItemSource(webServer);
|
||||||
|
|
@ -102,6 +100,8 @@ PrimaryMainObject::PrimaryMainObject(QIODevice* microDevice, const QString& sett
|
||||||
|
|
||||||
loadFromDisk(settingsPath);
|
loadFromDisk(settingsPath);
|
||||||
|
|
||||||
|
sunSensorSource.run();
|
||||||
|
|
||||||
QJsonObject mqttJson = settings["Mqtt"].toObject();
|
QJsonObject mqttJson = settings["Mqtt"].toObject();
|
||||||
mqttClient->start(mqttJson);
|
mqttClient->start(mqttJson);
|
||||||
mqttSensorSource.start(mqttClient, mqttJson);
|
mqttSensorSource.start(mqttClient, mqttJson);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue