diff --git a/internal_filesystem/boot.py b/internal_filesystem/boot.py index 215449d3..fc45e065 100644 --- a/internal_filesystem/boot.py +++ b/internal_filesystem/boot.py @@ -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 diff --git a/internal_filesystem/lib/mpos/ui.py b/internal_filesystem/lib/mpos/ui.py index 4f21ef84..ba0857de 100644 --- a/internal_filesystem/lib/mpos/ui.py +++ b/internal_filesystem/lib/mpos/ui.py @@ -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)) diff --git a/scripts/install.sh b/scripts/install.sh index 81389b28..2132ebd8 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -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