Added the ability to support different firmware report versions
This commit is contained in:
18
src/main.rs
18
src/main.rs
@@ -15,6 +15,7 @@ use eframe::{egui, glow};
|
||||
use fast_config::Config;
|
||||
use std::sync::{Arc, Condvar, Mutex};
|
||||
use std::time::Duration;
|
||||
use clap::Parser;
|
||||
|
||||
// Internal Module Imports
|
||||
use config::{ConfigData}; // Import specific items
|
||||
@@ -30,6 +31,13 @@ const INITIAL_HEIGHT: f32 = 260.0;
|
||||
pub type SharedStateFlag = Arc<(Mutex<bool>, Condvar)>;
|
||||
pub type SharedDeviceState = Arc<Mutex<u16>>; // Assuming Condvar isn't strictly needed here
|
||||
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(version, about, long_about = None)]
|
||||
struct Args {
|
||||
#[arg(short, long, default_value_t = false)]
|
||||
skip_firmware: bool,
|
||||
}
|
||||
|
||||
// The main application struct
|
||||
pub struct ShiftTool {
|
||||
// State
|
||||
@@ -205,15 +213,7 @@ fn main() -> eframe::Result<()> {
|
||||
env_logger::init();
|
||||
|
||||
// --- Command Line Argument Parsing ---
|
||||
// If you need args, keep this, otherwise remove clap dependency.
|
||||
use clap::Parser;
|
||||
#[derive(Parser, Debug)]
|
||||
#[command(version, about, long_about = None)]
|
||||
struct Args {
|
||||
#[arg(short, long, default_value_t = false)]
|
||||
skip_firmware: bool,
|
||||
}
|
||||
let _args = Args::parse();
|
||||
// let _args = Args::parse();
|
||||
// --- End Argument Parsing ---
|
||||
|
||||
log::info!("Starting {}", PROGRAM_TITLE);
|
||||
|
||||
Reference in New Issue
Block a user