Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit06f5229

Browse files
fri3d-2024: less debugging output
1 parentf1ef9f9 commit06f5229

File tree

2 files changed

+5
-23
lines changed

2 files changed

+5
-23
lines changed

‎internal_filesystem/boot_fri3d-2024.py‎

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -188,30 +188,12 @@ def keypad_read_cb(indev, data):
188188
current_key=lv.KEY.END
189189
else:
190190
# Check joystick
191-
angle=read_joystick_angle(0.30)# 0.25-0.27 is right on the edge so 0.30 seems good
192-
ifangleandtime.time()<60:
193-
print(f"got joystick angle:{angle}")
194-
#gc.collect()
195-
print("Memory after joystick:",end=" ")
196-
micropython.mem_info()
191+
angle=read_joystick_angle(0.30)# 0.25-0.27 is right on the edge so 0.30 should be good
192+
ifangle:
197193
try:
198194
mpos.ui.focus_direction.move_focus_direction(angle)
199195
exceptExceptionase:
200-
print(f"Error in move_focus_direction:{e}")
201-
print(f"after joystick angle:{angle}")
202-
#gc.collect()
203-
print("Memory after joystick:",end=" ")
204-
micropython.mem_info()
205-
else:# old behavior
206-
joystick=read_joystick()
207-
ifjoystick=="LEFT":
208-
current_key=lv.KEY.LEFT
209-
elifjoystick=="RIGHT":
210-
current_key=lv.KEY.RIGHT
211-
elifjoystick=="UP":
212-
current_key=lv.KEY.UP
213-
elifjoystick=="DOWN":
214-
current_key=lv.KEY.DOWN
196+
print(f"Exception from move_focus_direction:{e}")
215197

216198
# Key repeat logic
217199
ifcurrent_key:
@@ -223,7 +205,7 @@ def keypad_read_cb(indev, data):
223205
last_state=lv.INDEV_STATE.PRESSED
224206
key_press_start=current_time
225207
last_repeat_time=current_time
226-
else:
208+
else:# same key
227209
# Key held: Check for repeat
228210
elapsed=time.ticks_diff(current_time,key_press_start)
229211
since_last_repeat=time.ticks_diff(current_time,last_repeat_time)

‎internal_filesystem/lib/mpos/ui/focus_direction.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def move_focus_direction(angle):
194194
ifisinstance(current_focused,lv.dropdown)andcurrent_focused.is_open():
195195
print("focus is on an open dropdown, which has its own move_focus_direction: NOT moving")
196196
return
197-
o=find_closest_obj_in_direction(focus_group,current_focused,angle,True)
197+
o=find_closest_obj_in_direction(focus_group,current_focused,angle,False)
198198
ifo:
199199
print("move_focus_direction: moving focus to:")
200200
mpos.util.print_lvgl_widget(o)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp