Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moves features to their own files (process_*), adds tap dance feature #460

Merged
merged 79 commits into from
Jun 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
6d3b8c5
non-working commit
jackhumbert Jun 12, 2016
819a448
working
jackhumbert Jun 12, 2016
2ebdeff
Merge branch 'master' into subprojects
jackhumbert Jun 13, 2016
e8645ac
subprojects implemented for planck
jackhumbert Jun 13, 2016
ccdb60d
pass a subproject variable through to c
jackhumbert Jun 13, 2016
305d3c7
consolidates clueboard revisions
jackhumbert Jun 13, 2016
7547fb3
Merge branch 'master' into subprojects
jackhumbert Jun 18, 2016
dbfa563
thanks for letting me know about conflicts..
jackhumbert Jun 18, 2016
ebc4c40
turn off audio for yang's
jackhumbert Jun 18, 2016
f5ea5c1
corrects starting paths for subprojects
jackhumbert Jun 18, 2016
49310b2
messing around with travis
jackhumbert Jun 18, 2016
c296a46
semicolon
jackhumbert Jun 18, 2016
4eb7c7b
travis script
jackhumbert Jun 18, 2016
dffa7af
travis script
jackhumbert Jun 18, 2016
41bfd58
script for travis
jackhumbert Jun 19, 2016
46ed5d5
correct directory (probably), amend files to commit
Jun 19, 2016
1d9c2c5
remove origin before adding
jackhumbert Jun 19, 2016
0a27c36
git pull, correct syntax
jackhumbert Jun 19, 2016
efc298c
git checkout
jackhumbert Jun 19, 2016
a2053bf
git pull origin branch
jackhumbert Jun 19, 2016
7f6bd83
where are we?
jackhumbert Jun 19, 2016
93ae041
where are we?
jackhumbert Jun 19, 2016
82335e4
Merge branch 'subprojects' of https://github.com/jackhumbert/qmk_firm…
jackhumbert Jun 19, 2016
f985bc4
merging
jackhumbert Jun 19, 2016
f43c640
force things to happen
jackhumbert Jun 19, 2016
193a88c
adds commit message, adds add
jackhumbert Jun 19, 2016
6b43b75
rebase, no commit message
jackhumbert Jun 19, 2016
7d0b93d
rebase branch
jackhumbert Jun 19, 2016
dc3c408
idk!
jackhumbert Jun 19, 2016
8446f33
try just pull
jackhumbert Jun 19, 2016
f67ad15
fetch - merge
jackhumbert Jun 19, 2016
983df60
specify repo branch
jackhumbert Jun 19, 2016
f9c444e
checkout
jackhumbert Jun 19, 2016
8ee6d21
goddammit
jackhumbert Jun 19, 2016
60eeba6
merge? idk
jackhumbert Jun 19, 2016
289062f
pls
jackhumbert Jun 19, 2016
a0f304f
after all
jackhumbert Jun 19, 2016
5108de7
don't split up keyboards
jackhumbert Jun 19, 2016
f11b0a6
syntax
jackhumbert Jun 19, 2016
6967a92
Merge branch 'master' into subprojects
jackhumbert Jun 19, 2016
da4b601
adds quick for all-keyboards
jackhumbert Jun 19, 2016
2f64142
trying out new script
jackhumbert Jun 19, 2016
4111800
script update
jackhumbert Jun 19, 2016
63a0830
lowercase
jackhumbert Jun 19, 2016
0dc5297
all keyboards
jackhumbert Jun 19, 2016
f07209d
stop replacing compiled.hex automatically
jackhumbert Jun 19, 2016
a3721f4
adds if statement
jackhumbert Jun 19, 2016
9a29c05
skip automated build branches
jackhumbert Jun 19, 2016
4f05f28
forces push to automated build branch
jackhumbert Jun 19, 2016
b970f88
throw an add in there
jackhumbert Jun 19, 2016
d0bcfe5
upstream?
jackhumbert Jun 19, 2016
b9a30b0
adds AUTOGEN
jackhumbert Jun 19, 2016
5f45d48
ignore all .hex files again
jackhumbert Jun 21, 2016
ac4e73a
testing out new repo
jackhumbert Jun 22, 2016
25a3f7e
global ident
jackhumbert Jun 22, 2016
7e2585b
generate script, keyboard_keymap.hex
jackhumbert Jun 22, 2016
7177b26
skip generation for now, print pandoc info, submodule update
jackhumbert Jun 23, 2016
354bd13
try trusty
jackhumbert Jun 23, 2016
720531e
and sudo
jackhumbert Jun 23, 2016
0480576
try generate
jackhumbert Jun 23, 2016
7c76295
merging master
jackhumbert Jun 23, 2016
dde8870
updates subprojects to keyboards
jackhumbert Jun 23, 2016
bb99887
no idea
jackhumbert Jun 23, 2016
6d264f8
updates to keyboards
jackhumbert Jun 23, 2016
76e182e
merge in backlight stuff
jackhumbert Jun 24, 2016
426f3fe
cleans up clueboard stuff
jackhumbert Jun 24, 2016
8e23578
setup to use local readme
jackhumbert Jun 24, 2016
c50a1b8
updates cluepad, planck experimental
jackhumbert Jun 24, 2016
86c037a
remove extra led.c [ci skip]
jackhumbert Jun 24, 2016
e382e6f
Merge branch 'master' into subprojects
jackhumbert Jun 24, 2016
e2d095f
audio and midi moved over to separate files
jackhumbert Jun 25, 2016
287c8d1
chording, leader, unicode separated
jackhumbert Jun 25, 2016
5677ee2
consolidate each [skip ci]
jackhumbert Jun 25, 2016
887e4d8
correct include
jackhumbert Jun 25, 2016
5a17c77
quantum: Add a tap dance feature (#451)
algernon Jun 28, 2016
8665abf
Merge branch 'master' into quantum-keypress-process
jackhumbert Jun 29, 2016
8260c08
Merge branch 'master' into quantum-keypress-process
jackhumbert Jun 29, 2016
c21343c
Merge branch 'master' into quantum-keypress-process
jackhumbert Jun 29, 2016
27c5490
update build script
jackhumbert Jun 29, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
global:
- secure: vBTSL34BDPxDilKUuTXqU4CJ26Pv5hogD2nghatkxSQkI1/jbdnLj/DQdPUrMJFDIY6TK3AltsBx72MaMsLQ1JO/Ou24IeHINHXzUC1FlS9yQa48cpxnhX5kzXNyGs3oa0qaFbvnr7RgYRWtmD52n4bIZuSuW+xpBv05x2OCizdT2ZonH33nATaHGFasxROm4qYZ241VfzcUv766V6RVHgL4x9V08warugs+RENVkfzxxwhk3NmkrISabze0gSVJLHBPHxroZC6EUcf/ocobcuDrCwFqtEt90i7pNIAFUE7gZsN2uE75LmpzAWin21G7lLPcPL2k4FJVd8an1HiP2WmscJU6U89fOfMb2viObnKcCzebozBCmKGtHEuXZo9FcReOx49AnQSpmESJGs+q2dL/FApkTjQiyT4J6O5dJpoww0/r57Wx0cmmqjETKBb5rSgXM51Etk3wO09mvcPHsEwrT7qH8r9XWdyCDoEn7FCLX3/LYnf/D4SmZ633YPl5gv3v9XEwxR5+04akjgnvWDSNIaDbWBdxHNb7l4pMc+WR1bwCyMyA7KXj0RrftEGOrm9ZRLe6BkbT4cycA+j77nbPOMcyZChliV9pPQos+4TOJoTzcK2L8yWVoY409aDNVuAjdP6Yum0R2maBGl/etLmIMpJC35C5/lZ+dUNjJAM=
script:
- make all-keyboards quick AUTOGEN=true
- make all-keyboards-quick AUTOGEN=true
addons:
apt:
packages:
Expand Down
37 changes: 34 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,32 @@ else
endif



ifneq ("$(wildcard $(KEYMAP_PATH)/config.h)","")
CONFIG_H = $(KEYMAP_PATH)/config.h
else
CONFIG_H = $(KEYBOARD_PATH)/config.h
ifdef SUBPROJECT
ifneq ("$(wildcard $(SUBPROJECT_PATH)/$(SUBPROJECT).c)","")
CONFIG_H = $(SUBPROJECT_PATH)/config.h
endif
endif
endif

# # project specific files
SRC += $(KEYBOARD_FILE) \
$(KEYMAP_FILE) \
$(QUANTUM_DIR)/quantum.c \
$(QUANTUM_DIR)/keymap.c \
$(QUANTUM_DIR)/keycode_config.c
$(QUANTUM_DIR)/keycode_config.c \
$(QUANTUM_DIR)/process_keycode/process_leader.c

ifdef SUBPROJECT
SRC += $(SUBPROJECT_FILE)
endif

ifdef SUBPROJECT
SRC += $(SUBPROJECT_FILE)
endif

ifdef SUBPROJECT
SRC += $(SUBPROJECT_FILE)
Expand All @@ -142,16 +155,33 @@ ifndef CUSTOM_MATRIX
SRC += $(QUANTUM_DIR)/matrix.c
endif

ifeq ($(strip $(MIDI_ENABLE)), yes)
OPT_DEFS += -DMIDI_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
endif

ifeq ($(strip $(AUDIO_ENABLE)), yes)
OPT_DEFS += -DAUDIO_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
SRC += $(QUANTUM_DIR)/audio/audio.c
SRC += $(QUANTUM_DIR)/audio/voices.c
SRC += $(QUANTUM_DIR)/audio/luts.c
endif

ifeq ($(strip $(UNICODE_ENABLE)), yes)
OPT_DEFS += -DUNICODE_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
endif

ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
OPT_DEFS += -DRGBLIGHT_ENABLE
SRC += $(QUANTUM_DIR)/light_ws2812.c
SRC += $(QUANTUM_DIR)/rgblight.c
OPT_DEFS += -DRGBLIGHT_ENABLE
endif

ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
OPT_DEFS += -DTAP_DANCE_ENABLE
SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
endif

# Optimize size but this may cause error "relocation truncated to fit"
Expand All @@ -168,6 +198,7 @@ VPATH += $(TMK_PATH)
VPATH += $(QUANTUM_PATH)
VPATH += $(QUANTUM_PATH)/keymap_extras
VPATH += $(QUANTUM_PATH)/audio
VPATH += $(QUANTUM_PATH)/process_keycode

include $(TMK_PATH)/protocol/lufa.mk
include $(TMK_PATH)/common.mk
Expand Down
2 changes: 2 additions & 0 deletions keyboards/alps64/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ uint8_t matrix_scan(void)
}
}

matrix_scan_quantum();

return 1;
}

Expand Down
39 changes: 39 additions & 0 deletions keyboards/clueboard/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,42 @@
#----------------------------------------------------------------------------
# On command line:
#
# make all = Make software.
#
# make clean = Clean out built project files.
#
# make coff = Convert ELF to AVR COFF.
#
# make extcoff = Convert ELF to AVR Extended COFF.
#
# make program = Download the hex file to the device.
# Please customize your programmer settings(PROGRAM_CMD)
#
# make teensy = Download the hex file to the device, using teensy_loader_cli.
# (must have teensy_loader_cli installed).
#
# make dfu = Download the hex file to the device, using dfu-programmer (must
# have dfu-programmer installed).
#
# make flip = Download the hex file to the device, using Atmel FLIP (must
# have Atmel FLIP installed).
#
# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
# (must have dfu-programmer installed).
#
# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
# (must have Atmel FLIP installed).
#
# make debug = Start either simulavr or avarice as specified for debugging,
# with avr-gdb or avr-insight as the front end for debugging.
#
# make filename.s = Just compile filename.c into the assembler code only.
#
# make filename.i = Create a preprocessed source file for use in submitting
# bug reports to the GCC project.
#
# To rebuild project do "make clean" then "make all".
#----------------------------------------------------------------------------

SUBPROJECT_DEFAULT = rev2

Expand Down
3 changes: 1 addition & 2 deletions keyboards/ergodox_ez/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,7 @@ uint8_t matrix_scan(void)
}
}


matrix_scan_kb();
matrix_scan_quantum();

return 1;
}
Expand Down
11 changes: 11 additions & 0 deletions keyboards/hhkb/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ void matrix_init(void)
matrix_prev = _matrix1;
}

__attribute__ ((weak))
void matrix_scan_user(void) {
}

void matrix_scan_kb(void) {
matrix_scan_user();
}

uint8_t matrix_scan(void)
{
uint8_t *tmp;
Expand Down Expand Up @@ -150,6 +158,9 @@ uint8_t matrix_scan(void)
KEY_POWER_OFF();
suspend_power_down();
}

matrix_scan_quantum();

return 1;
}

Expand Down
2 changes: 1 addition & 1 deletion keyboards/planck/rev3/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

#define DEVICE_VER 0x0003

#endif
#endif
2 changes: 1 addition & 1 deletion keyboards/sixkeyboard/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ uint8_t matrix_scan(void)
matrix[0] = (PINC&(1<<7) ? 0 : (1<<0)) | (PINB&(1<<7) ? 0 : (1<<1)) | (PINB&(1<<5) ? 0 : (1<<2));
matrix[1] = (PIND&(1<<6) ? 0 : (1<<0)) | (PIND&(1<<1) ? 0 : (1<<1)) | (PIND&(1<<4) ? 0 : (1<<2));

matrix_scan_kb();
matrix_scan_quantum();

return 1;
}
Expand Down
2 changes: 2 additions & 0 deletions quantum/keymap.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ enum quantum_keycodes {
#endif
QK_MOD_TAP = 0x6000,
QK_MOD_TAP_MAX = 0x6FFF,
QK_TAP_DANCE = 0x7100,
QK_TAP_DANCE_MAX = 0x71FF,
#ifdef UNICODE_ENABLE
QK_UNICODE = 0x8000,
QK_UNICODE_MAX = 0xFFFF,
Expand Down
109 changes: 0 additions & 109 deletions quantum/keymap_midi.c

This file was deleted.

60 changes: 60 additions & 0 deletions quantum/process_keycode/process_chording.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#include "process_chording.h"

bool keys_chord(uint8_t keys[]) {
uint8_t keys_size = sizeof(keys)/sizeof(keys[0]);
bool pass = true;
uint8_t in = 0;
for (uint8_t i = 0; i < chord_key_count; i++) {
bool found = false;
for (uint8_t j = 0; j < keys_size; j++) {
if (chord_keys[i] == (keys[j] & 0xFF)) {
in++; // detects key in chord
found = true;
break;
}
}
if (found)
continue;
if (chord_keys[i] != 0) {
pass = false; // makes sure rest are blank
}
}
return (pass && (in == keys_size));
}

bool process_chording(uint16_t keycode, keyrecord_t *record) {
if (keycode >= QK_CHORDING && keycode <= QK_CHORDING_MAX) {
if (record->event.pressed) {
if (!chording) {
chording = true;
for (uint8_t i = 0; i < CHORDING_MAX; i++)
chord_keys[i] = 0;
chord_key_count = 0;
chord_key_down = 0;
}
chord_keys[chord_key_count] = (keycode & 0xFF);
chord_key_count++;
chord_key_down++;
return false;
} else {
if (chording) {
chord_key_down--;
if (chord_key_down == 0) {
chording = false;
// Chord Dictionary
if (keys_chord((uint8_t[]){KC_ENTER, KC_SPACE})) {
register_code(KC_A);
unregister_code(KC_A);
return false;
}
for (uint8_t i = 0; i < chord_key_count; i++) {
register_code(chord_keys[i]);
unregister_code(chord_keys[i]);
return false;
}
}
}
}
}
return true;
}
16 changes: 16 additions & 0 deletions quantum/process_keycode/process_chording.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#ifndef PROCESS_CHORDING_H
#define PROCESS_CHORDING_H

#include "quantum.h"

// Chording stuff
#define CHORDING_MAX 4
bool chording = false;

uint8_t chord_keys[CHORDING_MAX] = {0};
uint8_t chord_key_count = 0;
uint8_t chord_key_down = 0;

bool process_chording(uint16_t keycode, keyrecord_t *record);

#endif
Loading