mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-21 10:16:34 +00:00
Fix PC building with MQTT disabled
This commit is contained in:
parent
a2d97204f8
commit
9b3bbcc107
@ -152,7 +152,9 @@ void setup()
|
|||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
haspLoop();
|
haspLoop();
|
||||||
|
#if HASP_USE_MQTT
|
||||||
mqttLoop();
|
mqttLoop();
|
||||||
|
#endif
|
||||||
|
|
||||||
// debugLoop(); // Console
|
// debugLoop(); // Console
|
||||||
haspDevice.loop();
|
haspDevice.loop();
|
||||||
@ -190,7 +192,7 @@ void loop()
|
|||||||
haspDevice.loop_5s();
|
haspDevice.loop_5s();
|
||||||
gpioEvery5Seconds();
|
gpioEvery5Seconds();
|
||||||
|
|
||||||
#if defined(HASP_USE_MQTT)
|
#if HASP_USE_MQTT
|
||||||
mqttEvery5Seconds(true);
|
mqttEvery5Seconds(true);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -363,7 +365,9 @@ int main(int argc, char* argv[])
|
|||||||
serializeJson(settings, buffer, sizeof(buffer));
|
serializeJson(settings, buffer, sizeof(buffer));
|
||||||
std::cout << buffer << std::endl << std::flush;
|
std::cout << buffer << std::endl << std::flush;
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
#if HASP_USE_MQTT
|
||||||
mqttSetConfig(settings["mqtt"]);
|
mqttSetConfig(settings["mqtt"]);
|
||||||
|
#endif
|
||||||
// printf("%s %d\n", __FILE__, __LINE__);
|
// printf("%s %d\n", __FILE__, __LINE__);
|
||||||
// fflush(stdout);
|
// fflush(stdout);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user