Browse Source

Add temporary button debug logger to identify physical button mapping

Prints [BTN] <name> for every button press. Remove after testing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
main
Joe DiPrima 1 month ago
parent
commit
5c75288eb2
  1. 21
      gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/gamepad_manager.hpp

21
gear_sonic_deploy/src/g1/g1_deploy_onnx_ref/include/input_interface/gamepad_manager.hpp

@ -395,8 +395,27 @@ class GamepadManager : public InputInterface {
// Process gamepad inputs for planner controls (called from update())
void processGamepadPlannerControls() {
// === TEMPORARY BUTTON DEBUG — press any button to see its code name ===
if (R1_.on_press) std::cout << "[BTN] R1 pressed" << std::endl;
if (L1_.on_press) std::cout << "[BTN] L1 pressed" << std::endl;
if (start_.on_press) std::cout << "[BTN] start pressed" << std::endl;
if (select_.on_press) std::cout << "[BTN] select pressed" << std::endl;
if (R2_.on_press) std::cout << "[BTN] R2 pressed" << std::endl;
if (L2_.on_press) std::cout << "[BTN] L2 pressed" << std::endl;
if (F1_.on_press) std::cout << "[BTN] F1 pressed" << std::endl;
if (F2_.on_press) std::cout << "[BTN] F2 pressed" << std::endl;
if (A_.on_press) std::cout << "[BTN] A pressed" << std::endl;
if (B_.on_press) std::cout << "[BTN] B pressed" << std::endl;
if (X_.on_press) std::cout << "[BTN] X pressed" << std::endl;
if (Y_.on_press) std::cout << "[BTN] Y pressed" << std::endl;
if (up_.on_press) std::cout << "[BTN] up pressed" << std::endl;
if (right_.on_press) std::cout << "[BTN] right pressed" << std::endl;
if (down_.on_press) std::cout << "[BTN] down pressed" << std::endl;
if (left_.on_press) std::cout << "[BTN] left pressed" << std::endl;
// === END BUTTON DEBUG ===
// Start/Stop buttons
if (start_.on_press) {
if (start_.on_press) {
start_control_ = true;
if constexpr (DEBUG_LOGGING) {
std::cout << "[GamepadManager DEBUG] Start pressed" << std::endl;

Loading…
Cancel
Save