UIFlow 1.8.2



  • Hi guys

    Setup: M5Core2 with GoPlus2 module.

    Bug: As soon as I send a servo command, the touch screen stops working until I reset M5Core2.

    In below example I can increase the counter with the first touch button just fine. But as soon as I invoke the servo command with the second touch button the touch screen stops reacting at all.

    Note: the issue only occurs with the first servo (S1).
    Note: the servo command is actually executed and the servo goes to the desired position.
    Note: if the servo command sets angle 0, the touch screen keeps working.

    Please fix. Thank you.

    Thanks
    Felix

    0_1629060987088_M5Core2_GoPlus2_touch_issue_20210815.png

    from m5stack import *
    from m5stack_ui import *
    from uiflow import *
    import module
    
    screen = M5Screen()
    screen.clean_screen()
    screen.set_screen_bg_color(0xFFFFFF)
    
    my_count = None
    
    go_plus_2 = module.get(module.GOPLUS2)
    label0 = M5Label('Text', x=110, y=22, color=0x000, font=FONT_MONT_48, parent=None)
    touch_button0 = M5Btn(text='Count', x=100, y=95, w=120, h=50, bg_c=0xFFFFFF, text_c=0x000000, font=FONT_MONT_14, parent=None)
    touch_button1 = M5Btn(text='Servo', x=100, y=173, w=120, h=50, bg_c=0xFFFFFF, text_c=0x000000, font=FONT_MONT_14, parent=None)
    
    from numbers import Number
    
    def touch_button0_pressed():
      global my_count
      my_count = (my_count if isinstance(my_count, Number) else 0) + 1
      pass
    touch_button0.pressed(touch_button0_pressed)
    
    def touch_button1_pressed():
      global my_count
      go_plus_2.set_servo_angle(go_plus_2.S1, 75)
      pass
    touch_button1.pressed(touch_button1_pressed)
    
    my_count = 0
    while True:
      label0.set_text(str(my_count))
      wait_ms(2)
    

  • M5Stack

    @felmue

    actually, we don't suggest put any complex operation to the callback function. you could try to use this block with if block in the loop.

    0_1629251636240_6bc69ea7-798b-4923-92ad-b8041c18ed8f-image.png



  • Hello @m5stack

    thank you for your feedback. Unfortunately it did not resolve the issue.

    I've changed the code to only use a flag my_move in the touch button callback function and then do the real action in the loop.

    Same result: touch screen becomes unresponsive as soon as the S1 servo command has been executed.

    Note: it only happens for servo S1. (Same code with servo S2 works fine.)

    Please test and fix. Thank you.

    Thanks
    Felix

    0_1629265792286_m5core2_goplus2_touch_issue_20210818.png

    from m5stack import *
    from m5stack_ui import *
    from uiflow import *
    import module
    
    screen = M5Screen()
    screen.clean_screen()
    screen.set_screen_bg_color(0xFFFFFF)
    
    my_count = None
    my_move = None
    
    go_plus_2 = module.get(module.GOPLUS2)
    label0 = M5Label('Text', x=110, y=22, color=0x000, font=FONT_MONT_48, parent=None)
    touch_button0 = M5Btn(text='Count', x=100, y=95, w=120, h=50, bg_c=0xFFFFFF, text_c=0x000000, font=FONT_MONT_14, parent=None)
    touch_button1 = M5Btn(text='Servo', x=100, y=173, w=120, h=50, bg_c=0xFFFFFF, text_c=0x000000, font=FONT_MONT_14, parent=None)
    
    from numbers import Number
    
    def touch_button0_pressed():
      global my_count, my_move
      my_count = (my_count if isinstance(my_count, Number) else 0) + 1
      pass
    touch_button0.pressed(touch_button0_pressed)
    
    def touch_button1_pressed():
      global my_count, my_move
      my_move = True
      pass
    touch_button1.pressed(touch_button1_pressed)
    
    my_count = 0
    while True:
      label0.set_text(str(my_count))
      if my_move == True:
        my_move = False
        go_plus_2.set_servo_angle(go_plus_2.S1, 75)
      wait_ms(2)
    


  • @m5stack Does it support BaseX? I could not run the same UIFlow script (previously worked) to drive the BaseX.


  • M5Stack

    @liemph fixed.



  • @m5stack Thank you very much. I will try.



  • Where can the desktop IDE for this version be gotten from?
    I need the Thermal Unit on a Fire but uploading it via the internet connection and the online IDE is very instable.
    I'm only able to download UIFlow-Desktop-IDE version 1.0.17 that contains UiFlow version 1.7.5.

    Creating the file online and then trying to upload it via USB via the lower versioned desktop IDE doesn't work.



  • Another thing I notice is that in version 1.8.2 when trying to load the THERMAL demo it 'hangs' and doesn't load anything.
    </> Python is selected with the default imports but Blockly tab can't be opened.
    When switching to version 1.4.5 I can open the THERMAL demo and view it online but there's no stable way of getting it transferred to the Fire running version 1.8.2 as the internet connection to the code platform seems to be very unstable, after several attempts to upload some code it will state that it's UPLOADING (on the screen of the device) but it doesn't succeed as it disconnects from the cloud where I think it's supposed to get the code from.
    The cloud icon then turns red.
    Sometimes it also remains green but still doesn't succeed in getting the code.



  • Great Job guys!

    Would have documentation related to the LORAWAN Module blocks ?

    Kind Regards,

    bob_isat



  • @m5stack any idea when the Desktop IDE containing UiFlow version 1.8.2 will be available?



  • Cant connect M5Stamp to Uiflow. firmware installed but not connecting and no wifi host



  • @ajb2k3 said in UIFlow 1.8.2:

    Cant connect M5Stamp to Uiflow. firmware installed but not connecting and no wifi host

    remove Connection to pin0 and EN
    If programator is connected device is in the download mode.



  • @mati pins not connected.
    going to try reflashing uiflow.



  • Hello @m5stack, I'm facing the same problem reported by @felmue with Core 2 and GoPlus2. Are you working on this bug?



  • @dario @m5stack I have the same problem here. Is it going to be fixed?