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

    UiFlow 2.0 discuss(how-to, bug, feature request or sometings)

    UiFlow 2.0
    74
    188
    386.4k
    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.
    • S
      sgu @charlesRD
      last edited by

      @charlesRD
      i have similar issues

      the Tab5 does not burn UIFlow at all!

      1 Reply Last reply Reply Quote 0
      • S
        sgu
        last edited by

        When Will LVGL be integrated in UIFlow 2 ? I don't see a progress there for many months. The new devices such as Tab5 are useless without LVGL. Programming with UiFlow 2.0 and printing simple lines and squares look very old school.

        1 Reply Last reply Reply Quote 0
        • H
          hacxx Banned
          last edited by

          Thanks for sharing the UiFlow 2.0 resources! I appreciate having a dedicated space for bugs, how-tos, and feature requests. Does anyone have tips on avoiding common firmware burning errors, especially with account binding? Also curious if there’s a timeline for the full API docs release. Looking forward to seeing how this evolves!

          1 Reply Last reply Reply Quote 0
          • T
            thecuri
            last edited by

            I recently los all my private cloud projects....is there a way to get them back from your servers?

            1 Reply Last reply Reply Quote 0
            • Z
              zhumingqi
              last edited by

              I used UIFlow2 to devleop a simple UI demo, and I monitor the free memory with gc.mem_free(). I found the free memory reduced continiously though I called gc.collect() every loop. Finally, the UI can not update again, but the loop still was running.

              Z 1 Reply Last reply Reply Quote 0
              • Z
                zhumingqi @zhumingqi
                last edited by

                I tested more UI design. And I found that the memory leak only happens when I use image component and switch images frequently. Is that a UIFlow2.3.3 bug or my design is incorrect?

                1 Reply Last reply Reply Quote 0
                • Z
                  zhumingqi
                  last edited by

                  Today, I updated the UIFlow to V2.3.4, and burned V2.3.4 firmware as well. Then I tested that image component again with M5GFX in UIFlow 2.3.4. But the issue still exists. After I switch two JPG pics with one image component for sometime, the memory will reduced continiously. Finally, the system will break out. And I try to use gc.collect() after every drawImage(), but it's not useful.
                  Here is my design and python code:
                  import os, sys, io, gc
                  import M5
                  from M5 import *

                  ImageSwitchFlag = None

                  def GcCollectAndPrint():
                  global ImageSwitchFlag
                  gc.collect()
                  print(gc.mem_free())
                  pass

                  def btnA_wasClicked_event(state):
                  global ImageSwitchFlag
                  if ImageSwitchFlag == 0:
                  M5.Lcd.drawImage("/flash/res/img/RotaryBGBacklight.jpg", 0, 0)
                  GcCollectAndPrint()
                  ImageSwitchFlag = 1
                  elif ImageSwitchFlag == 1:
                  M5.Lcd.drawImage("/flash/res/img/RotaryBGBT.jpg", 0, 0)
                  GcCollectAndPrint()
                  ImageSwitchFlag = 0

                  def setup():
                  global ImageSwitchFlag

                  M5.begin()
                  Widgets.fillScreen(0x000000)

                  BtnA.setCallback(type=BtnA.CB_TYPE.WAS_CLICKED, cb=btnA_wasClicked_event)

                  ImageSwitchFlag = 0

                  def loop():
                  global ImageSwitchFlag
                  M5.update()

                  if name == 'main':
                  try:
                  setup()
                  while True:
                  loop()
                  except (Exception, KeyboardInterrupt) as e:
                  try:
                  from utility import print_error_msg
                  print_error_msg(e)
                  except ImportError:
                  print("please update to latest firmware")******

                  b442ffec-d9ce-4445-898c-4b8ffc3caa82-image.png

                  1 Reply Last reply Reply Quote 0
                  • S
                    Schwibach
                    last edited by

                    I wrote in another thread about my Sync... 0% problem.

                    I am pretty sure now that it is a bug. I does not matter which program I use. I can run them from UIFlow 2.0. But as soon as I download a program, I will get the Sync... 0%

                    Also, if I burn firmware without selecting startup, it will not even connect to UIFlow 2.0.

                    I would really appreciate any guidance you could give.

                    1 Reply Last reply Reply Quote 0
                    • O
                      otosan-maker
                      last edited by

                      I have found a bug in MQTT software. When I subscrive to a topic, the python code creates the subscription at the beggining of the setup code, before it connects to wifi and mqtt.

                      Here is the sample:
                      def setup():
                      global page0, label0, LTemp, label1, temperatura, slider0, button0, off, mqtt_client, wlan, rotary
                      mqtt_client.subscribe('termostato/temperatura', mqtt_termostato_temperatura_event, qos=0)

                      M5.begin()
                      m5ui.init()
                      page0 = m5ui.M5Page(bg_c=0xffffff)
                      label0 = m5ui.M5Label("Umbral", x=30, y=81, text_c=0x85231b, bg_c=0x302c2c, bg_opa=0, font=lv.font_montserrat_24, parent=page0)
                      LTemp = m5ui.M5Label("Temperatura:", x=41, y=39, text_c=0x000000, bg_c=0xffffff, bg_opa=0, font=lv.font_montserrat_14, parent=page0)
                      label1 = m5ui.M5Label("19,0", x=152, y=81, text_c=0x85231b, bg_c=0xffffff, bg_opa=0, font=lv.font_montserrat_24, parent=page0)
                      temperatura = m5ui.M5Label("00.00", x=141, y=39, text_c=0x000000, bg_c=0xffffff, bg_opa=0, font=lv.font_montserrat_14, parent=page0)
                      slider0 = m5ui.M5Slider(x=38, y=119, w=160, h=22, mode=lv.slider.MODE.NORMAL, min_value=190, max_value=290, value=210, bg_c=0x115e9f, color=0x2c90e4, parent=page0)
                      button0 = m5ui.M5Button(text="Set", x=54, y=172, bg_c=0x2196f3, text_c=0xffffff, font=lv.font_montserrat_14, parent=page0)
                      off = m5ui.M5Button(text="OFF", x=124, y=171, bg_c=0xf36021, text_c=0xffffff, font=lv.font_montserrat_14, parent=page0)

                      off.add_event_cb(off_event_handler, lv.EVENT.ALL, None)
                      BtnA.setCallback(type=BtnA.CB_TYPE.WAS_CLICKED, cb=btnA_wasClicked_event)
                      slider0.add_event_cb(slider0_event_handler, lv.EVENT.ALL, None)
                      button0.add_event_cb(button0_event_handler, lv.EVENT.ALL, None)

                      page0.screen_load()
                      wlan = network.WLAN(network.STA_IF)
                      rotary = Rotary()
                      wlan.connect('bencab', 'arrabal6')
                      rotary.set_rotary_value(19)
                      mqtt_client = MQTTClient('m5termostato', '192.168.1.34', port=1883, user='user', password='pass', keepalive=33149)
                      label1.set_text(str((slider0.get_value()) / 10))

                      1 Reply Last reply Reply Quote 0
                      • O
                        otosan-maker
                        last edited by

                        c8fa1994-6b95-44a3-bd12-2a546e067051-image.png

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