In-progress

This commit is contained in:
Luke
2020-05-23 09:16:34 +12:00
parent 0b3046b31f
commit de10fe13e7
6 changed files with 51 additions and 48 deletions

View File

@@ -1,8 +1,8 @@
use crate::{
config::Config,
core::*,
laptops::match_laptop,
led_control::{AuraCommand, LedWriter},
rogcore::*,
};
use dbus::{

View File

@@ -1,4 +1,4 @@
use crate::{config::Config, core::RogCore, led_control::AuraCommand};
use crate::{config::Config, led_control::AuraCommand, rogcore::RogCore};
use rog_aura::{error::AuraError, BuiltInModeByte};
//use keycode::{KeyMap, KeyMappingId, KeyState, KeyboardState};
use crate::virt_device::ConsumerKeys;

View File

@@ -1,14 +1,14 @@
#![deny(unused_must_use)]
/// Configuration loading, saving
mod config;
/// The core module which allows writing to LEDs or polling the
/// laptop keyboard attached devices
mod core;
/// Start the daemon loop
pub mod daemon;
/// Laptop matching to determine capabilities
mod laptops;
///
mod led_control;
/// The core module which allows writing to LEDs or polling the
/// laptop keyboard attached devices
pub mod rogcore;
/// A virtual "consumer device" to help emit the correct key codes
mod virt_device;

View File

@@ -1,4 +1,5 @@
use daemon::daemon::start_daemon;
use daemon::rogcore::FanLevel;
use env_logger::{Builder, Target};
use gumdrop::Options;
use log::LevelFilter;
@@ -19,6 +20,8 @@ struct CLIStart {
daemon: bool,
#[options(meta = "VAL", help = "<off, low, med, high>")]
bright: Option<LedBrightness>,
#[options(meta = "FAN", help = "<off, low, med, high>")]
fan_mode: Option<FanLevel>,
#[options(command)]
command: Option<Command>,
}

View File

@@ -304,7 +304,7 @@ where
}
#[derive(Debug)]
enum FanLevel {
pub enum FanLevel {
Normal,
Boost,
Silent,