In relation to this Post https://www.b4x.com/android/forum/threads/mqtt-connect-to-thingspeak.89453/#post-566216
More importantly, the process of editing the file to change the MQTT_MAX_PACKET_SIZE.
I have a little question (well, 2 actually).
When are libraries loaded?
In the file that I needed to edit, the item in subject is defined like this:
As you can see it only defines the variable if it isn't already defined. So, I'm thinking, maybe we could define this in b4r using inline C? Then when the lib is loaded it won't re-define it.
I believe this would be better because as it is, if I edit the file like I have, when I install a new version of b4r, the file be overwritten and my project will break again. Where as if it is defined in code within the project, it will always work.
Maybe if this can't work with b4r as it is, then a new solution could be implemented. Thinking maybe a special module that gets loaded before the libs?
More importantly, the process of editing the file to change the MQTT_MAX_PACKET_SIZE.
I have a little question (well, 2 actually).
When are libraries loaded?
In the file that I needed to edit, the item in subject is defined like this:
B4X:
// MQTT_MAX_PACKET_SIZE : Maximum packet size
#ifndef MQTT_MAX_PACKET_SIZE
#define MQTT_MAX_PACKET_SIZE 256
#endif
As you can see it only defines the variable if it isn't already defined. So, I'm thinking, maybe we could define this in b4r using inline C? Then when the lib is loaded it won't re-define it.
I believe this would be better because as it is, if I edit the file like I have, when I install a new version of b4r, the file be overwritten and my project will break again. Where as if it is defined in code within the project, it will always work.
Maybe if this can't work with b4r as it is, then a new solution could be implemented. Thinking maybe a special module that gets loaded before the libs?