From c4551d7ef1ed2c1069f23cc8499b7c7fc30f3ecf Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Wed, 29 Dec 2021 20:17:34 -0800 Subject: [Keymap] Reorganization, cleanup and readmes for drashna code (#15617) --- users/drashna/oled/drashna_font.h | 4 ++-- users/drashna/oled/oled_stuff.c | 9 +-------- users/drashna/oled/readme.md | 42 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 10 deletions(-) create mode 100644 users/drashna/oled/readme.md (limited to 'users/drashna/oled') diff --git a/users/drashna/oled/drashna_font.h b/users/drashna/oled/drashna_font.h index 844292a53a..7ba03c4c13 100644 --- a/users/drashna/oled/drashna_font.h +++ b/users/drashna/oled/drashna_font.h @@ -3,8 +3,8 @@ // additional fonts from // https://github.com/datacute/TinyOLED-Fonts -#if __has_include("../../../../Documents/qmk/oled_font.h") -# include "../../../../Documents/qmk/oled_font.h" +#if __has_include("oled_font.h") +# include "oled_font.h" #else // additional fonts from diff --git a/users/drashna/oled/oled_stuff.c b/users/drashna/oled/oled_stuff.c index 9ee2cbfed8..de84766725 100644 --- a/users/drashna/oled/oled_stuff.c +++ b/users/drashna/oled/oled_stuff.c @@ -162,15 +162,8 @@ void render_keylock_status(uint8_t led_usb_state) { void render_matrix_scan_rate(void) { #ifdef DEBUG_MATRIX_SCAN_RATE - char matrix_rate[5]; - uint16_t n = get_matrix_scan_rate(); - matrix_rate[4] = '\0'; - matrix_rate[3] = '0' + n % 10; - matrix_rate[2] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' '; - matrix_rate[1] = n / 10 ? '0' + n / 10 : ' '; - matrix_rate[0] = ' '; oled_write_P(PSTR("MS:"), false); - oled_write(matrix_rate, false); + oled_write(get_u16_str(get_matrix_scan_rate(), ' '), false); #endif } diff --git a/users/drashna/oled/readme.md b/users/drashna/oled/readme.md new file mode 100644 index 0000000000..dbb8187d49 --- /dev/null +++ b/users/drashna/oled/readme.md @@ -0,0 +1,42 @@ +# OLED Display + +To disable the pre genrated oled display, add `CUSTOM_OLED_DRIVER = no` to your `rules.mk`. + + +## OLED Font + +My font file has multiple fonts and multiple logs integrated into the one file. And it uses the full 255 possible characters. + +In addition to the default font and logos: + +```c +# define OLED_FONT_5X5 +# define OLED_FONT_AZTECH +# define OLED_FONT_BMPLAIN +# define OLED_FONT_CRACKERS +# define OLED_FONT_EIN +# define OLED_FONT_HISKYF21 +# define OLED_FONT_SQUASH +# define OLED_FONT_SUPER_DIGG +# define OLED_FONT_ZXPIX +``` + +```c +# define OLED_LOGO_CORNE +# define OLED_LOGO_GMK_BAD +# define OLED_LOGO_GOTHAM +# define OLED_LOGO_HUE_MANITEE +# define OLED_LOGO_LOOSE +# define OLED_LOGO_SETS3N +# define OLED_LOGO_SKEEB +``` + +Additionally, the font file allows for external oled font files, instead. This allows for additional files that cannot be hosted in the QMK Repo. + +## Display + +A picture is worth a thousand words. So here are two: + +![Right](https://i.imgur.com/4XFOVKBl.jpg) + +![Left](https://i.imgur.com/W5RX4pAl.jpg) -- cgit v1.2.3