Skip to content

Commit

Permalink
Merge pull request #34 from MarlinFirmware/bugfix-2.0.x
Browse files Browse the repository at this point in the history
Add option to invert joystick axes (MarlinFirmware#16466)
  • Loading branch information
Vertabreak authored Jan 5, 2020
2 parents df7ed34 + 9b970cf commit 714b459
Show file tree
Hide file tree
Showing 133 changed files with 681 additions and 138 deletions.
6 changes: 5 additions & 1 deletion Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
27 changes: 21 additions & 6 deletions Marlin/src/feature/joystick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,40 @@ Joystick joystick;

#if HAS_JOY_ADC_X
temp_info_t Joystick::x; // = { 0 }
#if ENABLED(INVERT_JOY_X)
#define JOY_X(N) (16383 - (N))
#else
#define JOY_X(N) (N)
#endif
#endif
#if HAS_JOY_ADC_Y
temp_info_t Joystick::y; // = { 0 }
#if ENABLED(INVERT_JOY_Y)
#define JOY_Y(N) (16383 - (N))
#else
#define JOY_Y(N) (N)
#endif
#endif
#if HAS_JOY_ADC_Z
temp_info_t Joystick::z; // = { 0 }
#if ENABLED(INVERT_JOY_Z)
#define JOY_Z(N) (16383 - (N))
#else
#define JOY_Z(N) (N)
#endif
#endif

#if ENABLED(JOYSTICK_DEBUG)
void Joystick::report() {
SERIAL_ECHOPGM("Joystick");
#if HAS_JOY_ADC_X
SERIAL_ECHOPAIR_P(SP_X_STR, x.raw);
SERIAL_ECHOPAIR_P(SP_X_STR, JOY_X(x.raw));
#endif
#if HAS_JOY_ADC_Y
SERIAL_ECHOPAIR_P(SP_Y_STR, y.raw);
SERIAL_ECHOPAIR_P(SP_Y_STR, JOY_Y(y.raw));
#endif
#if HAS_JOY_ADC_Z
SERIAL_ECHOPAIR_P(SP_Z_STR, z.raw);
SERIAL_ECHOPAIR_P(SP_Z_STR, JOY_Z(z.raw));
#endif
#if HAS_JOY_ADC_EN
SERIAL_ECHO_TERNARY(READ(JOY_EN_PIN), " EN=", "HIGH (dis", "LOW (en", "abled)");
Expand Down Expand Up @@ -91,15 +106,15 @@ Joystick joystick;

#if HAS_JOY_ADC_X
static constexpr int16_t joy_x_limits[4] = JOY_X_LIMITS;
_normalize_joy(norm_jog.x, x.raw, joy_x_limits);
_normalize_joy(norm_jog.x, JOY_X(x.raw), joy_x_limits);
#endif
#if HAS_JOY_ADC_Y
static constexpr int16_t joy_y_limits[4] = JOY_Y_LIMITS;
_normalize_joy(norm_jog.y, y.raw, joy_y_limits);
_normalize_joy(norm_jog.y, JOY_Y(y.raw), joy_y_limits);
#endif
#if HAS_JOY_ADC_Z
static constexpr int16_t joy_z_limits[4] = JOY_Z_LIMITS;
_normalize_joy(norm_jog.z, z.raw, joy_z_limits);
_normalize_joy(norm_jog.z, JOY_Z(z.raw), joy_z_limits);
#endif
}

Expand Down
6 changes: 5 additions & 1 deletion config/default/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/3DFabXYZ/Migbot/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2774,7 +2774,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/ADIMLab/Gantry v1/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/ADIMLab/Gantry v2/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/AlephObjects/TAZ4/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/Alfawise/U20-bltouch/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2765,7 +2765,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/Alfawise/U20/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2764,7 +2764,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/AliExpress/UM2pExt/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2765,7 +2765,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/Anet/A2/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/Anet/A2plus/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/Anet/A6/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/Anet/A8/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/Anet/A8plus/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/Anet/E10/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/Anet/E16/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/AnyCubic/i3/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/ArmEd/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2767,7 +2767,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/Artillery/Genius/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/Artillery/Sidewinder X1/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/BIBO/TouchX/default/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/BQ/Hephestos/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/BQ/Hephestos_2/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2771,7 +2771,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
6 changes: 5 additions & 1 deletion config/examples/BQ/WITBOX/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -2763,7 +2763,11 @@
#define JOY_Z_PIN 12 // RAMPS: Suggested pin A12 on AUX2
#define JOY_EN_PIN 44 // RAMPS: Suggested pin D44 on AUX2

// Use M119 to find reasonable values after connecting your hardware:
//#define INVERT_JOY_X // Enable if X direction is reversed
//#define INVERT_JOY_Y // Enable if Y direction is reversed
//#define INVERT_JOY_Z // Enable if Z direction is reversed

// Use M119 with JOYSTICK_DEBUG to find reasonable values after connecting:
#define JOY_X_LIMITS { 5600, 8190-100, 8190+100, 10800 } // min, deadzone start, deadzone end, max
#define JOY_Y_LIMITS { 5600, 8250-100, 8250+100, 11000 }
#define JOY_Z_LIMITS { 4800, 8080-100, 8080+100, 11550 }
Expand Down
Loading

0 comments on commit 714b459

Please sign in to comment.