Cleanup
parent
40f6ddee8a
commit
2c9131f197
52
src/config.h
52
src/config.h
|
@ -1,6 +1,22 @@
|
|||
#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.
|
||||
// These must have the same indices as
|
||||
|
@ -29,25 +45,32 @@ enum layer_layout_ids {
|
|||
#define LOOP_SLEEP_MS 20
|
||||
|
||||
|
||||
//#define DISABLE_SPELL
|
||||
|
||||
|
||||
|
||||
/*
|
||||
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
|
||||
|
||||
// USB device params
|
||||
#define HID_VENDOR_ID 0x3297
|
||||
#define HID_PRODUCT_ID 0x4976
|
||||
#define HID_USAGE 0x61
|
||||
#define HID_USAGE_PAGE 0xFF60
|
||||
|
||||
|
||||
/*
|
||||
Music Visualizer Animation
|
||||
*/
|
||||
#define DISABLE_VISUALIZER
|
||||
|
||||
// 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
|
||||
|
||||
#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)
|
||||
|
@ -59,3 +82,4 @@ enum layer_layout_ids {
|
|||
// Spectrum visualizer range
|
||||
#define MIN_HZ 100
|
||||
#define MAX_HZ 5000
|
||||
#endif
|
|
@ -59,12 +59,6 @@
|
|||
// 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
|
||||
Ergodox Dox = Ergodox::init(
|
||||
HID_VENDOR_ID,
|
||||
|
|
|
@ -7,6 +7,10 @@
|
|||
|
||||
namespace SpecialChars {
|
||||
const std::string special_chars[] = {
|
||||
|
||||
// These characters are used to type
|
||||
// symbols on layouts that don't have
|
||||
// them.
|
||||
"\\`",
|
||||
"~",
|
||||
"'",
|
||||
|
|
|
@ -19,6 +19,10 @@ namespace Visualizer {
|
|||
std::chrono::nanoseconds
|
||||
> last_fifo_sync;
|
||||
|
||||
// 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",
|
||||
44100 / 2, // Keep 500ms of data in buffer
|
||||
|
|
Loading…
Reference in New Issue