Cleanup
parent
40f6ddee8a
commit
2c9131f197
74
src/config.h
74
src/config.h
|
@ -1,6 +1,22 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
General Setup
|
||||||
|
*/
|
||||||
|
|
||||||
|
// USB device params
|
||||||
|
#define HID_VENDOR_ID 0x3297
|
||||||
|
#define HID_PRODUCT_ID 0x4976
|
||||||
|
#define HID_USAGE 0x61
|
||||||
|
#define HID_USAGE_PAGE 0xFF60
|
||||||
|
|
||||||
|
// USB packet size, in bytes.
|
||||||
|
// Usually 32, but depends on keyboard.
|
||||||
|
#define RAW_EPSIZE 32
|
||||||
|
|
||||||
|
// How many milliseconds to wait between reconnect attempts
|
||||||
|
#define RECONNECT_SLEEP_MS 500
|
||||||
|
|
||||||
// Keyboard layers.
|
// Keyboard layers.
|
||||||
// These must have the same indices as
|
// These must have the same indices as
|
||||||
|
@ -29,33 +45,41 @@ enum layer_layout_ids {
|
||||||
#define LOOP_SLEEP_MS 20
|
#define LOOP_SLEEP_MS 20
|
||||||
|
|
||||||
|
|
||||||
//#define DISABLE_SPELL
|
|
||||||
#define HUNSPELL_AFF_EN "/usr/share/hunspell/en_US.aff"
|
|
||||||
#define HUNSPELL_DIC_EN "/usr/share/hunspell/en_US.dic"
|
|
||||||
|
|
||||||
// USB device params
|
|
||||||
#define HID_VENDOR_ID 0x3297
|
|
||||||
#define HID_PRODUCT_ID 0x4976
|
|
||||||
#define HID_USAGE 0x61
|
|
||||||
#define HID_USAGE_PAGE 0xFF60
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Autotype Special Characters
|
||||||
|
*/
|
||||||
|
//#define DISABLE_SPECIAL_CHAR
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Spellcheck
|
||||||
|
*/
|
||||||
|
#define DISABLE_SPELL
|
||||||
|
#ifndef DISABLE_SPELL
|
||||||
|
#define HUNSPELL_AFF_EN "/usr/share/hunspell/en_US.aff"
|
||||||
|
#define HUNSPELL_DIC_EN "/usr/share/hunspell/en_US.dic"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Music Visualizer Animation
|
||||||
|
*/
|
||||||
#define DISABLE_VISUALIZER
|
#define DISABLE_VISUALIZER
|
||||||
|
#ifndef DISABLE_VISUALIZER
|
||||||
|
// How many keys in a column * resolution per key.
|
||||||
|
// this MUST fit inside a uint8_t (i.e, <= 255).
|
||||||
|
#define KB_RESOLUTION (5 * 50)
|
||||||
|
|
||||||
// USB packet size, in bytes.
|
// How many resolution steps to skip at the top and bottom.
|
||||||
// Usually 32, but depends on keyboard.
|
#define BOTTOM_SKIP 100
|
||||||
#define RAW_EPSIZE 32
|
#define TOP_SKIP 0
|
||||||
|
|
||||||
// How many milliseconds to wait between reconnect attempts
|
// Spectrum visualizer range
|
||||||
#define RECONNECT_SLEEP_MS 500
|
#define MIN_HZ 100
|
||||||
|
#define MAX_HZ 5000
|
||||||
// How many keys in a column * resolution per key.
|
#endif
|
||||||
// this MUST fit inside a uint8_t (i.e, <= 255).
|
|
||||||
#define KB_RESOLUTION (5 * 50)
|
|
||||||
|
|
||||||
// How many resolution steps to skip at the top and bottom.
|
|
||||||
#define BOTTOM_SKIP 100
|
|
||||||
#define TOP_SKIP 0
|
|
||||||
|
|
||||||
// Spectrum visualizer range
|
|
||||||
#define MIN_HZ 100
|
|
||||||
#define MAX_HZ 5000
|
|
|
@ -59,12 +59,6 @@
|
||||||
// pcm from pulse
|
// pcm from pulse
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// buffer size for waveform:
|
|
||||||
// (44100 / fps * 10), make 10 bigger for slower scrolling
|
|
||||||
//
|
|
||||||
// Double both buffer sizes if stereo
|
|
||||||
|
|
||||||
// HID interface wrapper
|
// HID interface wrapper
|
||||||
Ergodox Dox = Ergodox::init(
|
Ergodox Dox = Ergodox::init(
|
||||||
HID_VENDOR_ID,
|
HID_VENDOR_ID,
|
||||||
|
|
|
@ -7,6 +7,10 @@
|
||||||
|
|
||||||
namespace SpecialChars {
|
namespace SpecialChars {
|
||||||
const std::string special_chars[] = {
|
const std::string special_chars[] = {
|
||||||
|
|
||||||
|
// These characters are used to type
|
||||||
|
// symbols on layouts that don't have
|
||||||
|
// them.
|
||||||
"\\`",
|
"\\`",
|
||||||
"~",
|
"~",
|
||||||
"'",
|
"'",
|
||||||
|
|
|
@ -19,7 +19,11 @@ namespace Visualizer {
|
||||||
std::chrono::nanoseconds
|
std::chrono::nanoseconds
|
||||||
> last_fifo_sync;
|
> last_fifo_sync;
|
||||||
|
|
||||||
Buffer buf = Buffer(
|
// buffer size for waveform:
|
||||||
|
// (44100 / fps * 10), make 10 bigger for slower scrolling
|
||||||
|
//
|
||||||
|
// Double both buffer sizes if stereo
|
||||||
|
Buffer buf = Buffer(
|
||||||
"/tmp/mpd.fifo",
|
"/tmp/mpd.fifo",
|
||||||
44100 / 2, // Keep 500ms of data in buffer
|
44100 / 2, // Keep 500ms of data in buffer
|
||||||
fft.compute_buffer_output_size()
|
fft.compute_buffer_output_size()
|
||||||
|
|
Loading…
Reference in New Issue