File tree 5 files changed +16
-23
lines changed
5 files changed +16
-23
lines changed Original file line number Diff line number Diff line change 21
21
with :
22
22
fetch-depth : 1
23
23
- name : compile-examples for official Arduino boards
24
- if : startsWith(matrix.fqbn, '"esp8266:esp8266') != true
25
24
uses : arduino/actions/libraries/compile-examples@master
26
25
with :
27
26
fqbn : ${{ matrix.fqbn }}
28
27
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 1
1
name =ArduinoMqttClient
2
- version =0.1.4
2
+ version =0.1.5
3
3
author =Arduino
4
4
maintainer =Arduino <
[email protected] >
5
5
sentence =[BETA] Allows you to send and receive MQTT messages using Arduino.
Original file line number Diff line number Diff line change 29
29
#endif
30
30
#endif
31
31
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
36
38
#endif
37
39
38
40
#define MQTT_CONNECT 1
61
63
MQTT_CLIENT_RX_STATE_DISCARD_PUBLISH_PAYLOAD
62
64
};
63
65
64
- MqttClient::MqttClient (Client& client) :
65
- _client(& client),
66
+ MqttClient::MqttClient (Client* client) :
67
+ _client(client),
66
68
_onMessage(NULL ),
67
69
_cleanSession(true ),
68
70
_keepAliveInterval(60 * 1000L ),
@@ -82,6 +84,11 @@ MqttClient::MqttClient(Client& client) :
82
84
setTimeout (0 );
83
85
}
84
86
87
+ MqttClient::MqttClient (Client& client) : MqttClient(&client)
88
+ {
89
+
90
+ }
91
+
85
92
MqttClient::~MqttClient ()
86
93
{
87
94
if (_willBuffer) {
Original file line number Diff line number Diff line change 41
41
42
42
class MqttClient : public Client {
43
43
public:
44
+ MqttClient (Client* client);
44
45
MqttClient (Client& client);
45
46
virtual ~MqttClient ();
46
47
47
48
#ifdef MQTT_CLIENT_STD_FUNCTION_CALLBACK
48
49
typedef std::function<void (MqttClient *client, int messageSize)> MessageCallback;
49
50
void onMessage (MessageCallback callback);
50
51
#else
52
+ inline void setClient (Client& client) { _client = &client; }
51
53
void onMessage (void (*)(int ));
52
54
#endif
53
55
You can’t perform that action at this time.
0 commit comments