From 5bd68e3695a82ff504c358c33445b4530c2a327f Mon Sep 17 00:00:00 2001 From: Ryan Date: Wed, 12 Apr 2023 13:42:51 +1000 Subject: Move single `LAYOUT`s to data driven (#20365) --- keyboards/takashicompany/dogtag/dogtag.c | 2 +- keyboards/takashicompany/dogtag/dogtag.h | 40 ----------- keyboards/takashicompany/dogtag/info.json | 115 +++++++----------------------- 3 files changed, 28 insertions(+), 129 deletions(-) delete mode 100644 keyboards/takashicompany/dogtag/dogtag.h (limited to 'keyboards/takashicompany/dogtag') diff --git a/keyboards/takashicompany/dogtag/dogtag.c b/keyboards/takashicompany/dogtag/dogtag.c index e5d0779c08..0ca5f7c3e8 100644 --- a/keyboards/takashicompany/dogtag/dogtag.c +++ b/keyboards/takashicompany/dogtag/dogtag.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "dogtag.h" +#include "quantum.h" bool encoder_update_kb(uint8_t index, bool clockwise) { keypos_t key; diff --git a/keyboards/takashicompany/dogtag/dogtag.h b/keyboards/takashicompany/dogtag/dogtag.h deleted file mode 100644 index fb5ae151ea..0000000000 --- a/keyboards/takashicompany/dogtag/dogtag.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright 2021 takashicompany - * - * 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 - -#include "quantum.h" - -/* This is a shortcut to help you visually see your layout. - * - * The first section contains all of the arguments representing the physical - * layout of the board and position of the keys. - * - * The second converts the arguments into a two-dimensional array which - * represents the switch matrix. - */ -#define LAYOUT( \ - l01, l02, l03, l04, r01, r02, r03, r04, \ - l05, l06, l07, l08, l09, r05, r06, r07, r08, r09, \ - l10, l11, r10, r11 \ -) { \ - { l01, l02, l03, l04, KC_NO }, \ - { l05, l06, l07, l08, l09 }, \ - { l10, l11, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, r01, r02, r03, r04}, \ - { r05, r06, r07, r08, r09 }, \ - { r10, r11, KC_NO, KC_NO, KC_NO } \ -} diff --git a/keyboards/takashicompany/dogtag/info.json b/keyboards/takashicompany/dogtag/info.json index 2a91bd48f0..8c572ad32f 100644 --- a/keyboards/takashicompany/dogtag/info.json +++ b/keyboards/takashicompany/dogtag/info.json @@ -35,94 +35,33 @@ "layouts": { "LAYOUT": { "layout": [ - { - "x": 0, - "y": 0 - }, - { - "x": 1, - "y": 0 - }, - { - "x": 2, - "y": 0 - }, - { - "x": 3, - "y": 0 - }, - { - "x": 8, - "y": 0 - }, - { - "x": 9, - "y": 0 - }, - { - "x": 10, - "y": 0 - }, - { - "x": 11, - "y": 0 - }, - { - "x": 0, - "y": 1 - }, - { - "x": 1, - "y": 1 - }, - { - "x": 2, - "y": 1 - }, - { - "x": 3, - "y": 1 - }, - { - "x": 4, - "y": 2 - }, - { - "x": 7, - "y": 2 - }, - { - "x": 8, - "y": 1 - }, - { - "x": 9, - "y": 1 - }, - { - "x": 10, - "y": 1 - }, - { - "x": 11, - "y": 1 - }, - { - "x": 3.5, - "y": 3.25 - }, - { - "x": 4.5, - "y": 3.25 - }, - { - "x": 6.5, - "y": 3.25 - }, - { - "x": 7.5, - "y": 3.25 - } + {"matrix": [0, 0], "x": 0, "y": 0}, + {"matrix": [0, 1], "x": 1, "y": 0}, + {"matrix": [0, 2], "x": 2, "y": 0}, + {"matrix": [0, 3], "x": 3, "y": 0}, + + {"matrix": [3, 1], "x": 8, "y": 0}, + {"matrix": [3, 2], "x": 9, "y": 0}, + {"matrix": [3, 3], "x": 10, "y": 0}, + {"matrix": [3, 4], "x": 11, "y": 0}, + + {"matrix": [1, 0], "x": 0, "y": 1}, + {"matrix": [1, 1], "x": 1, "y": 1}, + {"matrix": [1, 2], "x": 2, "y": 1}, + {"matrix": [1, 3], "x": 3, "y": 1}, + {"matrix": [1, 4], "x": 4, "y": 2}, + + {"matrix": [4, 0], "x": 7, "y": 2}, + {"matrix": [4, 1], "x": 8, "y": 1}, + {"matrix": [4, 2], "x": 9, "y": 1}, + {"matrix": [4, 3], "x": 10, "y": 1}, + {"matrix": [4, 4], "x": 11, "y": 1}, + + {"matrix": [2, 0], "x": 3.5, "y": 3.25}, + {"matrix": [2, 1], "x": 4.5, "y": 3.25}, + + {"matrix": [5, 0], "x": 6.5, "y": 3.25}, + {"matrix": [5, 1], "x": 7.5, "y": 3.25} ] } } -- cgit v1.2.3