From 67e4a956973617671db2b748dcc49d20ac219611 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Sat, 15 Feb 2025 03:29:09 +0300 Subject: [PATCH] Minor fix in joystick support for simulation Don't use channels variable as it breaks code isolation --- gazebo/joystick.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gazebo/joystick.h b/gazebo/joystick.h index 88b6dcb..714b502 100644 --- a/gazebo/joystick.h +++ b/gazebo/joystick.h @@ -49,7 +49,7 @@ bool joystickInit() { bool joystickGet(int16_t ch[16]) { SDL_JoystickUpdate(); - for (uint8_t i = 0; i < sizeof(channels) / sizeof(channels[0]); i++) { + for (uint8_t i = 0; i < 16; i++) { ch[i] = SDL_JoystickGetAxis(joystick, i); } return true;