mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-10-02 23:08:59 +02:00
Moved momentum out of RGBLIGHT_ENABLE toggles so it's more generic
This commit is contained in:
+5
-5
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user