Comments (4)
I didn't think it worth using RAM on this, my RGB code already had separate state for layouts (like split backspace etc.) prior to the layout option stuff added to VIA. As such, maybe store state in the RGB config which acts as the cache, and then read the layout options on startup/mode change and push that into the RGB config state. If you want to patch in a "no eeprom" getter into via.c then that'll work too.
from keyboards.
Yeah, but that's your rgb code. Which I have no intention of implementing. Additionally, there are reasons other than just RGB for wanting to read that information. Being able to do so without having to read from eeprom every time would be nice.
So, aside from reading from the EEPROM constantly, there is no way then, without modifying core code then. Especially since the raw hid callbacks don't send the data to the kb level functions unless it's unrecognized. if that at least passed on the info, it would be a vast improvement, just in general.
But for now, looks like I'm sticking with this:
__attribute__((weak)) void rgb_matrix_indicators_user(void) {
# ifdef VIA_ENABLE
static bool layout_2u = false;
static uint16_t timer = 0;
if (timer_elapsed(timer) > 500) {
timer = timer_read();
layout_2u = (bool)via_get_layout_options();
}
if (layout_2u) {
rgb_matrix_set_color(5, 0, 0, 0);
rgb_matrix_set_color(7, 0, 0, 0);
} else {
rgb_matrix_set_color(6, 0, 0, 0);
}
# else
rgb_matrix_set_color(5, 0, 0, 0);
rgb_matrix_set_color(7, 0, 0, 0);
# endif
}
from keyboards.
This is what I was suggesting - store state locally, cache the layout options state, or make a change to via.c and add a "no eeprom" getter. I can add one in the next round of changes if you don't want to do it.
from keyboards.
Well, I think the best solution would be to have the raw_hid_receive_kb
be called no matter what.
That way, when changes are made (such as the layout options), that can be read by the kb level code, and cached/stored locally, rather than having to constantly read the EEPROM or stored globally.
from keyboards.
Related Issues (20)
- VIA app do not recognice my BM60rgbISO_rev2 HOT 6
- Vendor Definitions HOT 1
- Missing ability to add new layers HOT 1
- GMMK2 p65 ANSI shows incorrect keymap on configure screen HOT 11
- Lulu Keyboard deleted by accident?
- Support for keychron k6. HOT 1
- A knob configuration doesn't work with Keychron Q8 HOT 1
- > add v3/ubest/vn/vn.json support(the-via#1613)
- Keychron Q6 - ISO - encoder (knob) and key "fn+J+Z" not working HOT 11
- Please add Keychron Q1 v2 (encoder) to keyboards list HOT 4
- Keyhive UT47.2 support outdated HOT 2
- How to add a keyboard? HOT 2
- MAGIC_TOGGLE_GUI is not supported HOT 3
- KBD67 MKII ISO RGB : LUFA Disk or bootloader mode not working HOT 1
- PER KEY RGB
- [Request] Don't completely crap out when errors occur.
- yiancardesigns/nebula68b: no accented vowels HOT 1
- keebio/BFO-9000 RGB? HOT 1
- RGB lighting HOT 1
- PULL REQUESTS PAUSED BETWEEN DECEMBER 2023 - JANUARY 2024
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keyboards.