Thank you for the M5Stack devices and coding tools. This community forum has been a great help too. I have been successfully using UiFlow2 to create code for a Cardputer. But I think there is a bug in the UiFlow2 web UI and/or m5f2 file format.
THIS WORKS: I can save to the cloud, save the project to a local file, and reimport that file, when the script is like:
sTestString = None
def setup():
global sTestString
M5.begin()
Widgets.fillScreen(0x000000)
sTestString = 'hello'
def loop():
global sTestString
M5.update()
THIS DOESN'T WORK: If I edit it and assign a particular more complex value to the string, I cannot save to the cloud, nor reimport a file saved locally:
sTestString = 'OL,1,RW7###jp0 55 j"#k#!7##ih###4up j`%##7#'
This string happens to be a line from a teletext page .tti file, which includes some display control codes. Here is a screenshot of the code which can't be saved to the cloud or reimported, in the UiFlow2 UI:
4afd05da-a1ee-4057-a251-fcb98e423e69-image.png
Decoding this string's value is:
\u004f\u004c\u002c\u0031\u002c\u001b\u0052\u007f\u001b\u0057\u0037\u0023\u0023\u0023\u006a\u0070\u0030\u0020\u0035\u0035\u0020\u0020\u006a\u0022\u0023\u006b\u0023\u0021\u0037\u0023\u0023\u0069\u0068\u0023\u0023\u0023\u0034\u0075\u0070\u0020\u006a\u0060\u0025\u0023\u0023\u0037\u0023
While the script cannot be saved to the cloud (there is no response), the project can be saved to a local file. In the .m5f2 project file, the relevant saved value is:
<field name=\"VAR\" id=\"usN/c#7FD;q`ieH|V~5K\">sTestString</field><value name=\"VALUE\"><block type=\"text\" id=\"ap8ErHQgaUZ`^d-W-%_I\"><field name=\"TEXT\">OL,1,\u001bR\u001bW7###jp0 55 j\"#k#!7##ih###4up j`%##7#</field></block></value>
This local file cannot then by imported again into UiFlow2, giving an "error opening file" message:
2dca212f-b98c-4d77-ba73-8801f4396409-image.png
I believe the problem is related to some unicode characters rather than the " character.