Skip to main content

controller.rs — Gamepad Input

This file is work in progress

Handles physical gamepad/controller input using the gilrs library.

start_controller_listener() is called at app startup and spawns a dedicated OS thread (not async) that polls for gamepad events every 8ms. It currently logs all button presses, releases, axis changes, and connect/disconnect events to the console.

The pressed_key command exists to receive keyboard movement commands from the frontend (MovementCommand with up, down, left, right booleans), though the actual rover command dispatch is not yet implemented.