M5Flow Blockly Screen rotate issue
If I develop a simple Blockly (M5Flow) layout for rotating the screen, this does not work. When I look at the underlying Python code I noticed the "lcd.setRotation()" code ends up at the start of the code, and not at the spots where I would expect it (for this example in the button code blocks)
from m5stack import * from m5ui import * from uiflow import * lcd.setRotation(1) lcd.setRotation(3) setScreenColor(0x222222) label0 = M5TextBox(123, 111, "Text", lcd.FONT_Default,0xFFFFFF, rotate=0) def buttonA_wasPressed(): # global params pass btnA.wasPressed(buttonA_wasPressed) def buttonB_wasPressed(): # global params pass btnB.wasPressed(buttonB_wasPressed)
If I copy/paste the "lcd.setRotation()" code blocks into the button blocks, the code works properly on the device. But when I switch back to Blockly, this solution is reverted. I'm having this issue with firmwares 188.8.131.52 and 1.5.2
Does anybody have any clue why this happens? Should the screen only be rotated once?
thank you feedback. this bug we will fix as soon as possible
Thanks, much appreciated!