UiFlow 2.0 discuss(how-to, bug, feature request or sometings)
-
This post is deleted! -
@charlesRD
i have similar issuesthe Tab5 does not burn UIFlow at all!
-
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.
-
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!
-
I recently los all my private cloud projects....is there a way to get them back from your servers?
-
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.
-
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?
-
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())
passdef 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 = 0def setup():
global ImageSwitchFlagM5.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")****** -
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.
-
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)) -