Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable auto mouse layer #508

Merged
merged 14 commits into from
Mar 24, 2024
Merged

enable auto mouse layer #508

merged 14 commits into from
Mar 24, 2024

Conversation

koron
Copy link
Collaborator

@koron koron commented Mar 21, 2024

merge and reworking #454

In addition to #454, the following changes have been made (WIP)

  • resolve conflicts
  • update QMK to 0.22.14 (last version of 0.22.x)
  • tools to measure and compare firmware sizes
  • drop RGBLIGHT effects to make room for size
  • configurable number of auto mouse layer by each keymaps
    • declare auto mouse layer in each keymaps
    • enable auto mouse layer in each keymaps
  • review features which enabled automatically by defining POINTING_DEVICE_AUTO_MOUSE_ENABLE
    • QMK itself has the state variables for the auto mouse layer, so there's no need for keyball to prepare them, right?
    • Isn't it necessary to use macros to switch between declaration and definition of constant values?
    • Some of the public functions for operating the auto mouse layer are in QMK, so there's no need for keyball to provide them, right?
    • Wouldn't it be better to completely review the display content and method regarding OLED's auto mouse layer? In particular, I would like to correct the current situation where keyball_oled_render_amlinfo is not used at all.
  • review keycodes and its default layout for auto mouse layer
  • research on more reducing size (flags on compile or link)

https://docs.qmk.fm/#/feature_pointing_device?id=pointing-device-auto-mouse

@koron
Copy link
Collaborator Author

koron commented Mar 22, 2024

There are differences in size of each firmware in my working environment before and after merging #454.
It looks like 1.5-2.0K additional capacity is required.

name before after diff oversized
keyball_keyball39_default.hex 26,692 27,792 +1,100
keyball_keyball39_test.hex 23,546 23,554 +8
keyball_keyball39_via.hex 27,778 28,956 +1,178 X
keyball_keyball44_default.hex 26,686 27,786 +1,100
keyball_keyball44_test.hex 23,540 23,548 +8
keyball_keyball44_via.hex 27,772 28,950 +1,178 X
keyball_keyball46_default.hex 26,648 27,748 +1,100
keyball_keyball46_test.hex 23,502 23,510 +8
keyball_keyball46_test_Both.hex 23,502 23,510 +8
keyball_keyball46_test_Left.hex 23,502 23,510 +8
keyball_keyball46_via.hex 27,690 28,866 +1,176 X
keyball_keyball46_via_Both.hex 27,690 28,866 +1,176 X
keyball_keyball46_via_Left.hex 27,690 28,866 +1,176 X
keyball_keyball61_default.hex 27,014 28,114 +1,100
keyball_keyball61_develop.hex 26,540 26,540 +0
keyball_keyball61_kaoriya.hex 23,718 23,718 +0
keyball_keyball61_test.hex 23,664 23,672 +8
keyball_keyball61_via.hex 28,096 28,966 +870 X
keyball_one47_default.hex 22,678 22,686 +8
keyball_one47_test.hex 19,876 19,884 +8
keyball_one47_via.hex 25,446 25,454 +8
avg(diff)
+534.571

@koron
Copy link
Collaborator Author

koron commented Mar 22, 2024

I feel like I can drop all RGBLIGHT effects except STATIC GRADIENT...

@koron
Copy link
Collaborator Author

koron commented Mar 22, 2024

Size change when dropping all RGBLIGHT effects except STATIC GRADIENT with via firmwares.

before: before apply the patch #454
after: apply the patch #454 and drop effects for via firmwares.

name before after diff oversized
keyball_keyball39_default.hex 26,692 27,784 +1,092
keyball_keyball39_test.hex 23,546 23,546 +0
keyball_keyball39_via.hex 27,778 27,568 -210
keyball_keyball44_default.hex 26,686 27,778 +1,092
keyball_keyball44_test.hex 23,540 23,540 +0
keyball_keyball44_via.hex 27,772 27,562 -210
keyball_keyball46_default.hex 26,648 27,740 +1,092
keyball_keyball46_test.hex 23,502 23,502 +0
keyball_keyball46_test_Both.hex 23,502 23,502 +0
keyball_keyball46_test_Left.hex 23,502 23,502 +0
keyball_keyball46_via.hex 27,690 27,496 -194
keyball_keyball46_via_Both.hex 27,690 27,496 -194
keyball_keyball46_via_Left.hex 27,690 27,496 -194
keyball_keyball61_default.hex 27,014 28,106 +1,092
keyball_keyball61_develop.hex 26,540 26,540 +0
keyball_keyball61_kaoriya.hex 23,718 23,718 +0
keyball_keyball61_test.hex 23,664 23,664 +0
keyball_keyball61_via.hex 28,096 27,892 -204
keyball_one47_default.hex 22,678 22,678 +0
keyball_one47_test.hex 19,876 19,876 +0
keyball_one47_via.hex 25,446 25,446 +0
avg(diff)
+150.571

@koron
Copy link
Collaborator Author

koron commented Mar 22, 2024

It can be seen that POINTING_DEVICE_AUTO_MOUSE_ENABLE consumes approximately 1100 additional bytes.

instead of set_auto_mouse_layer().
@koron
Copy link
Collaborator Author

koron commented Mar 23, 2024

f28ece4 use AUTO_MOUSE_DEFAULT_LAYER instead of set_auto_mouse_layer().

reduce 18 bytes for my builds.

@koron
Copy link
Collaborator Author

koron commented Mar 23, 2024

It is layer#2 that mouse layer for Keyball61

Clarified the demarcation point about Auto Mouse Layer

* don't provide wrappers for functions which QMK auto mouse layer provides
* store/restore timeout to EEPROM in very simple way
@koron
Copy link
Collaborator Author

koron commented Mar 23, 2024

QMK itself has the state variables for the auto mouse layer, so there's no need for keyball to prepare them, right?

decided to use QMK's state variables.

Some of the public functions for operating the auto mouse layer are in QMK, so there's no need for keyball to provide them, right?

decided to not provide those functions.

@koron
Copy link
Collaborator Author

koron commented Mar 23, 2024

size summary at 9f7c5c4

name before after diff oversized
keyball_keyball39_default.hex 26,692 27,742 +1,050
keyball_keyball39_test.hex 23,546 23,546 +0
keyball_keyball39_via.hex 27,778 27,522 -256
keyball_keyball44_default.hex 26,686 27,736 +1,050
keyball_keyball44_test.hex 23,540 23,540 +0
keyball_keyball44_via.hex 27,772 27,516 -256
keyball_keyball46_default.hex 26,648 27,698 +1,050
keyball_keyball46_test.hex 23,502 23,502 +0
keyball_keyball46_test_Both.hex 23,502 23,502 +0
keyball_keyball46_test_Left.hex 23,502 23,502 +0
keyball_keyball46_via.hex 27,690 27,456 -234
keyball_keyball46_via_Both.hex 27,690 27,456 -234
keyball_keyball46_via_Left.hex 27,690 27,456 -234
keyball_keyball61_default.hex 27,014 28,064 +1,050
keyball_keyball61_develop.hex 26,540 26,540 +0
keyball_keyball61_kaoriya.hex 23,718 23,718 +0
keyball_keyball61_test.hex 23,664 23,664 +0
keyball_keyball61_via.hex 28,096 27,840 -256
keyball_one47_default.hex 22,678 22,678 +0
keyball_one47_test.hex 19,876 19,876 +0
keyball_one47_via.hex 25,446 25,446 +0
avg(diff)
+130

use new lib/logofont
@koron
Copy link
Collaborator Author

koron commented Mar 24, 2024

  • Optimized font

    • Removed unused glyphs
  • Changed the way the logo is displayed

  • Arranged the content displayed on OLED

    image

name before after diff oversized
keyball_keyball39_default.hex 26,692 27,876 +1,184
keyball_keyball39_test.hex 23,546 23,248 -298
keyball_keyball39_via.hex 27,778 27,684 -94
keyball_keyball44_default.hex 26,686 27,870 +1,184
keyball_keyball44_test.hex 23,540 23,242 -298
keyball_keyball44_via.hex 27,772 27,678 -94
keyball_keyball46_default.hex 26,648 27,832 +1,184
keyball_keyball46_test.hex 23,502 23,204 -298
keyball_keyball46_test_Both.hex 23,502 23,204 -298
keyball_keyball46_test_Left.hex 23,502 23,204 -298
keyball_keyball46_via.hex 27,690 27,618 -72
keyball_keyball46_via_Both.hex 27,690 27,618 -72
keyball_keyball46_via_Left.hex 27,690 27,618 -72
keyball_keyball61_default.hex 27,014 28,196 +1,182
keyball_keyball61_develop.hex 26,540 26,432 -108
keyball_keyball61_kaoriya.hex 23,718 23,718 +0
keyball_keyball61_test.hex 23,664 23,368 -296
keyball_keyball61_via.hex 28,096 28,000 -96
keyball_one47_default.hex 22,678 22,408 -270
keyball_one47_test.hex 19,876 19,608 -268
keyball_one47_via.hex 25,446 25,198 -248
avg(diff)
+74

@koron koron marked this pull request as ready for review March 24, 2024 11:59
@koron koron merged commit fa7cc43 into main Mar 24, 2024
40 checks passed
@koron koron deleted the auto-mouse-layer-454 branch March 24, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants