Remove spaces to end of lines

This commit is contained in:
Francois BIOT
2022-12-28 21:22:19 +01:00
parent 42fc054c94
commit 2b92833ea5
10 changed files with 44 additions and 44 deletions

View File

@@ -1,12 +1,12 @@
#include <TinyMqtt.h> // https://github.com/hsaturn/TinyMqtt
#include <MqttClassBinder.h>
/**
/**
* Example on how to bind a class:onPublish function
*
* Local broker that accept connections and two local clients
*
*
*
* +-----------------------------+
* | ESP |
* | +--------+ | 1883 <--- External client/s
@@ -15,14 +15,14 @@
* | | ^ |
* | | | |
* | | | | -----
* | v v | ---
* | +----------+ +----------+ | -
* | v v | ---
* | +----------+ +----------+ | -
* | | internal | | internal | +-------* Wifi
* | | client | | client | |
* | +----------+ +----------+ |
* | | client | | client | |
* | +----------+ +----------+ |
* | |
* +-----------------------------+
*
*
* pros - Reduces internal latency (when publish is received by the same ESP)
* - Reduces wifi traffic
* - No need to have an external broker
@@ -50,7 +50,7 @@ MqttClient mqtt_sender(&broker);
class MqttReceiver: public MqttClassBinder<MqttReceiver>
{
public:
void onPublish(const MqttClient* source, const Topic& topic, const char* payload, size_t /* length */)
{
Serial

View File

@@ -1,9 +1,9 @@
#include <TinyMqtt.h> // https://github.com/hsaturn/TinyMqtt
/**
/**
* Local broker that accept connections and two local clients
*
*
*
* +-----------------------------+
* | ESP |
* | +--------+ | 1883 <--- External client/s
@@ -12,14 +12,14 @@
* | | ^ |
* | | | |
* | | | | -----
* | v v | ---
* | +----------+ +----------+ | -
* | v v | ---
* | +----------+ +----------+ | -
* | | internal | | internal | +-------* Wifi
* | | client | | client | |
* | +----------+ +----------+ |
* | | client | | client | |
* | +----------+ +----------+ |
* | |
* +-----------------------------+
*
*
* pros - Reduces internal latency (when publish is received by the same ESP)
* - Reduces wifi traffic
* - No need to have an external broker

View File

@@ -1,7 +1,7 @@
#include <TinyMqtt.h> // https://github.com/hsaturn/TinyMqtt
/** TinyMQTT allows a disconnected mode:
*
*
* +-----------------------------+
* | ESP |
* | +--------+ |
@@ -12,8 +12,8 @@
* | v v |
* | +----------+ +----------+ |
* | | internal | | internal | |
* | | client | | client | |
* | +----------+ +----------+ |
* | | client | | client | |
* | +----------+ +----------+ |
* | |
* +-----------------------------+
*

View File

@@ -3,20 +3,20 @@
/** Simple Client (The simplest configuration)
*
*
* +--------+
*
* +--------+
* +------>| broker |<--- < Other client
* | +--------+
* |
* | +--------+
* |
* +-----------------+
* | ESP | |
* | +----------+ |
* | | internal | |
* | | client | |
* | +----------+ |
* | ESP | |
* | +----------+ |
* | | internal | |
* | | client | |
* | +----------+ |
* | |
* +-----------------+
*
*
* 1 - change the ssid/password
* 2 - change BROKER values (or keep emqx.io test broker)
* 3 - you can use mqtt-spy to connect to the same broker and
@@ -39,7 +39,7 @@ const char* password = "";
static float temp=19;
static MqttClient client;
void setup()
void setup()
{
Serial.begin(115200);
delay(500);
@@ -50,11 +50,11 @@ void setup()
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED)
{ delay(500); Serial << '.'; }
Serial << "Connected to " << ssid << "IP address: " << WiFi.localIP() << endl;
Serial << "Connected to " << ssid << "IP address: " << WiFi.localIP() << endl;
client.connect(BROKER, BROKER_PORT);
}