File tree Expand file tree Collapse file tree 5 files changed +16
-23
lines changed
Expand file tree Collapse file tree 5 files changed +16
-23
lines changed Original file line number Diff line number Diff line change 2121 with :
2222 fetch-depth : 1
2323 - name : compile-examples for official Arduino boards
24- if : startsWith(matrix.fqbn, '"esp8266:esp8266') != true
2524 uses : arduino/actions/libraries/compile-examples@master
2625 with :
2726 fqbn : ${{ matrix.fqbn }}
2827 libraries : ${{ env.LIBRARIES }}
29- - name : compile-examples for ESP8266 boards
30- if : startsWith(matrix.fqbn, '"esp8266:esp8266')
31- uses : arduino/actions/libraries/compile-examples@master
32- with :
33- fqbn : ${{ matrix.fqbn }}
34- entrypoint : /github/workspace/.github/workflows/install-python-wrapper.sh
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11name =ArduinoMqttClient
2- version =0.1.4
2+ version =0.1.5
33author =Arduino
44maintainer =Arduino <info@arduino.cc>
55sentence =[BETA] Allows you to send and receive MQTT messages using Arduino.
Original file line number Diff line number Diff line change 2929 #endif
3030#endif
3131
32- #ifdef __AVR__
33- #define TX_PAYLOAD_BUFFER_SIZE 128
34- #else
35- #define TX_PAYLOAD_BUFFER_SIZE 256
32+ #ifndef TX_PAYLOAD_BUFFER_SIZE
33+ #ifdef __AVR__
34+ #define TX_PAYLOAD_BUFFER_SIZE 128
35+ #else
36+ #define TX_PAYLOAD_BUFFER_SIZE 256
37+ #endif
3638#endif
3739
3840#define MQTT_CONNECT 1
6163 MQTT_CLIENT_RX_STATE_DISCARD_PUBLISH_PAYLOAD
6264};
6365
64- MqttClient::MqttClient (Client& client) :
65- _client(& client),
66+ MqttClient::MqttClient (Client* client) :
67+ _client(client),
6668 _onMessage(NULL ),
6769 _cleanSession(true ),
6870 _keepAliveInterval(60 * 1000L ),
@@ -82,6 +84,11 @@ MqttClient::MqttClient(Client& client) :
8284 setTimeout (0 );
8385}
8486
87+ MqttClient::MqttClient (Client& client) : MqttClient(&client)
88+ {
89+
90+ }
91+
8592MqttClient::~MqttClient ()
8693{
8794 if (_willBuffer) {
Original file line number Diff line number Diff line change 4141
4242class MqttClient : public Client {
4343public:
44+ MqttClient (Client* client);
4445 MqttClient (Client& client);
4546 virtual ~MqttClient ();
4647
4748#ifdef MQTT_CLIENT_STD_FUNCTION_CALLBACK
4849 typedef std::function<void (MqttClient *client, int messageSize)> MessageCallback;
4950 void onMessage (MessageCallback callback);
5051#else
52+ inline void setClient (Client& client) { _client = &client; }
5153 void onMessage (void (*)(int ));
5254#endif
5355
You can’t perform that action at this time.
0 commit comments