You've already forked MicroPythonOS
mirror of
https://github.com/m5stack/MicroPythonOS.git
synced 2026-05-20 11:51:27 -07:00
Fixes for actual hardware
This commit is contained in:
@@ -11,6 +11,8 @@ import i2c
|
||||
import lvgl as lv
|
||||
import task_handler
|
||||
|
||||
import mpos.ui
|
||||
|
||||
# Pin configuration
|
||||
SPI_BUS = 2
|
||||
SPI_FREQ = 40000000
|
||||
@@ -115,14 +117,14 @@ def handle_gesture(pin):
|
||||
# Store the starting Y-coordinate
|
||||
start_y = y
|
||||
#print(f"Touch started at Y={start_y}")
|
||||
elif gesture_id == 0x04 and drawer_open: # Swipe up
|
||||
elif gesture_id == 0x04: # Swipe up
|
||||
# print("Swipe Up Detected")
|
||||
close_drawer()
|
||||
mpos.ui.close_drawer()
|
||||
start_y = None # Clear start_y after gesture
|
||||
elif gesture_id == 0x03: # Swipe down
|
||||
if start_y is not None and start_y <= NOTIFICATION_BAR_HEIGHT:
|
||||
if start_y is not None and start_y <= mpos.ui.NOTIFICATION_BAR_HEIGHT:
|
||||
# print("Swipe Down Detected from Notification Bar")
|
||||
open_drawer()
|
||||
mpos.ui.open_drawer()
|
||||
start_y = None # Clear start_y after gesture
|
||||
elif gesture_id == 0x05: # Release
|
||||
start_y = None # Clear start_y on release
|
||||
|
||||
@@ -133,6 +133,7 @@ def create_notification_bar():
|
||||
can_check_temperature = False
|
||||
try:
|
||||
import esp32
|
||||
can_check_temperature = True
|
||||
except Exception as e:
|
||||
print("Warning: can't check temperature sensor:", str(e))
|
||||
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ fi
|
||||
~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r builtin :/
|
||||
~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r lib :/
|
||||
~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r resources :/
|
||||
~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r data :/
|
||||
#~/sources/lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py fs cp -r data :/
|
||||
|
||||
popd
|
||||
|
||||
|
||||
Reference in New Issue
Block a user