Skip to content

Commit 6a12af1

Browse files
Fixes for actual hardware
1 parent 1f1a333 commit 6a12af1

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

internal_filesystem/boot.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
import lvgl as lv
1212
import task_handler
1313

14+
import mpos.ui
15+
1416
# Pin configuration
1517
SPI_BUS = 2
1618
SPI_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

internal_filesystem/lib/mpos/ui.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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

scripts/install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fi
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

5050
popd
5151

0 commit comments

Comments
 (0)