From b43e75b9710188fb397c4eb8ab582fb5709fc7d6 Mon Sep 17 00:00:00 2001 From: moritz plattner Date: Wed, 8 Mar 2023 20:57:46 +0100 Subject: [PATCH 01/10] added macropod --- keyboards/geistmaschine/macropod/config.h | 5 ++ keyboards/geistmaschine/macropod/info.json | 41 +++++++++ .../macropod/keymaps/default/keymap.c | 28 ++++++ .../macropod/keymaps/via/keymap.c | 33 +++++++ .../macropod/keymaps/via/rules.mk | 1 + keyboards/geistmaschine/macropod/matrix.c | 89 +++++++++++++++++++ keyboards/geistmaschine/macropod/readme.md | 25 ++++++ keyboards/geistmaschine/macropod/rules.mk | 7 ++ 8 files changed, 229 insertions(+) create mode 100644 keyboards/geistmaschine/macropod/config.h create mode 100644 keyboards/geistmaschine/macropod/info.json create mode 100644 keyboards/geistmaschine/macropod/keymaps/default/keymap.c create mode 100644 keyboards/geistmaschine/macropod/keymaps/via/keymap.c create mode 100644 keyboards/geistmaschine/macropod/keymaps/via/rules.mk create mode 100644 keyboards/geistmaschine/macropod/matrix.c create mode 100644 keyboards/geistmaschine/macropod/readme.md create mode 100644 keyboards/geistmaschine/macropod/rules.mk diff --git a/keyboards/geistmaschine/macropod/config.h b/keyboards/geistmaschine/macropod/config.h new file mode 100644 index 000000000000..dca14f51f382 --- /dev/null +++ b/keyboards/geistmaschine/macropod/config.h @@ -0,0 +1,5 @@ +#pragma once + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 7 diff --git a/keyboards/geistmaschine/macropod/info.json b/keyboards/geistmaschine/macropod/info.json new file mode 100644 index 000000000000..6cf15fc0304c --- /dev/null +++ b/keyboards/geistmaschine/macropod/info.json @@ -0,0 +1,41 @@ +{ + "manufacturer": "Geistmaschine", + "keyboard_name": "Macropod", + "maintainer": "ebastler", + "bootloader": "atmel-dfu", + "processor": "atmega32u4", + "url": "https://geistmaschine.io/", + "usb": { + "device_version": "1.0.0", + "pid": "0x0004", + "vid": "0x676D" + }, + "features": { + "bootmagic": true, + "command": false, + "console": true, + "extrakey": true, + "mousekey": true, + "nkro": false, + "encoder": true + }, + "encoder": { + "rotary": [ + { + "pin_a": "D3", + "pin_b": "D5", + "resolution": 2 + } + ] + }, + "layouts": { + "LAYOUT_fourkey": { + "layout": [ + {"x":0, "y":0, "matrix":[0,0] }, + {"x":0, "y":1.25, "matrix":[0,1] }, + {"x":0, "y":2.25, "matrix":[0,2] }, + {"x":0, "y":3.25, "matrix":[0,3] } + ] + } + } +} \ No newline at end of file diff --git a/keyboards/geistmaschine/macropod/keymaps/default/keymap.c b/keyboards/geistmaschine/macropod/keymaps/default/keymap.c new file mode 100644 index 000000000000..dd7595f416dd --- /dev/null +++ b/keyboards/geistmaschine/macropod/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_fourkey ( + KC_MPLY, KC_A, KC_B, KC_C + ), + + [1] = LAYOUT_fourkey ( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT_fourkey ( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_fourkey ( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, +}; +#endif diff --git a/keyboards/geistmaschine/macropod/keymaps/via/keymap.c b/keyboards/geistmaschine/macropod/keymaps/via/keymap.c new file mode 100644 index 000000000000..7b1bf828e3c8 --- /dev/null +++ b/keyboards/geistmaschine/macropod/keymaps/via/keymap.c @@ -0,0 +1,33 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_fourkey ( + KC_MPLY, KC_A, KC_B, KC_C + ), + + [1] = LAYOUT_fourkey ( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT_fourkey ( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_fourkey ( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, + [1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, +}; +#endif + +void keyboard_post_init_user(void) { + // Customise these values to desired behaviour + debug_enable=true; +} \ No newline at end of file diff --git a/keyboards/geistmaschine/macropod/keymaps/via/rules.mk b/keyboards/geistmaschine/macropod/keymaps/via/rules.mk new file mode 100644 index 000000000000..036bd6d1c3ec --- /dev/null +++ b/keyboards/geistmaschine/macropod/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/geistmaschine/macropod/matrix.c b/keyboards/geistmaschine/macropod/matrix.c new file mode 100644 index 000000000000..3279189d3274 --- /dev/null +++ b/keyboards/geistmaschine/macropod/matrix.c @@ -0,0 +1,89 @@ +/* Copyright 2022 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "pca9555.h" +#include "quantum.h" +#include "print.h" + +// PCA9555 i2c address, 0x20: A0 = 0, A1 = 0, A2 = 0 +#define IC1 0x20 + +// Define how long to wait to reach the IO expander after connection loss again +// Since this board is modular, it should not spam unnecessary i2c requests if used without a module +#define RETRY_TIMESPAN 2000 + +typedef enum { + PLUGGED, + DOUBTFUL, + UNPLUGGED +} expander_status_t; + +void pca9555_setup(void) { + // Initialize the expnader, then set all pins on Port 0 as inputs + pca9555_init(IC1); + // pca9555_set_config(IC1, PCA9555_PORT0, ALL_INPUT); +} + +void matrix_init_custom(void) { + // Encoder pushbutton on the MCU is connected to PD2 + setPinInputHigh(D2); + pca9555_setup(); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + static expander_status_t status = DOUBTFUL; + static uint32_t retry_timer = 0; + + // initialize one byte filled with 1 + uint8_t pin_states = 0xFF; + + + // Read the entire port into this byte, 1 = not pressed, 0 = pressed + if (status != UNPLUGGED || timer_elapsed32(retry_timer) > RETRY_TIMESPAN) { + // If the chip was unplugged before, it needs to be re-initialized + if(status==UNPLUGGED) { + pca9555_setup(); + } + bool ret = pca9555_readPins(IC1, PCA9555_PORT0, &pin_states); + + // Update state + if (ret) { + status = PLUGGED; + } else { + switch (status) { + case PLUGGED: + status = DOUBTFUL; + break; + + case DOUBTFUL: + status = UNPLUGGED; + break; + + // If we've diagnosed as unplugged, update timer to not read I2C + case UNPLUGGED: + retry_timer = timer_read32(); + } + } + } + + // Shift pin states by 1 to make room for the switch connected to the MCU, then OR them together and invert (as QMK uses inverted logic compared to the electrical levels) + matrix_row_t data = ~(pin_states << 1 | readPin(D2)); + + bool changed = current_matrix[0] != data; + current_matrix[0] = data; + + return changed; +} \ No newline at end of file diff --git a/keyboards/geistmaschine/macropod/readme.md b/keyboards/geistmaschine/macropod/readme.md new file mode 100644 index 000000000000..6f7e4ada46a3 --- /dev/null +++ b/keyboards/geistmaschine/macropod/readme.md @@ -0,0 +1,25 @@ +# Ada + +![geist](imgur.com image replace me!) + +Macropod is a modular macropad, designed around a central big encoder with a magnetic connector for modularity. The default module uses three MX style keys. +* Keyboard Maintainer: [ebastler](https://github.com/ebastler) +* Hardware Supported: Ada rev1 +* Hardware Availability: [geistmaschine.io](https://geistmaschine.io/) + +Make example for this keyboard (after setting up your build environment): + + make geistmaschine/macropod:default + +Flashing example for this keyboard: + + make geistmaschine/macropod: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 + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (the knob on the main module) and plug in the keyboard +* **Physical reset button**: Briefly tap the button marked "RST" on the back of the main module PCB diff --git a/keyboards/geistmaschine/macropod/rules.mk b/keyboards/geistmaschine/macropod/rules.mk new file mode 100644 index 000000000000..2b560feb7c6f --- /dev/null +++ b/keyboards/geistmaschine/macropod/rules.mk @@ -0,0 +1,7 @@ +ENCODER_MAP_ENABLE = yes + +CUSTOM_MATRIX = lite + +VPATH += drivers/gpio +SRC += pca9555.c matrix.c +QUANTUM_LIB_SRC += i2c_master.c \ No newline at end of file From 167c0995ac5ce44baf0c2988d0df4065646ee691 Mon Sep 17 00:00:00 2001 From: moritz plattner Date: Mon, 13 Mar 2023 14:12:19 +0100 Subject: [PATCH 02/10] overhaul keymaps --- keyboards/geistmaschine/macropod/info.json | 14 +++++++------- .../macropod/keymaps/default/keymap.c | 12 ++++++------ .../geistmaschine/macropod/keymaps/via/keymap.c | 17 ++++++----------- 3 files changed, 19 insertions(+), 24 deletions(-) diff --git a/keyboards/geistmaschine/macropod/info.json b/keyboards/geistmaschine/macropod/info.json index 6cf15fc0304c..c2a77905b192 100644 --- a/keyboards/geistmaschine/macropod/info.json +++ b/keyboards/geistmaschine/macropod/info.json @@ -11,13 +11,13 @@ "vid": "0x676D" }, "features": { - "bootmagic": true, - "command": false, - "console": true, - "extrakey": true, - "mousekey": true, - "nkro": false, - "encoder": true + "bootmagic": true, + "command": false, + "console": false, + "extrakey": true, + "mousekey": false, + "nkro": false, + "encoder": true }, "encoder": { "rotary": [ diff --git a/keyboards/geistmaschine/macropod/keymaps/default/keymap.c b/keyboards/geistmaschine/macropod/keymaps/default/keymap.c index dd7595f416dd..ce14c39d8b43 100644 --- a/keyboards/geistmaschine/macropod/keymaps/default/keymap.c +++ b/keyboards/geistmaschine/macropod/keymaps/default/keymap.c @@ -2,27 +2,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_fourkey ( - KC_MPLY, KC_A, KC_B, KC_C + LT(1, KC_MUTE), KC_MPRV, KC_MPLY, KC_MNXT ), [1] = LAYOUT_fourkey ( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [2] = LAYOUT_fourkey ( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [3] = LAYOUT_fourkey ( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [1] = { ENCODER_CCW_CW(KC_MRWD, KC_MFFD) }, [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, }; -#endif +#endif \ No newline at end of file diff --git a/keyboards/geistmaschine/macropod/keymaps/via/keymap.c b/keyboards/geistmaschine/macropod/keymaps/via/keymap.c index 7b1bf828e3c8..ce14c39d8b43 100644 --- a/keyboards/geistmaschine/macropod/keymaps/via/keymap.c +++ b/keyboards/geistmaschine/macropod/keymaps/via/keymap.c @@ -2,32 +2,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_fourkey ( - KC_MPLY, KC_A, KC_B, KC_C + LT(1, KC_MUTE), KC_MPRV, KC_MPLY, KC_MNXT ), [1] = LAYOUT_fourkey ( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [2] = LAYOUT_fourkey ( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [3] = LAYOUT_fourkey ( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ) }; #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, - [1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [1] = { ENCODER_CCW_CW(KC_MRWD, KC_MFFD) }, [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, }; -#endif - -void keyboard_post_init_user(void) { - // Customise these values to desired behaviour - debug_enable=true; -} \ No newline at end of file +#endif \ No newline at end of file From 7f6dff66bad6174b2bf6844704f1db6dfd99795b Mon Sep 17 00:00:00 2001 From: moritz plattner Date: Mon, 13 Mar 2023 14:18:45 +0100 Subject: [PATCH 03/10] fixed copyright info and some comments in matrix.c --- keyboards/geistmaschine/macropod/matrix.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/keyboards/geistmaschine/macropod/matrix.c b/keyboards/geistmaschine/macropod/matrix.c index 3279189d3274..60b1dafe6371 100644 --- a/keyboards/geistmaschine/macropod/matrix.c +++ b/keyboards/geistmaschine/macropod/matrix.c @@ -1,4 +1,4 @@ -/* Copyright 2022 +/* Copyright 2023 ebastler and elpekenin * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,7 +16,6 @@ #include "pca9555.h" #include "quantum.h" -#include "print.h" // PCA9555 i2c address, 0x20: A0 = 0, A1 = 0, A2 = 0 #define IC1 0x20 @@ -32,9 +31,8 @@ typedef enum { } expander_status_t; void pca9555_setup(void) { - // Initialize the expnader, then set all pins on Port 0 as inputs + // Initialize the expander, no need to set ports to inputs as that is the default behavior pca9555_init(IC1); - // pca9555_set_config(IC1, PCA9555_PORT0, ALL_INPUT); } void matrix_init_custom(void) { @@ -51,12 +49,12 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { uint8_t pin_states = 0xFF; - // Read the entire port into this byte, 1 = not pressed, 0 = pressed if (status != UNPLUGGED || timer_elapsed32(retry_timer) > RETRY_TIMESPAN) { // If the chip was unplugged before, it needs to be re-initialized if(status==UNPLUGGED) { pca9555_setup(); } + // Read the entire port into this byte, 1 = not pressed, 0 = pressed bool ret = pca9555_readPins(IC1, PCA9555_PORT0, &pin_states); // Update state From eb16681ca24fb86200042804f5e57d71c217260d Mon Sep 17 00:00:00 2001 From: moritz plattner Date: Mon, 13 Mar 2023 14:24:16 +0100 Subject: [PATCH 04/10] added license and fixed matrix size in config.h --- keyboards/geistmaschine/macropod/config.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/keyboards/geistmaschine/macropod/config.h b/keyboards/geistmaschine/macropod/config.h index dca14f51f382..f6dad6ebe034 100644 --- a/keyboards/geistmaschine/macropod/config.h +++ b/keyboards/geistmaschine/macropod/config.h @@ -1,5 +1,21 @@ +/* + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #pragma once -/* key matrix size */ -#define MATRIX_ROWS 12 -#define MATRIX_COLS 7 +/* key matrix size, only 1x4 are used in current state. + IO expander setup would allow up to 1x16 + 1 from the MCU */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 17 From 21a4a32b1f1c10b63d8bd899573314aa1d85853a Mon Sep 17 00:00:00 2001 From: Moritz Plattner Date: Mon, 13 Mar 2023 14:56:47 +0100 Subject: [PATCH 05/10] Apply suggestions from code review (remove empty layers) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Pablo Martínez <58857054+elpekenin@users.noreply.github.com> --- .../geistmaschine/macropod/keymaps/default/keymap.c | 9 --------- keyboards/geistmaschine/macropod/keymaps/via/keymap.c | 9 --------- 2 files changed, 18 deletions(-) diff --git a/keyboards/geistmaschine/macropod/keymaps/default/keymap.c b/keyboards/geistmaschine/macropod/keymaps/default/keymap.c index ce14c39d8b43..b54daa1545f2 100644 --- a/keyboards/geistmaschine/macropod/keymaps/default/keymap.c +++ b/keyboards/geistmaschine/macropod/keymaps/default/keymap.c @@ -9,20 +9,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [2] = LAYOUT_fourkey ( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - - [3] = LAYOUT_fourkey ( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ) }; #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, [1] = { ENCODER_CCW_CW(KC_MRWD, KC_MFFD) }, - [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, - [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, }; #endif \ No newline at end of file diff --git a/keyboards/geistmaschine/macropod/keymaps/via/keymap.c b/keyboards/geistmaschine/macropod/keymaps/via/keymap.c index ce14c39d8b43..b54daa1545f2 100644 --- a/keyboards/geistmaschine/macropod/keymaps/via/keymap.c +++ b/keyboards/geistmaschine/macropod/keymaps/via/keymap.c @@ -9,20 +9,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - [2] = LAYOUT_fourkey ( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ), - - [3] = LAYOUT_fourkey ( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS - ) }; #if defined(ENCODER_MAP_ENABLE) const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU) }, [1] = { ENCODER_CCW_CW(KC_MRWD, KC_MFFD) }, - [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, - [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, }; #endif \ No newline at end of file From b13f3519eb3adcecc29a192525398339bd6f3a43 Mon Sep 17 00:00:00 2001 From: Moritz Plattner Date: Mon, 13 Mar 2023 15:09:04 +0100 Subject: [PATCH 06/10] update readme.md to include picture --- keyboards/geistmaschine/macropod/readme.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/keyboards/geistmaschine/macropod/readme.md b/keyboards/geistmaschine/macropod/readme.md index 6f7e4ada46a3..c3939a1eb6d8 100644 --- a/keyboards/geistmaschine/macropod/readme.md +++ b/keyboards/geistmaschine/macropod/readme.md @@ -1,25 +1,25 @@ -# Ada +# Geistmaschine Macropod -![geist](imgur.com image replace me!) +![macropod](https://i.imgur.com/lG2G1sj.png) Macropod is a modular macropad, designed around a central big encoder with a magnetic connector for modularity. The default module uses three MX style keys. * Keyboard Maintainer: [ebastler](https://github.com/ebastler) -* Hardware Supported: Ada rev1 +* Hardware Supported: Macropod rev1 * Hardware Availability: [geistmaschine.io](https://geistmaschine.io/) Make example for this keyboard (after setting up your build environment): - make geistmaschine/macropod:default + qmk compile -kb geistmaschine/macropod -km default Flashing example for this keyboard: - make geistmaschine/macropod:default:flash + qmk flash -kb geistmaschine/macropod -km default 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 -Enter the bootloader in 3 ways: +Enter the bootloader in 2 ways: * **Bootmagic reset**: Hold down the key at (0,0) in the matrix (the knob on the main module) and plug in the keyboard * **Physical reset button**: Briefly tap the button marked "RST" on the back of the main module PCB From 10453d84f0f95898dc35b3a183f51bcb976f00ad Mon Sep 17 00:00:00 2001 From: Moritz Plattner Date: Mon, 13 Mar 2023 15:16:44 +0100 Subject: [PATCH 07/10] resized picture to a reasonable size --- keyboards/geistmaschine/macropod/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/geistmaschine/macropod/readme.md b/keyboards/geistmaschine/macropod/readme.md index c3939a1eb6d8..5d074437cbad 100644 --- a/keyboards/geistmaschine/macropod/readme.md +++ b/keyboards/geistmaschine/macropod/readme.md @@ -1,6 +1,6 @@ # Geistmaschine Macropod -![macropod](https://i.imgur.com/lG2G1sj.png) +![macropod](https://i.imgur.com/lAsCslA.png) Macropod is a modular macropad, designed around a central big encoder with a magnetic connector for modularity. The default module uses three MX style keys. * Keyboard Maintainer: [ebastler](https://github.com/ebastler) From 2239df65b01410300b31b8faca348899d2789992 Mon Sep 17 00:00:00 2001 From: moritz plattner Date: Mon, 13 Mar 2023 17:10:00 +0100 Subject: [PATCH 08/10] add missing license headers --- .../macropod/keymaps/default/keymap.c | 16 ++++++++++++++++ .../geistmaschine/macropod/keymaps/via/keymap.c | 16 ++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/keyboards/geistmaschine/macropod/keymaps/default/keymap.c b/keyboards/geistmaschine/macropod/keymaps/default/keymap.c index ce14c39d8b43..0ed4a7567f74 100644 --- a/keyboards/geistmaschine/macropod/keymaps/default/keymap.c +++ b/keyboards/geistmaschine/macropod/keymaps/default/keymap.c @@ -1,3 +1,19 @@ +/* Copyright 2023 Moritz Plattner + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/geistmaschine/macropod/keymaps/via/keymap.c b/keyboards/geistmaschine/macropod/keymaps/via/keymap.c index ce14c39d8b43..0ed4a7567f74 100644 --- a/keyboards/geistmaschine/macropod/keymaps/via/keymap.c +++ b/keyboards/geistmaschine/macropod/keymaps/via/keymap.c @@ -1,3 +1,19 @@ +/* Copyright 2023 Moritz Plattner + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { From be513377e929e5ffb51e0112c74a638ea072e632 Mon Sep 17 00:00:00 2001 From: Moritz Date: Sun, 19 Mar 2023 21:03:02 +0100 Subject: [PATCH 09/10] moved encoder map to keymap defines, add default encoder config --- .../macropod/keymaps/default/rules.mk | 1 + .../macropod/keymaps/via/rules.mk | 1 + keyboards/geistmaschine/macropod/macropod.c | 20 +++++++++++++++++++ keyboards/geistmaschine/macropod/rules.mk | 2 -- 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 keyboards/geistmaschine/macropod/keymaps/default/rules.mk create mode 100644 keyboards/geistmaschine/macropod/macropod.c diff --git a/keyboards/geistmaschine/macropod/keymaps/default/rules.mk b/keyboards/geistmaschine/macropod/keymaps/default/rules.mk new file mode 100644 index 000000000000..ee325681483f --- /dev/null +++ b/keyboards/geistmaschine/macropod/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes diff --git a/keyboards/geistmaschine/macropod/keymaps/via/rules.mk b/keyboards/geistmaschine/macropod/keymaps/via/rules.mk index 036bd6d1c3ec..6ccd6d91943d 100644 --- a/keyboards/geistmaschine/macropod/keymaps/via/rules.mk +++ b/keyboards/geistmaschine/macropod/keymaps/via/rules.mk @@ -1 +1,2 @@ +ENCODER_MAP_ENABLE = yes VIA_ENABLE = yes \ No newline at end of file diff --git a/keyboards/geistmaschine/macropod/macropod.c b/keyboards/geistmaschine/macropod/macropod.c new file mode 100644 index 000000000000..42b5bebab23d --- /dev/null +++ b/keyboards/geistmaschine/macropod/macropod.c @@ -0,0 +1,20 @@ +// Copyright 2022 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#include "quantum.h" + +// This will be overridden by encoder map in all default keymaps, but serves as a catch-all for user keymaps that may omit the map. +#if defined (ENCODER_ENABLE) && !defined (ENCODER_MAP_ENABLE) +bool encoder_update_kb(uint8_t index, bool clockwise) { + if (!encoder_update_user(index, clockwise)) { + return false; /* Don't process further events if user function exists and returns false */ + } + if (index == 0) { /* First encoder */ + if (clockwise) { + tap_code_delay(KC_VOLU, 10); + } else { + tap_code_delay(KC_VOLD, 10); + } + return true; +} +#endif \ No newline at end of file diff --git a/keyboards/geistmaschine/macropod/rules.mk b/keyboards/geistmaschine/macropod/rules.mk index 2b560feb7c6f..cf2b38601e67 100644 --- a/keyboards/geistmaschine/macropod/rules.mk +++ b/keyboards/geistmaschine/macropod/rules.mk @@ -1,5 +1,3 @@ -ENCODER_MAP_ENABLE = yes - CUSTOM_MATRIX = lite VPATH += drivers/gpio From 7901c83a106369c44832b0f76cc1f2f78e12e0b3 Mon Sep 17 00:00:00 2001 From: Moritz Date: Mon, 20 Mar 2023 11:57:46 +0100 Subject: [PATCH 10/10] add missing bracket in encoder callback --- keyboards/geistmaschine/macropod/macropod.c | 1 + 1 file changed, 1 insertion(+) diff --git a/keyboards/geistmaschine/macropod/macropod.c b/keyboards/geistmaschine/macropod/macropod.c index 42b5bebab23d..2f6825e2ee13 100644 --- a/keyboards/geistmaschine/macropod/macropod.c +++ b/keyboards/geistmaschine/macropod/macropod.c @@ -15,6 +15,7 @@ bool encoder_update_kb(uint8_t index, bool clockwise) { } else { tap_code_delay(KC_VOLD, 10); } + } return true; } #endif \ No newline at end of file