QMK/keyboards/betalupi_ergodox/extra_mappings.c

49 lines
1.1 KiB
C

#include "extra_mappings.h"
// Maps fft columns to leds.
// fft_col_to_array[i] returns an array of leds in the ith bin of the fft.
// Negative indices are "invisible" leds.
// Use them when your keyboard has gaps.
//
// This layout is for the Ergodox EZ.
const int8_t fft_col_to_array[10][5] = {
{ 47, 43, 38, 33, 28 },
{ 46, 42, 37, 32, 27 },
{ 45, 41, 36, 31, 26 },
{ 44, 40, 35, 30, 25 },
{ -1, 39, 34, 29, 24 },
{ -1, 15, 10, 5, 0 },
{ 20, 16, 11, 6, 1 },
{ 21, 17, 12, 7, 2 },
{ 22, 18, 13, 8, 3 },
{ 23, 19, 14, 9, 4 }
};
// This is the inverse of fft_col_to_array.
//
// Each number represets a bin and a height:
// x % bin_height = height,
// x / bin_height = bin
//
// Indices are [col][row].
const int8_t fft_array_to_col[4][14] = {
// Right side
{ 29, 34, 39, 44, 49,
28, 33, 38, 43, 48,
27, 32, 37, 42},{47,
26, 31, 36, 41, 46,
30, 35, 40, 45,
// Left side, mirrored
24, 19, 14, 9},{ 4,
23, 18, 13, 8, 3,
22, 17, 12, 7, 2,
21, 16, 11},{ 6, 1,
20, 15, 10, 5, 0,
// No keys here, fill array length
0, 0, 0, 0, 0, 0, 0}
};