🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Possible Bug On Image Hide/Show

    Bug Report
    1
    2
    3.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      Delchi
      last edited by

      Core2Duo
      Firmware : UiFlow 1.7.4.1-Core2
      IDE : UiFlow 1.7.4

      What I'm trying to do :

      • Display image 0 ( PNG , in Flash , 330 x 240 36.4 KB )
      • Wait for Button A to be pressed
      • Hide Image 0
      • Play WAV file ( SD card )
      • Show Label0
      • Wait 5
      • Show Image 0

      What happens :
      Everything works, with the exception of the image show/hide/show. It constantly shows after button A is pressed. Wave file pays, but no change to the image.

      Coded in Blockly,

      0_1618199240915_Capture.JPG

      Python :

      from m5stack import *
      from m5stack_ui import *
      from uiflow import *
      import time
      
      screen = M5Screen()
      screen.clean_screen()
      screen.set_screen_bg_color(0xFFFFFF)
      
      image0 = M5Img("res/Untitled-2.png", x=0, y=0, parent=None)
      
      def buttonA_wasPressed():
        # global params
        image0.set_hidden(True)
        speaker.playWAV('/sd/accepted.wav', rate=44100, dataf=speaker.F16B)
        wait(5)
        image0.set_hidden(False)
        pass
      btnA.wasPressed(buttonA_wasPressed)
      
      image0.set_hidden(False)
      
      D 1 Reply Last reply Reply Quote 0
      • D
        Delchi @Delchi
        last edited by

        @delchi said in Possible Bug On Image Hide/Show:

        Core2Duo
        Firmware : UiFlow 1.7.4.1-Core2
        IDE : UiFlow 1.7.4

        What I'm trying to do :

        • Display image 0 ( PNG , in Flash , 330 x 240 36.4 KB )
        • Wait for Button A to be pressed
        • Hide Image 0
        • Play WAV file ( SD card )
        • Show Label0
        • Wait 5
        • Show Image 0

        What happens :
        Everything works, with the exception of the image show/hide/show. It constantly shows after button A is pressed. Wave file pays, but no change to the image.

        Coded in Blockly,

        0_1618199240915_Capture.JPG

        Python :

        from m5stack import *
        from m5stack_ui import *
        from uiflow import *
        import time
        
        screen = M5Screen()
        screen.clean_screen()
        screen.set_screen_bg_color(0xFFFFFF)
        
        image0 = M5Img("res/Untitled-2.png", x=0, y=0, parent=None)
        
        def buttonA_wasPressed():
          # global params
          image0.set_hidden(True)
          speaker.playWAV('/sd/accepted.wav', rate=44100, dataf=speaker.F16B)
          wait(5)
          image0.set_hidden(False)
          pass
        btnA.wasPressed(buttonA_wasPressed)
        
        image0.set_hidden(False)
        

        Bump ?

        1 Reply Last reply Reply Quote 0
        • First post
          Last post