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

Commit169c482

Browse files
fri3d-2024: less debug
1 parent06f5229 commit169c482

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

‎internal_filesystem/boot_fri3d-2024.py‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,20 +128,20 @@ def read_joystick_angle(threshold=0.1):
128128
val_up_down=adc_up_down.read()
129129
val_left_right=adc_left_right.read()
130130

131-
iftime.time()<60:
132-
print(f"val_up_down:{val_up_down}")
133-
print(f"val_left_right:{val_left_right}")
131+
#if time.time() < 60:
132+
# print(f"val_up_down: {val_up_down}")
133+
# print(f"val_left_right: {val_left_right}")
134134

135135
# Normalize to [-1, 1]
136136
x= (val_left_right-2048)/2048# Positive x = RIGHT
137137
y= (val_up_down-2048)/2048# Positive y = UP
138-
iftime.time()<60:
139-
print(f"x,y ={x},{y}")
138+
#if time.time() < 60:
139+
# print(f"x,y = {x},{y}")
140140

141141
# Check if joystick is near center
142142
magnitude=math.sqrt(x*x+y*y)
143-
iftime.time()<60:
144-
print(f"magnitude:{magnitude}")
143+
#if time.time() < 60:
144+
# print(f"magnitude: {magnitude}")
145145
ifmagnitude<threshold:
146146
returnNone# Neutral position
147147

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp