Git Product home page Git Product logo

qmk_firmware's People

Contributors

drashna avatar erovia avatar ezuk avatar fauxpark avatar filterpaper avatar fredizzimo avatar ibnobody avatar jackhumbert avatar karlk90 avatar mechmerlin avatar moyi4681 avatar mtei avatar nooges avatar noroadsleft avatar peepeetee avatar priyadi avatar qmk-bot avatar shelaf avatar skullydazed avatar tmk avatar tzarc avatar umi-umi avatar vomindoraan avatar waffle87 avatar xelus22 avatar xscorpion2 avatar xyverz avatar yashikno avatar yiancar avatar zvecr avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

takyshu98

qmk_firmware's Issues

[Bug] fastmatrix press QE to output QWE

Describe the Bug

HI, meti, thank you for open source fastmatrix.
I used fastmatrix on a keyboard I designed and it worked fine for the most part. But I found that if I hold down A and D at the same time, the keyboard will output ASD, hold down QE will output QWE, and hold down ZC will output ZXC. I tried this problem on other keyboards, but the key that triggered this problem was different, such as pressing YI to output YUI. These tested keyboards worked fine with the original QMK firmware

Keyboard Used

No response

Link to product page (if applicable)

No response

Operating System

No response

qmk doctor Output

No response

Is AutoHotKey / Karabiner installed

  • AutoHotKey (Windows)
  • Karabiner (macOS)

Other keyboard-related software installed

No response

Additional Context

No response

Make quantum/split_common/serial.h configurable.

THIS IS DRAFT for English checking

(私は英語は苦手なので、日本語で書いて、google で翻訳します。)
( I am not good at English, so write in Japanese and translate it with google.)

私は、quantum/split_common/serial.h から ポートの定義を分離する事を提案します。
I propose separating the port definitions from quantum/split_common/serial.h .

多くのキーボードは、PD0 を使っていますが、いくつかのキーボードは PD2 を使っています。
Many keyboards use PD0, but some keyboards use PD2.

従って、ポートの定義は、quantum/split_common/serial.h から削除して、新しく用意する serial_config.h に記述する方が良いと思う。
Therefore, I think that it is better to delete the port definitions from quantum/split_common/serial.h and write it in serial_config.h which is newly prepared.
( keyboards/A_KEYBOARD/config.h needs #include <serial_config.h> )

PD0 を使う場合の serial_confg.h のサンプル
Sample serial_confg.h when using PD0.

#ifndef SOFT_SERIAL_CONFIG_H
#define SOFT_SERIAL_CONFIG_H

/* Soft Serial defines */
#define SERIAL_PIN_DDR DDRD
#define SERIAL_PIN_PORT PORTD
#define SERIAL_PIN_INPUT PIND
#define SERIAL_PIN_MASK _BV(PD0)
#define SERIAL_PIN_INTERRUPT INT0_vect

#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
#define SERIAL_MASTER_BUFFER_LENGTH 1

#endif /* SOFT_SERIAL_CONFIG_H */

PD2 を使う場合の serial_confg.h のサンプル
Sample serial_confg.h when using PD2.

#ifndef SOFT_SERIAL_CONFIG_H
#define SOFT_SERIAL_CONFIG_H

/* Soft Serial defines */
#define SERIAL_PIN_DDR DDRD
#define SERIAL_PIN_PORT PORTD
#define SERIAL_PIN_INPUT PIND
#define SERIAL_PIN_MASK _BV(PD2)
#define SERIAL_PIN_INTERRUPT INT2_vect

#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
#define SERIAL_MASTER_BUFFER_LENGTH 1

#endif /* SOFT_SERIAL_CONFIG_H */

quantum/split_common/serial.cvoid serial_slave_init(void) を以下のように変更する。
Change void serial_slave_init (void) of quantum/split_common/serial.c as follows.

void serial_slave_init(void) {
    serial_input_with_pullup();

#if SERIAL_PIN_MASK == _BV(PD0)
    // Enable INT0
    EIMSK |= _BV(INT0);
    // Trigger on falling edge of INT0
    EICRA &= ~(_BV(ISC00) | _BV(ISC01));
#elif SERIAL_PIN_MASK == _BV(PD2)
    // Enable INT2
    EIMSK |= _BV(INT2);
    // Trigger on falling edge of INT2
    EICRA &= ~(_BV(ISC20) | _BV(ISC21));
#else
 #error unknown SERIAL_PIN_MASK value
#endif
}

keymap 毎の glcdfont.c について

https://twitter.com/pluis9/status/978866831397195776 を検討して見ました。

qmk_firmware/keyboards/helix/ssd1306.c の中で
#include "common/glcdfont.c"
を行っています。

gcc 起動時のオプションで、include関係は以下のようになっています。

-I keyboards/helix/rev2/keymaps/キーマップ名 \
-I keyboards/helix \
-I keyboards/helix/rev2 \
.... \
-include keyboards/helix/config.h \
-include keyboards/helix/rev2/config.h \
-include keyboards/helix/rev2/keymaps/five_rows/config.h \

ssd1306.c の中で
#include <common/glcdfont.c> を行っていた場合、インクルード検索パス指定の順に従って
keyboards/helix/rev2/keymaps/キーマップ名/common/glcdfont.c を最初に探します。

しかし、#include "common/glcdfont.c" の場合、インクルード検索パス指定を試す以前に
まずインクルード元のソースのあるディレクトリを試します。
なので、常に、qmk_firmware/keyboards/helix/common/glcdfont.c を最初に
調べてしまい、切り替え不可能です。

したがって、一番簡単には、

  1. ssd1306.c を #include <common/glcdfont.c> に変更。
  2. カスタマイズしたいキーマップでは、qmk_firmware/keyboards/helix/rev2/keymaps/キーマップ名/common/glcdfont.c を置く。

となります。(実験済み)

しかし、keymaps/キーマップ名/common/ を作るのはなんだかちょっと気持ち悪いです。
なので、もう一つの案

  1. helix/common/glcdfont.c を移動し改名 helix/glcdfont.h
  2. ssd1306.c を #include <glcdfont.h> に変更。
  3. カスタマイズしたいキーマップでは、qmk_firmware/keyboards/helix/rev2/keymaps/キーマップ名/glcdfont.h を置く。

となります。

上のどちらかを行えば、keymap 毎の glcdfont.c は達成できそうです。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.