File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 1111import lvgl as lv
1212import task_handler
1313
14+ import mpos .ui
15+
1416# Pin configuration
1517SPI_BUS = 2
1618SPI_FREQ = 40000000
@@ -115,14 +117,14 @@ def handle_gesture(pin):
115117 # Store the starting Y-coordinate
116118 start_y = y
117119 #print(f"Touch started at Y={start_y}")
118- elif gesture_id == 0x04 and drawer_open : # Swipe up
120+ elif gesture_id == 0x04 : # Swipe up
119121 # print("Swipe Up Detected")
120- close_drawer ()
122+ mpos . ui . close_drawer ()
121123 start_y = None # Clear start_y after gesture
122124 elif gesture_id == 0x03 : # Swipe down
123- if start_y is not None and start_y <= NOTIFICATION_BAR_HEIGHT :
125+ if start_y is not None and start_y <= mpos . ui . NOTIFICATION_BAR_HEIGHT :
124126 # print("Swipe Down Detected from Notification Bar")
125- open_drawer ()
127+ mpos . ui . open_drawer ()
126128 start_y = None # Clear start_y after gesture
127129 elif gesture_id == 0x05 : # Release
128130 start_y = None # Clear start_y on release
Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ def update_wifi_icon(timer):
133133 can_check_temperature = False
134134 try :
135135 import esp32
136+ can_check_temperature = True
136137 except Exception as e :
137138 print ("Warning: can't check temperature sensor:" , str (e ))
138139
Original file line number Diff line number Diff line change 4545~ /sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r builtin :/
4646~ /sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r lib :/
4747~ /sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r resources :/
48- ~ /sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r data :/
48+ # ~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r data :/
4949
5050popd
5151
You can’t perform that action at this time.
0 commit comments