I am trying building a basic clock to also display the status of my solar battery SOC via MQTT
When I read and display the Mqtt subscribed topic on a label it display 100% in portrait orientation
But if I display it on a canvas in landscape (draw text) it flash the message on and off
The image sprite works fine displaying the SOC graphical for testing I use global S and it display correctly it is when I use UrsPahoMQTT client when the display is on and off
It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.
To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.
No need to call mqtt connect and subscribe in a timer. move this to Screen.Initialized event.
You are drawing the mqtt message and other clock text in different times, so the message is flashing.
You can change your code like this:
in mqtt.messagereceived event, set the message to a global variable.
move the draw message method in clock.timer event.