Minor cleanup
This commit is contained in:
@ -1,10 +1,15 @@
|
||||
#include "betalupi_ergodox.h"
|
||||
|
||||
#include "features/beta_rawhid.h"
|
||||
#include "extra_mappings.h"
|
||||
|
||||
#include "features/beta_rawhid.h"
|
||||
#include "features/rawhid_commands.h"
|
||||
|
||||
|
||||
extern uint8_t layer_layouts[];
|
||||
|
||||
#ifdef BETA_ENABLE_SPELLCHECK
|
||||
#include "features/spellcheck.h"
|
||||
#endif
|
||||
|
||||
// See features/beta_rawhid.h for prococol documentation
|
||||
void raw_hid_receive(uint8_t *data, uint8_t length) {
|
||||
@ -19,12 +24,13 @@ void raw_hid_receive(uint8_t *data, uint8_t length) {
|
||||
hid_send_state();
|
||||
break;
|
||||
|
||||
#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
#ifdef ENABLE_RGB_MATRIX_FFT_ANIM
|
||||
case CMD_ANIM_DATA:
|
||||
cmd_animation(data, length);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#ifdef BETA_ENABLE_SPELLCHECK
|
||||
case CMD_SPELLCHECK_WORD:
|
||||
if (data[1]) {
|
||||
ergodox_right_led_1_on();
|
||||
@ -32,6 +38,7 @@ void raw_hid_receive(uint8_t *data, uint8_t length) {
|
||||
ergodox_right_led_1_off();
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
break;
|
||||
@ -75,7 +82,7 @@ void _hid_send_state(_hid_send_state_args args) {
|
||||
uint8_t mode = rgb_matrix_get_mode();
|
||||
switch (mode) {
|
||||
|
||||
#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
#ifdef ENABLE_RGB_MATRIX_FFT_ANIM
|
||||
case RGB_MATRIX_CUSTOM_FFT_ANIM:
|
||||
// FFT Animation is active
|
||||
packet[1] = 0x02;
|
||||
@ -95,6 +102,7 @@ void _hid_send_state(_hid_send_state_args args) {
|
||||
}
|
||||
|
||||
|
||||
#ifdef BETA_ENABLE_SPELLCHECK
|
||||
void hid_send_word() {
|
||||
uint8_t packet[RAW_EPSIZE] = {
|
||||
CMD_SPELLCHECK_WORD,
|
||||
@ -107,12 +115,10 @@ void hid_send_word() {
|
||||
|
||||
raw_hid_send(packet, RAW_EPSIZE);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef RGB_MATRIX_FRAMEBUFFER_EFFECTS
|
||||
|
||||
|
||||
#ifdef ENABLE_RGB_MATRIX_FFT_ANIM
|
||||
#define FFT_PER_KEY 50
|
||||
void cmd_animation(uint8_t *data, uint8_t length) {
|
||||
switch (data[1]) {
|
||||
|
Reference in New Issue
Block a user