Add .md to README and clarify what example does
- For pico_w/wifi/mqtt, rename README to README.md to improve how the content renders in an IDE or when browsing the online repository.
- Clarify that the example doesn't re-publish the temperature reading if it hasn't changed; so that users can understand why the updates can appear sporadic.
- Document how the led status can be checked by subscribing to /led/status
Looks good. Just the one typo pointed out by @lurch
FYI #498 is where this example was first added.
Thanks @peterharperuk and well spotted @lurch - fixed in my a23bca5. One of these days I'll manage to get a PR through without a typo 8-)
If the dns query returns immediately then start_client() is called directly from main(); so shouldn't the call to mqtt_client_new() be protected? The lwIP implementation has LWIP_ASSERT_CORE_LOCKED
With the greatest respect, although this example is very thorough it is also quite hard to follow. Might I suggest that In the spirit of the other examples it would be clearer to use global variables and move some of the work outside the callbacks?
If the dns query returns immediately then start_client() is called directly from main(); so shouldn't the call to mqtt_client_new() be protected? The lwIP implementation has LWIP_ASSERT_CORE_LOCKED
Yes
If you have suggestions for other improvements and fixes. I would suggest raising them as separate pull requests.
If the dns query returns immediately then start_client() is called directly from main(); so shouldn't the call to mqtt_client_new() be protected? The lwIP implementation has LWIP_ASSERT_CORE_LOCKED
Yes
The code as stands also calls mqtt_client_is_connected(), which the lwIP code also has the CORE_LOCKED assertion. Not sure whether that's safe or not?