From 9dca02b1a9a33ccf613ee045b7d9541849c2c2b2 Mon Sep 17 00:00:00 2001 From: PixelyIon Date: Fri, 2 Aug 2024 22:37:59 +0530 Subject: [PATCH] elrsman: Update auxiliary channel controller layout The auxiliary channel controller layout was based on the XB1 controller layout. This commit updates the layout to be more generic and not tied to a specific controller. --- src/main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index bc64b89..722faab 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -344,9 +344,9 @@ class ElrsManager { crsfChannels.set(1, getAxisValue(SDL_GAMEPAD_AXIS_RIGHTY, true)); crsfChannels.set(2, getCombinedTriggerValue(SDL_GAMEPAD_AXIS_LEFT_TRIGGER, SDL_GAMEPAD_AXIS_RIGHT_TRIGGER)); crsfChannels.set(3, getAxisValue(SDL_GAMEPAD_AXIS_LEFTX)); - // CRSF Aux 1 value is ignored for some reason. - crsfChannels.set(5, getButtonToggle(SDL_GAMEPAD_BUTTON_START)); - crsfChannels.set(6, getButtonToggle(SDL_GAMEPAD_BUTTON_LEFT_STICK)); + crsfChannels.set(4, getButtonToggle(SDL_GAMEPAD_BUTTON_LEFT_SHOULDER)); + crsfChannels.set(5, getButtonToggle(SDL_GAMEPAD_BUTTON_RIGHT_SHOULDER)); + crsfChannels.set(6, getButtonToggle(SDL_GAMEPAD_BUTTON_START)); constexpr std::array channelLabels{"Roll", "Pitch", "Throttle", "Yaw", "Aux 1", "Aux 2", "Aux 3"}; for (int i{}; i < channelLabels.size(); i++) {