Get IP address out of class files
This commit is contained in:
parent
bceda8433b
commit
79968b727a
@ -7,6 +7,10 @@
|
|||||||
#include <WiFi.h>
|
#include <WiFi.h>
|
||||||
#include <WiFiMulti.h>
|
#include <WiFiMulti.h>
|
||||||
|
|
||||||
|
// MQTT
|
||||||
|
#define MQTT_ADDR "192.168.2.196"
|
||||||
|
#define MQTT_PORT 1883
|
||||||
|
|
||||||
// DAC
|
// DAC
|
||||||
#define DAC1 25
|
#define DAC1 25
|
||||||
|
|
||||||
|
@ -2,9 +2,10 @@
|
|||||||
|
|
||||||
MqttTopic::MqttTopic(WiFiClient* espClient): wifiClient(espClient), client(PubSubClient(*espClient))
|
MqttTopic::MqttTopic(WiFiClient* espClient): wifiClient(espClient), client(PubSubClient(*espClient))
|
||||||
{
|
{
|
||||||
IPAddress server(192, 168, 2, 196);
|
IPAddress server;
|
||||||
|
server.fromString(MQTT_ADDR);
|
||||||
|
|
||||||
this->client.setServer(server, 1883);
|
this->client.setServer(server, MQTT_PORT);
|
||||||
this->client.setCallback(this->callback);
|
this->client.setCallback(this->callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user