Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding an additional ArduinoMqttClient constructor as well as a method setClient to allow late initialisation. #37

Merged
merged 1 commit into from
May 29, 2020

Conversation

aentinger
Copy link
Contributor

@aentinger aentinger commented May 28, 2020

This allows for the ArduinoIoTCloud firmware to intantiate ArduinoMqttClient on the stack instead of the heap. So instead of

ArduinoMqttClient mqtt_client(another_client_interface);

you can do

ArduinoMqttClient mqtt_client(nullptr);
/* ... some time later the other client interface actually is available */
mqtt_client.setClient(late_available_client_interface);

…d setClient to allow late initialisation.

This allows for the ArduinoIoTCloud firmware to intantiate ArduinoMqttClient on the stack instead of the heap.
@aentinger aentinger force-pushed the mqtt-setup-to-allow-late-init branch from b9e13c8 to 5e673f1 Compare May 29, 2020 04:33
@aentinger aentinger merged commit 54b195e into master May 29, 2020
@aentinger aentinger deleted the mqtt-setup-to-allow-late-init branch May 29, 2020 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant