Skip to content

Conversation

@takaokouji
Copy link

Summary

This PR improves the 'moved' gesture event behavior in the MicrobitMore extension.

Changes

  • Cooldown for 'moved' event: Added a cooldown mechanism (approximately 165ms) to prevent the event from firing too frequently when the micro:bit is moved.
  • Menu order: Moved the 'moved' gesture to the top of the gestures menu for better accessibility.
  • Default value: Changed the default gesture for the 'when gesture' block to 'moved'.

Implementation Details

  • Initialized in constructor.
  • Updated to check the elapsed time since the last 'moved' event.
  • Reordered .
  • Updated the block definition in .

Part of smalruby/smalruby3-develop#20

takaokouji and others added 8 commits January 15, 2026 18:57
- Implement cooldown (165ms) for 'moved' event to prevent continuous firing
- Move 'moved' gesture to the top of the gestures menu
- Set 'moved' as the default value for the gesture block

Co-Authored-By: Gemini <noreply@google.com>
… logs)

- Fire event on movement, then suppress until a 5-frame gap occurs
- Force fire after 30 frames if movement is continuous
- Includes high-resolution debug logs for verification
@takaokouji takaokouji merged commit fa7942a into develop Jan 15, 2026
1 check passed
@takaokouji takaokouji deleted the fix/issue-20-moved-event-improvements branch January 15, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants