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

Updates to drashna keymap and minor updates to tractyl manuform #15101

Merged
merged 2 commits into from
Nov 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 0 additions & 2 deletions keyboards/handwired/tractyl_manuform/5x6_right/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define DYNAMIC_KEYMAP_LAYER_COUNT 16
#define LAYER_STATE_16BIT

/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5

/* disable action features */
//#define NO_ACTION_LAYER
Expand Down
6 changes: 3 additions & 3 deletions keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define WS2812_DMA_STREAM STM32_DMA1_STREAM7 // DMA Stream for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.
#define WS2812_DMA_CHANNEL 3 // DMA Channel for TIMx_UP, see the respective reference manual for the appropriate values for your MCU.

#define RGBLED_NUM 20
#define RGBLED_NUM 52
#define RGBLIGHT_SPLIT
#define RGBLED_SPLIT \
{ 10, 10 }
#define RGBLIGHT_LMIT_VAL 80
{ 26, 26 }
#define RGBLIGHT_LIMIT_VAL 150

#define DEBUG_LED_PIN C13

Expand Down
19 changes: 15 additions & 4 deletions keyboards/handwired/tractyl_manuform/5x6_right/f411/readme.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
# Drashna's Blackpill Tractyl Manuform (5x6) with a right side trackball

* VBUS mod, using PB10
* System Timer on TIM5
* ~~VBUS mod, using PB10~~ (*doesn't seem to work for me*)
* Split Hand Pin, using PC14
* Full Duplex Serial/USART using PA3 and PA4 on USART2
* Full Duplex Serial/USART using PA2 and PA3 on USART2
* PWM Audio using PB1 and TIM3 and GPT on TIM4
* PWM RGB using PA1 TIM2
* pmw3360 sensor sharing PA5-PA7 on SPI1, with B0 as CS pin
* PWM WS2812 RGB using PA1 TIM2
* 8KB SPI EEPROM chip sharing PA5-PA7 on SPI1 with PA4 as CS pin
* pmw3360 sensor sharing PA5-PA7 on SPI1, with B0 as CS pin
* Encoder using PA13 and PA14
* SSD1306 OLED display (128x64) using PB8-PB9 on I2C1
* Pull-up resistor (22k) on PA10 to fix reset issue.
* Pull-up resistor (5.1k) on PA1 for WS2812 LED support, and wire it's VCC to the 5V pin.
* Pins PA9, PA11, A12 are not useable because they're used for USB connection, and can't be shared.
* Pin PB2 is used by BOOT1, and is unusable

## Keyboard Info

* Keyboard Maintainer: [Drashna Jael're](https://github.com/drashna)
* Hardware Supported: [Design files](https://gitlab.com/keyboards1/dm_r_track/-/tree/master/boolean), [WeAct BlackPill (F411)](https://github.com/WeActTC/MiniSTM32F4x1), [PMW3360 Optical Sensor](https://www.tindie.com/products/jkicklighter/pmw3360-motion-sensor/)
Expand All @@ -24,3 +29,9 @@ Flashing example for this keyboard:
make handwired/tractyl_manuform/5x6_right/f411:default:flash

See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

## Bootloader

* **Bootmagic reset**: Hold down the top right key on the right side, or the top left key on the left side while plugging in.
* **Physical reset button**: Briefly press the "USER" button on the BlackPill
* **Keycode in layout**: Press the key mapped to `RESET`.
3 changes: 3 additions & 0 deletions keyboards/handwired/tractyl_manuform/5x6_right/f411/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@ BOOTLOADER = stm32-dfu

KEYBOARD_SHARED_EP = yes
CONSOLE_ENABLE = yes
MOUSE_SHARED_EP = no

EEPROM_DRIVER = spi
WS2812_DRIVER = pwm
SERIAL_DRIVER = usart
AUDIO_DRIVER = pwm_hardware

DEBOUNCE_TYPE = asym_eager_defer_pk
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,7 @@

#pragma once

// #define USE_I2C
// #define SELECT_SOFT_SERIAL_SPEED 1
// #define SERIAL_USE_MULTI_TRANSACTION
#define SPLIT_MODS_ENABLE
#define EE_HANDS

#define TRACKBALL_DPI_OPTIONS { 1200, 1800, 2600, 3400 }

#undef DEBOUNCE
#define DEBOUNCE 10

#define SOLENOID_PIN F1
#define SOLENOID_DEFAULT_DWELL 8
#define DEBOUNCE 15
Original file line number Diff line number Diff line change
Expand Up @@ -348,16 +348,8 @@ void render_kitty(void) {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x06, 0x04, 0x04, 0x04, 0x04, 0x05, 0x04, 0x04, 0x04, 0x07, 0x07, 0x07, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};

// assumes 1 frame prep stage
#ifdef SWAP_HANDS_ENABLE
extern bool swap_hands;
#endif
void animation_phase(void) {
# ifdef SWAP_HANDS_ENABLE
if (swap_hands)
#else
if (tap_toggling)
#endif
{
if (tap_toggling) {
anim_frame_duration = 300;
current_rtogi_frame = (current_rtogi_frame + 1) % RTOGI_FRAMES;
oled_write_raw_P(rtogi[abs((RTOGI_FRAMES - 1) - current_rtogi_frame)], ANIM_SIZE);
Expand Down
3 changes: 0 additions & 3 deletions keyboards/handwired/tractyl_manuform/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define VENDOR_ID 0x44DD
#define MANUFACTURER Drashna

/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5

#define USB_POLLING_INTERVAL_MS 1

/* disable debug print */
Expand Down
20 changes: 9 additions & 11 deletions users/drashna/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@
// # define OLED_FONT_5X5
// # define OLED_FONT_AZTECH
// # define OLED_FONT_BMPLAIN
// # define OLED_FONT_CRACKERS
// # define OLED_FONT_HISKYF21
# define OLED_FONT_DEAD_MEAL
// # define OLED_FONT_SUPER_DIGG
// # define OLED_LOGO_GMK_BAD
// # define OLED_LOGO_HUE_MANITEE
Expand All @@ -163,17 +166,12 @@
# define ONESHOT_TIMEOUT 3000
#endif // !ONESHOT_TIMEOUT

// this makes it possible to do rolling combos (zx) with keys that
// convert to other keys on hold (z becomes ctrl when you hold it,
// and when this option isn't enabled, z rapidly followed by x
// actually sends Ctrl-x. That's bad.)
#define IGNORE_MOD_TAP_INTERRUPT
#undef PERMISSIVE_HOLD
//#define TAPPING_FORCE_HOLD_PER_KEY
//#define RETRO_TAPPING_PER_KEY
#if !defined(KEYBOARD_kyria) && !defined(KEYBOARD_splitkb_kyria)
# define TAPPING_TERM_PER_KEY
#endif
#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
#define PERMISSIVE_HOLD_PER_KEY
#define TAPPING_FORCE_HOLD_PER_KEY
#define RETRO_TAPPING_PER_KEY
#define TAPPING_TERM_PER_KEY


#ifndef TAPPING_TOGGLE
# define TAPPING_TOGGLE 1
Expand Down
58 changes: 58 additions & 0 deletions users/drashna/drashna.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,61 @@ void matrix_slave_scan_user(void) {
matrix_slave_scan_keymap();
}
#endif

__attribute__((weak)) uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
default:
return TAPPING_TERM;
}
}

__attribute__((weak)) bool get_permissive_hold(uint16_t keycode, keyrecord_t *record) {
// Immediately select the hold action when another key is tapped:
// return true;
// Do not select the hold action when another key is tapped.
// return false;
switch (keycode) {
default:
return false;
}
}

__attribute__((weak)) bool get_hold_on_other_key_press(uint16_t keycode, keyrecord_t *record) {
// Immediately select the hold action when another key is pressed.
// return true;
// Do not select the hold action when another key is pressed.
// return false;
switch (keycode) {
case QK_LAYER_TAP ... QK_LAYER_TAP_MAX:
return true;
default:
return false;
}
}

__attribute__((weak)) bool get_ignore_mod_tap_interrupt(uint16_t keycode, keyrecord_t *record) {
// Do not force the mod-tap key press to be handled as a modifier
// if any other key was pressed while the mod-tap key is held down.
// return true;
// Force the mod-tap key press to be handled as a modifier if any
// other key was pressed while the mod-tap key is held down.
// return false;
switch (keycode) {
default:
return true;
}
}

__attribute__((weak)) bool get_tapping_force_hold(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
default:
return false;
}
}

__attribute__((weak)) bool get_retro_tapping(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
default:
return false;
}
}
Loading