Skip to content

Commit

Permalink
define constants always
Browse files Browse the repository at this point in the history
remove some `ifdef` switches.
  • Loading branch information
koron committed Mar 23, 2024
1 parent f28ece4 commit d99dca4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions qmk_firmware/keyboards/keyball/lib/keyball/keyball.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
const uint8_t CPI_DEFAULT = KEYBALL_CPI_DEFAULT / 100;
const uint8_t CPI_MAX = pmw3360_MAXCPI + 1;
const uint8_t SCROLL_DIV_MAX = 7;
#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE

const uint16_t AML_TIMEOUT_DEFAULT = 9;
const uint16_t AML_TIMEOUT_MAX = 15;
#endif

keyball_t keyball = {
.this_have_ball = false,
Expand Down
4 changes: 2 additions & 2 deletions qmk_firmware/keyboards/keyball/lib/keyball/keyball.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ enum keyball_keycodes {
SCRL_DVI = QK_KB_8, // Increment scroll divider
SCRL_DVD = QK_KB_9, // Decrement scroll divider

#ifdef POINTING_DEVICE_AUTO_MOUSE_ENABLE
// Auto mouse layer control keycodes.
// Only works when POINTING_DEVICE_AUTO_MOUSE_ENABLE is defined.
AML_TO = QK_KB_10, // Toggle automatic mouse layer
AML_I50 = QK_KB_11, // Increment automatic mouse layer timeout
AML_D50 = QK_KB_12, // Decrement automatic mouse layer timeout
#endif

// User customizable 32 keycodes.
KEYBALL_SAFE_RANGE = QK_USER_0,
Expand Down

0 comments on commit d99dca4

Please sign in to comment.