Skip to content

Commit

Permalink
Fix enables for Haptic Feedback (qmk#6707)
Browse files Browse the repository at this point in the history
* Fix enables for Haptic Feedback

If you enabled bothe DRV2605 and SOLENOID, it would only enable one of these, not both. 

This fixes the check so that you can enable both options.

* Fix check for haptic feature
  • Loading branch information
drashna authored Sep 15, 2019
1 parent d13e0b5 commit 265d8ab
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -267,20 +267,21 @@ ifeq ($(strip $(ENCODER_ENABLE)), yes)
OPT_DEFS += -DENCODER_ENABLE
endif

ifeq ($(strip $(HAPTIC_ENABLE)), DRV2605L)
COMMON_VPATH += $(DRIVER_PATH)/haptic
SRC += haptic.c
HAPTIC_ENABLE ?= no
ifneq ($(strip $(HAPTIC_ENABLE)),no)
COMMON_VPATH += $(DRIVER_PATH)/haptic
SRC += haptic.c
OPT_DEFS += -DHAPTIC_ENABLE
endif

ifneq ($(filter DRV2605L, $(HAPTIC_ENABLE)), )
SRC += DRV2605L.c
QUANTUM_LIB_SRC += i2c_master.c
OPT_DEFS += -DHAPTIC_ENABLE
OPT_DEFS += -DDRV2605L
endif

ifeq ($(strip $(HAPTIC_ENABLE)), SOLENOID)
COMMON_VPATH += $(DRIVER_PATH)/haptic
SRC += haptic.c
ifneq ($(filter SOLENOID, $(HAPTIC_ENABLE)), )
SRC += solenoid.c
OPT_DEFS += -DHAPTIC_ENABLE
OPT_DEFS += -DSOLENOID_ENABLE
endif

Expand Down

0 comments on commit 265d8ab

Please sign in to comment.