mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-06-03 15:02:47 +00:00
Moved momentum out of RGBLIGHT_ENABLE toggles so it's more generic
This commit is contained in:
parent
b070efe019
commit
b444fa38af
@ -105,7 +105,6 @@ endif
|
||||
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
OPT_DEFS += -DRGBLIGHT_ENABLE
|
||||
SRC += $(QUANTUM_DIR)/rgblight.c
|
||||
SRC += $(QUANTUM_DIR)/momentum.c
|
||||
CIE1931_CURVE = yes
|
||||
LED_BREATHING_TABLE = yes
|
||||
ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
|
||||
@ -208,7 +207,8 @@ QUANTUM_SRC:= \
|
||||
$(QUANTUM_DIR)/quantum.c \
|
||||
$(QUANTUM_DIR)/keymap_common.c \
|
||||
$(QUANTUM_DIR)/keycode_config.c \
|
||||
$(QUANTUM_DIR)/process_keycode/process_leader.c
|
||||
$(QUANTUM_DIR)/process_keycode/process_leader.c \
|
||||
$(QUANTUM_DIR)/momentum.c
|
||||
|
||||
ifndef CUSTOM_MATRIX
|
||||
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
|
||||
|
@ -42,6 +42,8 @@ extern backlight_config_t backlight_config;
|
||||
#include "process_midi.h"
|
||||
#endif
|
||||
|
||||
#include "momentum.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#ifndef GOODBYE_SONG
|
||||
#define GOODBYE_SONG SONG(GOODBYE_SOUND)
|
||||
@ -193,9 +195,7 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||
keypos_t key = record->event.key;
|
||||
uint16_t keycode;
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
if (momentum_enabled()) momentum_accelerate();
|
||||
#endif
|
||||
if (momentum_enabled()) momentum_accelerate();
|
||||
|
||||
#if !defined(NO_ACTION_LAYER) && defined(PREVENT_STUCK_MODIFIERS)
|
||||
/* TODO: Use store_or_get_action() or a similar function. */
|
||||
@ -516,13 +516,13 @@ bool process_record_quantum(keyrecord_t *record) {
|
||||
rgblight_mode(35);
|
||||
}
|
||||
return false;
|
||||
#endif // defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
||||
case MOM_TOG:
|
||||
if (record->event.pressed) {
|
||||
momentum_toggle();
|
||||
}
|
||||
return false;
|
||||
#endif // defined(RGBLIGHT_ENABLE) || defined(RGB_MATRIX_ENABLE)
|
||||
#ifdef PROTOCOL_LUFA
|
||||
#ifdef PROTOCOL_LUFA
|
||||
case OUT_AUTO:
|
||||
if (record->event.pressed) {
|
||||
set_output(OUTPUT_AUTO);
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include "rgblight.h"
|
||||
#include "debug.h"
|
||||
#include "led_tables.h"
|
||||
#include "momentum.h"
|
||||
|
||||
#ifndef RGBLIGHT_LIMIT_VAL
|
||||
#define RGBLIGHT_LIMIT_VAL 255
|
||||
|
@ -80,8 +80,6 @@
|
||||
#include <avr/pgmspace.h>
|
||||
#endif
|
||||
|
||||
#include "momentum.h"
|
||||
|
||||
extern LED_TYPE led[RGBLED_NUM];
|
||||
|
||||
extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM;
|
||||
|
Loading…
Reference in New Issue
Block a user