Turned server IP and Port into defines
This commit is contained in:
@@ -23,6 +23,11 @@
|
||||
#define PRINT_XPOS 50
|
||||
#define PRINT_YPOS 50
|
||||
#define MAX_FILES 20
|
||||
#define SERVER_IP4_A 192
|
||||
#define SERVER_IP4_B 168
|
||||
#define SERVER_IP4_C 69
|
||||
#define SERVER_IP4_D 11
|
||||
#define SERVER_PORT 1883
|
||||
|
||||
typedef enum input_topic {
|
||||
set_text,
|
||||
@@ -267,8 +272,8 @@ static void mosquitto_connect(mqtt_client_t* client) {
|
||||
|
||||
ci.client_id = "STM32";
|
||||
ip_addr_t server_ip;
|
||||
IP4_ADDR(&server_ip, 192, 168, 69, 11);
|
||||
uint16_t server_port = 1883;
|
||||
IP4_ADDR(&server_ip, SERVER_IP4_A, SERVER_IP4_B, SERVER_IP4_C, SERVER_IP4_D);
|
||||
uint16_t server_port = SERVER_PORT;
|
||||
err = mqtt_client_connect(client, &server_ip, server_port, mqtt_connection_cb, 0, &ci);
|
||||
if (err != ERR_OK) {
|
||||
LOG_DEBUG(TAG, "mqtt_connect return %d", err);
|
||||
|
||||
Reference in New Issue
Block a user