Rename RGB to Per_KEY

This commit is contained in:
Luke D Jones
2020-08-11 12:37:01 +12:00
parent c0f258f09f
commit 869d9a5b32
5 changed files with 32 additions and 12 deletions

View File

@@ -41,7 +41,7 @@ impl crate::Controller for CtrlKbdBacklight {
while let Some(command) = recv.recv().await {
let mut config = config.lock().await;
match &command {
AuraModes::RGB(_) => {
AuraModes::PerKey(_) => {
self.do_command(command, &mut config)
.await
.unwrap_or_else(|err| warn!("{}", err));
@@ -191,7 +191,7 @@ impl CtrlKbdBacklight {
config.write();
info!("LED brightness set to {:#?}", n);
}
AuraModes::RGB(v) => {
AuraModes::PerKey(v) => {
if v.is_empty() || v[0].is_empty() {
let bytes = KeyColourArray::get_init_msg();
self.write_bytes(&bytes).await?;
@@ -214,7 +214,7 @@ impl CtrlKbdBacklight {
#[inline]
async fn write_mode(&mut self, mode: &AuraModes) -> Result<(), Box<dyn Error>> {
match mode {
AuraModes::RGB(v) => {
AuraModes::PerKey(v) => {
if v.is_empty() || v[0].is_empty() {
let bytes = KeyColourArray::get_init_msg();
self.write_bytes(&bytes).await?;