Skip to content

Commit

Permalink
Update README.md with check against None
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterWaIIace authored Aug 11, 2024
1 parent cf707aa commit 6ee44d0
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,11 @@ while true:
screen_width,
screen_height,
context="my_context")

cursor_x, cursor_y = event.point[0], event.point[1]
fixation = event.fixation
# calibration_radius: radius for data collection during calibration

if event:
cursor_x, cursor_y = event.point[0], event.point[1]
fixation = event.fixation
# calibration_radius: radius for data collection during calibration
```

<!-- POLAR type=ads id=eizdelwu subscription_benefit_id=bb272b6d-f698-44e3-a417-36a6fa203bbe width=240 height=100 -->
Expand Down Expand Up @@ -132,9 +133,11 @@ event, cevent = gestures.estimate(
screen_height,
0, 0, 0.8, 10
)
cursor_x, cursor_y = event.point[0], event.point[1]
fixation = event.fixation
# cevent - is calibration event

if event:
cursor_x, cursor_y = event.point[0], event.point[1]
fixation = event.fixation
# calibration_radius: radius for data collection during calibration
```

Feel free to copy and paste the relevant code snippets for your project.
Expand Down

0 comments on commit 6ee44d0

Please sign in to comment.