From e1630edef4c59568cf2057717aa7fcd4a6f286ae Mon Sep 17 00:00:00 2001 From: vinhcatba Date: Mon, 9 Oct 2023 13:35:51 +0700 Subject: [Keyboard] vinhcatba/uncertainty (#21142) * vinh: test fw for uncertainty (deprecated) * v0.1: update base firmware with 2 layers, use bongo cat animation for oled * v0.1: change directory * v0.1: cleanup * v0.2: update layers * v0.3: add VIA support * v0.3: add VIA support (continue) * vinh: test fw for uncertainty (deprecated) * v0.1: update base firmware with 2 layers, use bongo cat animation for oled * v0.1: change directory * v0.1: cleanup * v0.2: update layers * v0.3: add VIA support * v0.3: add VIA support (continue) * v0.3: change keyboard name, remove eeprom config save in VIA keymap * cleanup for PR * update readme * vinh: test fw for uncertainty (deprecated) * v0.1: update base firmware with 2 layers, use bongo cat animation for oled * v0.1: change directory * v0.1: cleanup * v0.2: update layers * v0.3: add VIA support * v0.3: add VIA support (continue) * vinh: test fw for uncertainty (deprecated) * v0.1: update base firmware with 2 layers, use bongo cat animation for oled * v0.1: change directory * v0.1: cleanup * v0.3: change keyboard name, remove eeprom config save in VIA keymap * cleanup for PR * update readme * add license to header files, update ws2812 driver and DI_PIN to info.json * resovle PR suggestion for config.h, halconf.h, mcuconf.h * update info.json regarding PR comment * update bongo.h regarding PR comment * add oled mode toggle * update readme.md, rules.mk regarding PR comment * add submodule update * move oled handle to keyboard level * Update keyboards/vinhcatba/uncertainty/uncertainty.c forgot user-level proces_record * now using bongo as source file * Apply suggestions from code review remove default value codes * move WPM_ENABLE and ENCODER_MAP_ENABLE to keymap level * Apply suggestions from code review * Apply suggestions from code review * Update keyboards/vinhcatba/uncertainty/config.h --- keyboards/vinhcatba/uncertainty/uncertainty.c | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 keyboards/vinhcatba/uncertainty/uncertainty.c (limited to 'keyboards/vinhcatba/uncertainty/uncertainty.c') diff --git a/keyboards/vinhcatba/uncertainty/uncertainty.c b/keyboards/vinhcatba/uncertainty/uncertainty.c new file mode 100644 index 0000000000..19e5a5cfd5 --- /dev/null +++ b/keyboards/vinhcatba/uncertainty/uncertainty.c @@ -0,0 +1,32 @@ +// Copyright 2023 Vinh Le (@vinhcatba) +// SPDX-License-Identifier: GPL-2.0-or-later + +#include QMK_KEYBOARD_H +#include "quantum.h" + +#ifdef OLED_ENABLE +#include "bongo.h" +// Used to draw on to the oled screen +bool oled_minimal = true; +bool oled_task_kb(void) { + if(!oled_task_user()) { return false; } + draw_bongo(oled_minimal); + return false; +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + if (!process_record_user(keycode, record)) { + return false; + } + + switch (keycode) { + case OLED_TOG: + if (record->event.pressed) { + oled_minimal = !oled_minimal; + } + return false; + default: + return true; + } +} +#endif // endif OLED_ENABLE -- cgit v1.2.3