Remove deprecated callbacks for encoders and dip switches (#13404)
This commit is contained in:
parent
73d4d7dc2b
commit
b8a1e14f53
@ -51,15 +51,18 @@ ENCODER_ENABLE = yes
|
||||
コールバック関数を `<keyboard>.c` に記述することができます:
|
||||
|
||||
```c
|
||||
void encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
encoder_update_user(index, clockwise);
|
||||
bool encoder_update_kb(uint8_t index, bool clockwise) {
|
||||
if (!encoder_update_user(index, clockwise)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
あるいは `keymap.c` に記述することもできます:
|
||||
|
||||
```c
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) { /* First encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_PGDN);
|
||||
@ -73,6 +76,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
tap_code(KC_UP);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -16,6 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
// ESC F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 Del Rotary(Mute)
|
||||
@ -24,8 +25,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Caps A S D F G H J K L ; " Enter PgDn
|
||||
// Sh_L Z X C V B N M , . ? Sh_R Up End
|
||||
// Ct_L Win_L Alt_L SPACE Alt_R FN Ct_R Left Down Right
|
||||
|
||||
|
||||
[0] = LAYOUT(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_MUTE,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
|
||||
@ -61,14 +60,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define encoder_update(clockwise) encoder_update_user(uint8_t index, clockwise)
|
||||
|
||||
// The first section contains all of the arguments
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
#define LAYOUT( \
|
||||
|
@ -82,7 +82,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
};
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
|
@ -15,15 +15,13 @@
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
|
||||
|
||||
// #define LED_MERGE_NUMPAD_LEFT_HANDED_PLUS TRUE
|
||||
// #define LED_MERGE_NUMPAD_LEFT_HANDED_ENTER TRUE
|
||||
// #define LED_MERGE_NUMPAD_LEFT_HANDED_ZERO TRUE
|
||||
|
||||
|
||||
#define MO_NLCK LT(1, KC_NLCK) // Numlock on tap, layer change on hold
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_left_handed(
|
||||
KC_MUTE, KC_MPLY,
|
||||
@ -42,8 +40,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______
|
||||
)
|
||||
};
|
||||
// clang-format of
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) { /* Left Encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
@ -57,5 +56,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
tap_code(KC_MPRV);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -15,15 +15,13 @@
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
|
||||
|
||||
// #define LED_MERGE_NUMPAD_RIGHT_HANDED_PLUS TRUE
|
||||
// #define LED_MERGE_NUMPAD_RIGHT_HANDED_ENTER TRUE
|
||||
// #define LED_MERGE_NUMPAD_RIGHT_HANDED_ZERO TRUE
|
||||
|
||||
|
||||
#define MO_NLCK LT(1, KC_NLCK) // Numlock on tap, layer change on hold
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
//NOT TESTED, WAITING ENDORSEMENT FROM MANUFACTURER
|
||||
@ -44,11 +42,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______
|
||||
)
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
||||
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) { /* Left Encoder */
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
@ -62,5 +58,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
tap_code(KC_MPRV);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_ortho_4x4(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4,
|
||||
@ -36,6 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, TO(0)
|
||||
),
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
switch (get_highest_layer(state)) {
|
||||
@ -55,7 +56,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return state;
|
||||
}
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
/* With an if statement we can check which encoder was turned. */
|
||||
if (index == 0) { /* First encoder */
|
||||
/* And with another if statement we can check the direction. */
|
||||
@ -70,4 +71,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
tap_code(KC_AUDIO_VOL_DOWN);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_ortho_4x4(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4,
|
||||
@ -36,6 +36,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, TO(0)
|
||||
),
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
switch (get_highest_layer(state)) {
|
||||
case 0:
|
||||
@ -54,7 +56,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return state;
|
||||
}
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
/* With an if statement we can check which encoder was turned. */
|
||||
if (index == 0) { /* First encoder */
|
||||
/* And with another if statement we can check the direction. */
|
||||
@ -69,4 +71,5 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
tap_code(KC_AUDIO_VOL_DOWN);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -19,15 +19,13 @@
|
||||
# include "oled_display.h"
|
||||
#endif
|
||||
|
||||
enum layer_names {
|
||||
_MA,
|
||||
_FN
|
||||
};
|
||||
enum layer_names { _MA, _FN };
|
||||
|
||||
enum custom_keycodes {
|
||||
KC_CUST = SAFE_RANGE,
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_MA] = LAYOUT_ansi(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_HOME,
|
||||
@ -44,6 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
@ -80,7 +79,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
|
@ -71,7 +71,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
// Encoder click function
|
||||
void dip_switch_update_user(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
/* First encoder */
|
||||
case 0:
|
||||
@ -80,4 +80,5 @@ void dip_switch_update_user(uint8_t index, bool active) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
// Encoder click function
|
||||
void dip_switch_update_user(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
/* First encoder */
|
||||
case 0:
|
||||
@ -94,4 +94,5 @@ void dip_switch_update_user(uint8_t index, bool active) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
@ -221,7 +221,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
|
@ -144,7 +144,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
|
@ -139,7 +139,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
|
@ -263,7 +263,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
|
@ -256,7 +256,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
|
@ -187,7 +187,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
|
@ -265,7 +265,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@ -291,7 +291,7 @@ bool encoder_update(bool clockwise) {
|
||||
}
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
|
@ -137,7 +137,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RIGHT)) {
|
||||
if (clockwise) {
|
||||
|
@ -279,7 +279,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
|
@ -89,7 +89,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
|
@ -259,7 +259,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
void encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@ -289,6 +289,7 @@ void encoder_update(bool clockwise) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
|
@ -190,7 +190,7 @@ uint16_t muse_tempo = 20;
|
||||
|
||||
extern float clicky_rand;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (is_clicky_on()) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@ -241,7 +241,7 @@ bool encoder_update(bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -273,6 +273,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
clicky_off();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
@ -266,7 +266,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update_user(uint16_t index, bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
|
@ -317,7 +317,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@ -350,7 +350,7 @@ bool encoder_update(bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
|
@ -256,7 +256,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@ -293,7 +293,7 @@ bool encoder_update(bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -318,6 +318,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
@ -128,7 +128,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@ -155,7 +155,7 @@ bool encoder_update(bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -180,6 +180,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
@ -177,8 +177,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise)
|
||||
{
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode)
|
||||
{
|
||||
if (IS_LAYER_ON(_RAISE))
|
||||
@ -230,8 +229,7 @@ bool encoder_update(bool clockwise)
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active)
|
||||
{
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
switch (index)
|
||||
{
|
||||
case 0:
|
||||
@ -263,6 +261,7 @@ void dip_update(uint8_t index, bool active)
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void)
|
||||
|
@ -170,7 +170,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
|
@ -109,7 +109,7 @@ layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (clockwise && !IS_LAYER_ON(_RAISE)) {
|
||||
tap_code(KC_MS_WH_DOWN);
|
||||
} else if (!clockwise && !IS_LAYER_ON(_RAISE)) {
|
||||
|
@ -319,7 +319,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
|
@ -157,7 +157,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@ -184,7 +184,7 @@ bool encoder_update(bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -209,6 +209,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
@ -132,7 +132,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ALTGR] = LAYOUT_planck_grid(k
|
||||
[_ALTGR] = LAYOUT_planck_grid(
|
||||
_______, SI_BSLS, SI_PIPE, SI_EURO, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, SI_LBRC, SI_RBRC, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, SI_AT, SI_LCBR, SI_RCBR, _______, SI_LABK, SI_RABK, _______, _______,
|
||||
@ -178,7 +178,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@ -205,7 +205,7 @@ bool encoder_update(bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -230,6 +230,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
@ -232,7 +232,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@ -269,7 +269,7 @@ bool encoder_update(bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -294,6 +294,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
@ -223,7 +223,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@ -250,7 +250,7 @@ bool encoder_update(bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -275,6 +275,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
@ -154,7 +154,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
|
@ -162,7 +162,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
|
@ -264,7 +264,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@ -291,7 +291,7 @@ bool encoder_update(bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -316,6 +316,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
@ -297,7 +297,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@ -322,7 +322,7 @@ bool encoder_update(bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -347,6 +347,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
@ -247,7 +247,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (clockwise) {
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
register_code(KC_MS_WH_DOWN);
|
||||
|
@ -308,7 +308,7 @@ uint16_t dac_value_generate(void) {
|
||||
return value;
|
||||
}
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (clockwise) {
|
||||
dac_morph = (dac_morph + 1) % AUDIO_DAC_WAVETABLE_CUSTOM_LENGTH;
|
||||
} else {
|
||||
|
@ -139,7 +139,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@ -172,7 +172,7 @@ bool encoder_update(bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -197,6 +197,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
@ -215,7 +215,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
|
@ -267,7 +267,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@ -294,7 +294,7 @@ bool encoder_update(bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -319,6 +319,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
@ -149,7 +149,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -159,4 +159,5 @@ void dip_update(uint8_t index, bool active) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -3,8 +3,6 @@
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define encoder_update(clockwise) encoder_update_user(uint8_t index, clockwise)
|
||||
|
||||
#if defined(KEYBOARD_planck_ez)
|
||||
#include "ez.h"
|
||||
#elif defined(KEYBOARD_planck_light)
|
||||
|
@ -40,31 +40,4 @@ led_config_t g_led_config = { {
|
||||
// 0
|
||||
// 7 8 1 2
|
||||
|
||||
void suspend_power_down_kb(void) {
|
||||
rgb_matrix_set_suspend_state(true);
|
||||
suspend_power_down_user();
|
||||
}
|
||||
|
||||
void suspend_wakeup_init_kb(void) {
|
||||
rgb_matrix_set_suspend_state(false);
|
||||
suspend_wakeup_init_user();
|
||||
}
|
||||
#endif
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
#ifdef DIP_SWITCH_ENABLE
|
||||
__attribute__((weak))
|
||||
bool dip_update(uint8_t index, bool active) { return true; }
|
||||
|
||||
__attribute__((weak))
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
return dip_update(index, active);
|
||||
}
|
||||
#endif
|
||||
|
@ -175,7 +175,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -191,6 +191,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
muse_mode = false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
@ -202,7 +202,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -221,6 +221,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
@ -242,7 +242,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -261,6 +261,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
@ -197,7 +197,7 @@ uint16_t muse_counter = 0;
|
||||
uint8_t muse_offset = 70;
|
||||
uint16_t muse_tempo = 50;
|
||||
|
||||
bool encoder_update(bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (muse_mode) {
|
||||
if (IS_LAYER_ON(_RAISE)) {
|
||||
if (clockwise) {
|
||||
@ -224,7 +224,7 @@ bool encoder_update(bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -243,6 +243,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
@ -101,7 +101,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -120,6 +120,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
@ -43,23 +43,6 @@ led_config_t g_led_config = { {
|
||||
// 7 8 1 2
|
||||
#endif
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
#ifdef DIP_SWITCH_ENABLE
|
||||
__attribute__((weak))
|
||||
bool dip_update(uint8_t index, bool active) { return true;}
|
||||
|
||||
__attribute__((weak))
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
return dip_update(index, active);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SWAP_HANDS_ENABLE
|
||||
__attribute__ ((weak))
|
||||
|
@ -25,6 +25,7 @@ enum sofle_layers {
|
||||
_ADJUST,
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
enum custom_keycodes {
|
||||
KC_QWERTY = SAFE_RANGE,
|
||||
KC_GAMING,
|
||||
@ -40,7 +41,6 @@ enum custom_keycodes {
|
||||
KC_LAYER
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
* QWERTY
|
||||
@ -155,39 +155,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
#ifdef OLED_DRIVER_ENABLE
|
||||
|
||||
/* 32 * 32 logo */
|
||||
static void render_logo(void) {
|
||||
static const char PROGMEM hell_logo[] = {
|
||||
0x00, 0x80, 0xc0, 0xc0, 0x60, 0x60, 0x30, 0x30, 0x18, 0x1c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||
0xe0, 0x78, 0x1e, 0x06, 0x00, 0x0c, 0x1c, 0x18, 0x30, 0x30, 0x60, 0x60, 0xc0, 0xc0, 0x80, 0x00,
|
||||
0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x18, 0x18, 0x30, 0x70, 0x60, 0x00, 0xc0, 0xf0, 0x3c, 0x0f,
|
||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x60, 0x70, 0x30, 0x18, 0x18, 0x0c, 0x0c, 0x06, 0x07, 0x03, 0x01,
|
||||
0x00, 0xf8, 0xf8, 0x80, 0x80, 0x80, 0xf8, 0xf8, 0x00, 0x80, 0xc0, 0xc0, 0x40, 0xc0, 0xc0, 0x80,
|
||||
0x00, 0xf8, 0xf8, 0x00, 0xf8, 0xf8, 0x00, 0x08, 0x38, 0x08, 0x00, 0x38, 0x08, 0x30, 0x08, 0x38,
|
||||
0x00, 0x1f, 0x1f, 0x01, 0x01, 0x01, 0x1f, 0x1f, 0x00, 0x0f, 0x1f, 0x1a, 0x12, 0x1a, 0x1b, 0x0b,
|
||||
0x00, 0x1f, 0x1f, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
static const char PROGMEM hell_logo[] = {0x00, 0x80, 0xc0, 0xc0, 0x60, 0x60, 0x30, 0x30, 0x18, 0x1c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x80, 0xe0, 0x78, 0x1e, 0x06, 0x00, 0x0c, 0x1c, 0x18, 0x30, 0x30, 0x60, 0x60, 0xc0, 0xc0, 0x80, 0x00, 0x01, 0x03, 0x07, 0x06, 0x0c, 0x0c, 0x18, 0x18, 0x30, 0x70, 0x60, 0x00, 0xc0, 0xf0, 0x3c, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x60, 0x70, 0x30, 0x18, 0x18, 0x0c, 0x0c, 0x06, 0x07, 0x03, 0x01, 0x00, 0xf8, 0xf8, 0x80, 0x80, 0x80, 0xf8, 0xf8, 0x00, 0x80, 0xc0, 0xc0, 0x40, 0xc0, 0xc0, 0x80, 0x00, 0xf8, 0xf8, 0x00, 0xf8, 0xf8, 0x00, 0x08, 0x38, 0x08, 0x00, 0x38, 0x08, 0x30, 0x08, 0x38, 0x00, 0x1f, 0x1f, 0x01, 0x01, 0x01, 0x1f, 0x1f, 0x00, 0x0f, 0x1f, 0x1a, 0x12, 0x1a, 0x1b, 0x0b, 0x00, 0x1f, 0x1f, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
oled_write_raw_P(hell_logo, sizeof(hell_logo));
|
||||
}
|
||||
|
||||
/* 32 * 14 os logos */
|
||||
static const char PROGMEM windows_logo[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0xbc, 0xbe, 0xbe, 0x00,
|
||||
0xbe, 0xbe, 0xbf, 0xbf, 0xbf, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x0f, 0x0f, 0x00,
|
||||
0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
static const char PROGMEM windows_logo[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbc, 0xbc, 0xbe, 0xbe, 0x00, 0xbe, 0xbe, 0xbf, 0xbf, 0xbf, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x0f, 0x0f, 0x00, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
static const char PROGMEM mac_logo[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xf8, 0xf8,
|
||||
0xf0, 0xf6, 0xfb, 0xfb, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0f, 0x1f, 0x1f,
|
||||
0x0f, 0x0f, 0x1f, 0x1f, 0x0f, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
static const char PROGMEM mac_logo[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xf0, 0xf8, 0xf8, 0xf8, 0xf0, 0xf6, 0xfb, 0xfb, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07, 0x0f, 0x1f, 0x1f, 0x0f, 0x0f, 0x1f, 0x1f, 0x0f, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||
|
||||
/* Smart Backspace Delete */
|
||||
|
||||
@ -221,128 +203,63 @@ bool showedJump = true;
|
||||
|
||||
/* logic */
|
||||
static void render_luna(int LUNA_X, int LUNA_Y) {
|
||||
|
||||
/* Sit */
|
||||
static const char PROGMEM sit[2][ANIM_SIZE] = {
|
||||
/* 'sit1', 32x22px */
|
||||
static const char PROGMEM sit[2][ANIM_SIZE] = {/* 'sit1', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c,
|
||||
0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x68, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28,
|
||||
0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x68, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
},
|
||||
|
||||
/* 'sit2', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c,
|
||||
0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x90, 0x08, 0x18, 0x60, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28,
|
||||
0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
}
|
||||
};
|
||||
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1c, 0x02, 0x05, 0x02, 0x24, 0x04, 0x04, 0x02, 0xa9, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x90, 0x08, 0x18, 0x60, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x0e, 0x82, 0x7c, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x0c, 0x10, 0x10, 0x20, 0x20, 0x20, 0x28, 0x3e, 0x1c, 0x20, 0x20, 0x3e, 0x0f, 0x11, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}};
|
||||
|
||||
/* Walk */
|
||||
static const char PROGMEM walk[2][ANIM_SIZE] = {
|
||||
/* 'walk1', 32x22px */
|
||||
static const char PROGMEM walk[2][ANIM_SIZE] = {/* 'walk1', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x90, 0x90, 0x90, 0xa0, 0xc0, 0x80, 0x80,
|
||||
0x80, 0x70, 0x08, 0x14, 0x08, 0x90, 0x10, 0x10, 0x08, 0xa4, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0xea, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x03,
|
||||
0x06, 0x18, 0x20, 0x20, 0x3c, 0x0c, 0x12, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x90, 0x90, 0x90, 0xa0, 0xc0, 0x80, 0x80, 0x80, 0x70, 0x08, 0x14, 0x08, 0x90, 0x10, 0x10, 0x08, 0xa4, 0x78, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x18, 0xea, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x03, 0x06, 0x18, 0x20, 0x20, 0x3c, 0x0c, 0x12, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
},
|
||||
|
||||
/* 'walk2', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00,
|
||||
0x00, 0xe0, 0x10, 0x28, 0x10, 0x20, 0x20, 0x20, 0x10, 0x48, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x20, 0xf8, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x30, 0xd5, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e,
|
||||
0x02, 0x1c, 0x14, 0x08, 0x10, 0x20, 0x2c, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
}
|
||||
};
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x20, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x28, 0x10, 0x20, 0x20, 0x20, 0x10, 0x48, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x20, 0xf8, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x30, 0xd5, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x02, 0x1c, 0x14, 0x08, 0x10, 0x20, 0x2c, 0x32, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
}};
|
||||
|
||||
/* Run */
|
||||
static const char PROGMEM run[2][ANIM_SIZE] = {
|
||||
/* 'run1', 32x22px */
|
||||
static const char PROGMEM run[2][ANIM_SIZE] = {/* 'run1', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0xc8, 0xb0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80,
|
||||
0x80, 0x40, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0xc4, 0xa4, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x58, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x04, 0x04, 0x04, 0x04, 0x02, 0x03, 0x02, 0x01, 0x01,
|
||||
0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0xc8, 0xb0, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x40, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0xc4, 0xa4, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x58, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x09, 0x04, 0x04, 0x04, 0x04, 0x02, 0x03, 0x02, 0x01, 0x01, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
},
|
||||
|
||||
/* 'run2', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||
0x80, 0x80, 0x78, 0x28, 0x08, 0x10, 0x20, 0x30, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xb0, 0x50, 0x55, 0x20, 0x1f, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37,
|
||||
0x02, 0x1e, 0x20, 0x20, 0x18, 0x0c, 0x14, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
}
|
||||
};
|
||||
0x00, 0x00, 0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80, 0x78, 0x28, 0x08, 0x10, 0x20, 0x30, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x10, 0xb0, 0x50, 0x55, 0x20, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x1e, 0x20, 0x20, 0x18, 0x0c, 0x14, 0x1e, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
}};
|
||||
|
||||
/* Bark */
|
||||
static const char PROGMEM bark[2][ANIM_SIZE] = {
|
||||
/* 'bark1', 32x22px */
|
||||
static const char PROGMEM bark[2][ANIM_SIZE] = {/* 'bark1', 32x22px */
|
||||
{
|
||||
0x00, 0xc0, 0x20, 0x10, 0xd0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40,
|
||||
0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02,
|
||||
0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0xc0, 0x20, 0x10, 0xd0, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x3c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc8, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
},
|
||||
|
||||
/* 'bark2', 32x22px */
|
||||
{
|
||||
0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40,
|
||||
0x40, 0x2c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x20, 0x4a, 0x09, 0x10,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02,
|
||||
0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
}
|
||||
};
|
||||
0x00, 0xe0, 0x10, 0x10, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x40, 0x40, 0x2c, 0x14, 0x04, 0x08, 0x90, 0x18, 0x04, 0x08, 0xb0, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0x08, 0x10, 0x11, 0xf9, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0x48, 0x28, 0x2a, 0x10, 0x0f, 0x20, 0x4a, 0x09, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0c, 0x10, 0x20, 0x28, 0x37, 0x02, 0x02, 0x04, 0x08, 0x10, 0x26, 0x2b, 0x32, 0x04, 0x05, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
}};
|
||||
|
||||
/* Sneak */
|
||||
static const char PROGMEM sneak[2][ANIM_SIZE] = {
|
||||
/* 'sneak1', 32x22px */
|
||||
static const char PROGMEM sneak[2][ANIM_SIZE] = {/* 'sneak1', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x1e, 0x21, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x04,
|
||||
0x04, 0x04, 0x03, 0x01, 0x00, 0x00, 0x09, 0x01, 0x80, 0x80, 0xab, 0x04, 0xf8, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x02, 0x06,
|
||||
0x18, 0x20, 0x20, 0x38, 0x08, 0x10, 0x18, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x40, 0x40, 0x80, 0x00, 0x80, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x21, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x04, 0x04, 0x04, 0x03, 0x01, 0x00, 0x00, 0x09, 0x01, 0x80, 0x80, 0xab, 0x04, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1c, 0x20, 0x20, 0x3c, 0x0f, 0x11, 0x1f, 0x02, 0x06, 0x18, 0x20, 0x20, 0x38, 0x08, 0x10, 0x18, 0x04, 0x04, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
},
|
||||
|
||||
/* 'sneak2', 32x22px */
|
||||
{
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0xe0, 0xa0, 0x20, 0x40, 0x80, 0xc0, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x04,
|
||||
0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x40, 0x55, 0x82, 0x7c, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x04,
|
||||
0x18, 0x10, 0x08, 0x10, 0x20, 0x28, 0x34, 0x06, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
}
|
||||
};
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x40, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xa0, 0x20, 0x40, 0x80, 0xc0, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x41, 0xf0, 0x04, 0x02, 0x02, 0x02, 0x03, 0x02, 0x02, 0x02, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x40, 0x55, 0x82, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x20, 0x30, 0x0c, 0x02, 0x05, 0x09, 0x12, 0x1e, 0x04, 0x18, 0x10, 0x08, 0x10, 0x20, 0x28, 0x34, 0x06, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
}};
|
||||
|
||||
/* animation */
|
||||
void animate_luna(void) {
|
||||
|
||||
/* jump */
|
||||
if (isJumping || !showedJump) {
|
||||
|
||||
/* clear */
|
||||
oled_set_cursor(LUNA_X, LUNA_Y + 2);
|
||||
oled_write(" ", false);
|
||||
@ -351,7 +268,6 @@ static void render_luna(int LUNA_X, int LUNA_Y) {
|
||||
|
||||
showedJump = true;
|
||||
} else {
|
||||
|
||||
/* clear */
|
||||
oled_set_cursor(LUNA_X, LUNA_Y - 1);
|
||||
oled_write(" ", false);
|
||||
@ -393,7 +309,6 @@ static void render_luna(int LUNA_X, int LUNA_Y) {
|
||||
} else if (timer_elapsed32(anim_sleep) > OLED_TIMEOUT) {
|
||||
oled_off();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/* KEYBOARD PET END */
|
||||
@ -475,12 +390,9 @@ static void print_status_narrow(void) {
|
||||
/* KEYBOARD PET RENDER END */
|
||||
}
|
||||
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
return OLED_ROTATION_270;
|
||||
}
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) { return OLED_ROTATION_270; }
|
||||
|
||||
void oled_task_user(void) {
|
||||
|
||||
/* KEYBOARD PET VARIABLES START */
|
||||
|
||||
current_wpm = get_current_wpm();
|
||||
@ -727,7 +639,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) {
|
||||
if (clockwise) {
|
||||
if (shift_held) {
|
||||
@ -757,6 +669,7 @@ void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -15,10 +15,8 @@
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Base */
|
||||
[0] = LAYOUT(
|
||||
KC_MUTE, KC_MPLY, R_M_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, MO(1)
|
||||
),
|
||||
@ -29,9 +27,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
RESET, _______, R_M_TOG, R_M_MOD, R_M_HUI, R_M_HUD, R_M_SAI, R_M_SAD, R_M_VAI, R_M_VAD, _______, _______
|
||||
)
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
|
||||
// void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
// bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
// if (index == 0) {
|
||||
// if (clockwise) {
|
||||
// tap_code(KC_VOLD);
|
||||
@ -51,4 +49,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// rgb_matrix_step();
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
@ -15,23 +15,16 @@
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Base */
|
||||
[0] = LAYOUT(
|
||||
KC_PSCR, KC_LSFT, MO(1)
|
||||
),
|
||||
[1] = LAYOUT(
|
||||
RESET, KC_LCTL, _______
|
||||
)
|
||||
};
|
||||
[0] = LAYOUT(KC_PSCR, KC_LSFT, MO(1)),
|
||||
[1] = LAYOUT(RESET, KC_LCTL, _______)};
|
||||
|
||||
|
||||
// void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
// bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
// if (clockwise) {
|
||||
// tap_code(KC_PGDN);
|
||||
// } else {
|
||||
// tap_code(KC_PGUP);
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
@ -368,7 +368,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
#endif // ENCODER_ENABLE
|
||||
|
||||
#ifdef KEYBOARD_planck_rev6
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -391,6 +391,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
userspace_config.nuke_switch = active;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif // KEYBOARD_planck_rev6
|
||||
|
||||
|
@ -395,7 +395,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -420,6 +420,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
@ -293,7 +293,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void dip_update(uint8_t index, bool active) {
|
||||
bool dip_switch_update_user(uint8_t index, bool active) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
if (active) {
|
||||
@ -318,6 +318,7 @@ void dip_update(uint8_t index, bool active) {
|
||||
#endif
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
Loading…
Reference in New Issue
Block a user