Advanced Aura feature

Groundwork for 'advanced' aura modes
Add single zone + Doom light flash
Fix mocking for ROGCC
Better prepare & change to mapping of keyboard layouts to models and functions
Refactor and begin using new key layout stuff
Enable first arg to rogcc to set layout in mocking feature mode
Complete refactor of key layouts, and to RON serde
This commit is contained in:
Luke D. Jones
2022-12-11 11:50:47 +13:00
parent e3ecaa92bd
commit 1cbffedaeb
134 changed files with 8249 additions and 4390 deletions

View File

@@ -1,18 +1,16 @@
use std::{sync::atomic::Ordering, time::Duration};
use std::sync::atomic::Ordering;
use std::time::Duration;
use egui::Color32;
use rog_aura::{AuraEffect, AuraModeNum};
use crate::{
system_state::SystemState,
widgets::{aura_modes_group, keyboard},
RogApp,
};
use crate::system_state::SystemState;
use crate::widgets::{aura_modes_group, keyboard};
use crate::RogApp;
impl RogApp {
pub fn aura_page(&mut self, states: &mut SystemState, ctx: &egui::Context) {
let Self {
supported,
oscillator1,
oscillator2,
oscillator3,
@@ -70,9 +68,13 @@ impl RogApp {
// TODO: animation of colour changes/periods/blending
egui::CentralPanel::default().show(ctx, |ui| {
aura_modes_group(supported, states, oscillator_freq, ui);
keyboard(ui, &states.keyboard_layout, &mut states.aura, colour);
aura_modes_group(states, oscillator_freq, ui);
keyboard(
ui,
&states.aura_creation.keyboard_layout,
&mut states.aura,
colour,
);
});
// Only do repaint request if on this page

View File

@@ -1,28 +1,37 @@
use crate::{
system_state::{FanCurvesState, ProfilesState, SystemState},
widgets::fan_graphs,
RogApp, RogDbusClientBlocking,
};
use egui::Ui;
use rog_platform::supported::SupportedFunctions;
use rog_profiles::Profile;
use crate::system_state::{FanCurvesState, ProfilesState, SystemState};
use crate::widgets::fan_graphs;
use crate::{RogApp, RogDbusClientBlocking};
impl RogApp {
pub fn fan_curve_page(&mut self, states: &mut SystemState, ctx: &egui::Context) {
let Self { supported, .. } = self;
egui::CentralPanel::default().show(ctx, |ui| {
ui.heading("Custom fan curves");
ui.label("A fan curve is only active when the related profile is active and the curve is enabled");
ui.label(
"A fan curve is only active when the related profile is active and the curve is \
enabled",
);
Self::fan_curve(
supported,
&mut states.profiles,
&mut states.fan_curves,
&states.asus_dbus, &mut states.error,
&states.asus_dbus,
&mut states.error,
ui,
);
fan_graphs(supported, &mut states.fan_curves, &states.asus_dbus, &mut states.error, ui);
fan_graphs(
supported,
&mut states.fan_curves,
&states.asus_dbus,
&mut states.error,
ui,
);
});
}

View File

@@ -1,10 +1,8 @@
use crate::{
system_state::SystemState,
widgets::{
anime_power_group, app_settings, aura_power_group, platform_profile, rog_bios_group,
},
RogApp,
use crate::system_state::SystemState;
use crate::widgets::{
anime_power_group, app_settings, aura_power_group, platform_profile, rog_bios_group,
};
use crate::RogApp;
impl RogApp {
pub fn system_page(&mut self, states: &mut SystemState, ctx: &egui::Context) {
@@ -21,7 +19,6 @@ impl RogApp {
egui::Grid::new("grid_of_bits")
.min_col_width(rect.width() / 2.0)
.show(ui, |ui| {
/******************************************************/
ui.vertical(|ui| {
ui.separator();
if supported.platform_profile.platform_profile {
@@ -34,7 +31,6 @@ impl RogApp {
});
ui.end_row();
/******************************************************/
ui.vertical(|ui| {
ui.separator();
app_settings(config, states, ui);
@@ -45,7 +41,6 @@ impl RogApp {
});
ui.end_row();
/******************************************************/
ui.vertical(|ui| {
ui.separator();
if supported.anime_ctrl.0 {