Skip to content

Commit

Permalink
Seems to work
Browse files Browse the repository at this point in the history
  • Loading branch information
dkt01 committed Aug 23, 2022
1 parent cb89037 commit d4e520a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
32 changes: 16 additions & 16 deletions src/PlatformApp/PlatformApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ namespace motorConfig {
constexpr static auto voltCompSat = 11.0_V;
constexpr static auto nominalOutputForward = 0.0;
constexpr static auto nominalOutputReverse = 0.0;
constexpr static auto peakOutputForward = 1.0;
constexpr static auto peakOutputReverse = -1.0;
constexpr static auto openLoopRamp = 750_ms;
constexpr static auto closedLoopRamp = 750_ms;
constexpr static auto peakOutputForward = 0.2;
constexpr static auto peakOutputReverse = -0.2;
constexpr static auto openLoopRamp = 3000_ms;
constexpr static auto closedLoopRamp = 3000_ms;
constexpr static auto pid0_selectedSensor = ctre::phoenix::motorcontrol::FeedbackDevice::IntegratedSensor;
constexpr static auto pid0_kP = controlLoop::drive::drive::kP;
constexpr static auto pid0_kI = controlLoop::drive::drive::kI;
Expand All @@ -139,10 +139,10 @@ namespace motorConfig {
constexpr static auto voltCompSat = 11.0_V;
constexpr static auto nominalOutputForward = 0.0;
constexpr static auto nominalOutputReverse = 0.0;
constexpr static auto peakOutputForward = 1.0;
constexpr static auto peakOutputReverse = -1.0;
constexpr static auto openLoopRamp = 750_ms;
constexpr static auto closedLoopRamp = 750_ms;
constexpr static auto peakOutputForward = 0.2;
constexpr static auto peakOutputReverse = -0.2;
constexpr static auto openLoopRamp = 3000_ms;
constexpr static auto closedLoopRamp = 3000_ms;
constexpr static auto pid0_selectedSensor = ctre::phoenix::motorcontrol::FeedbackDevice::IntegratedSensor;
constexpr static auto pid0_kP = controlLoop::drive::drive::kP;
constexpr static auto pid0_kI = controlLoop::drive::drive::kI;
Expand All @@ -169,10 +169,10 @@ namespace motorConfig {
constexpr static auto voltCompSat = 11.0_V;
constexpr static auto nominalOutputForward = 0.0;
constexpr static auto nominalOutputReverse = 0.0;
constexpr static auto peakOutputForward = 1.0;
constexpr static auto peakOutputReverse = -1.0;
constexpr static auto openLoopRamp = 750_ms;
constexpr static auto closedLoopRamp = 750_ms;
constexpr static auto peakOutputForward = 0.2;
constexpr static auto peakOutputReverse = -0.2;
constexpr static auto openLoopRamp = 3000_ms;
constexpr static auto closedLoopRamp = 3000_ms;
constexpr static auto pid0_selectedSensor = ctre::phoenix::motorcontrol::FeedbackDevice::IntegratedSensor;
constexpr static auto pid0_kP = controlLoop::drive::drive::kP;
constexpr static auto pid0_kI = controlLoop::drive::drive::kI;
Expand All @@ -199,10 +199,10 @@ namespace motorConfig {
constexpr static auto voltCompSat = 11.0_V;
constexpr static auto nominalOutputForward = 0.0;
constexpr static auto nominalOutputReverse = 0.0;
constexpr static auto peakOutputForward = 1.0;
constexpr static auto peakOutputReverse = -1.0;
constexpr static auto openLoopRamp = 750_ms;
constexpr static auto closedLoopRamp = 750_ms;
constexpr static auto peakOutputForward = 0.2;
constexpr static auto peakOutputReverse = -0.2;
constexpr static auto openLoopRamp = 3000_ms;
constexpr static auto closedLoopRamp = 3000_ms;
constexpr static auto pid0_selectedSensor = ctre::phoenix::motorcontrol::FeedbackDevice::IntegratedSensor;
constexpr static auto pid0_kP = controlLoop::drive::drive::kP;
constexpr static auto pid0_kI = controlLoop::drive::drive::kI;
Expand Down
3 changes: 2 additions & 1 deletion src/XBoxController/XBoxController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ bool XBoxController::Initialize() {
SDL_GameControllerEventState(SDL_ENABLE);
m_pJoystick = candidateJoystick;
return true;
} else if (num_axes == 7 && (num_buttons == 15 || num_buttons == 12) && num_hats == 1) {
} else if ((num_axes == 7 || num_axes == 6) && (num_buttons == 16 || num_buttons == 15 || num_buttons == 12) &&
num_hats == 1) {
std::cout << "Connected to new XBox Series controller\n";
SDL_GameControllerEventState(SDL_ENABLE);
m_pJoystick = candidateJoystick;
Expand Down

0 comments on commit d4e520a

Please sign in to comment.