Skip to content

Commit

Permalink
elrsman: Update auxiliary channel controller layout
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
PixelyIon committed Aug 2, 2024
1 parent 077b9f8 commit 9dca02b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<const char*, 7> channelLabels{"Roll", "Pitch", "Throttle", "Yaw", "Aux 1", "Aux 2", "Aux 3"};
for (int i{}; i < channelLabels.size(); i++) {
Expand Down

0 comments on commit 9dca02b

Please sign in to comment.