diff --git a/services/gam/Cargo.toml b/services/gam/Cargo.toml index db4f4dadd..4f51004f7 100644 --- a/services/gam/Cargo.toml +++ b/services/gam/Cargo.toml @@ -35,6 +35,5 @@ utralib = {path = "../../utralib"} [features] debugprint = [] -slowstatus = [] # used for braille mode, so console isn't overwhelmed with status # default = ["debugprint"] # "debugprint" default = [] diff --git a/services/graphics-server/Cargo.toml b/services/graphics-server/Cargo.toml index 2498a576d..87c93469a 100644 --- a/services/graphics-server/Cargo.toml +++ b/services/graphics-server/Cargo.toml @@ -28,4 +28,5 @@ minifb = {version = "0.19.2", git = "https://github.com/xobs/rust_minifb.git", r [features] debugprint = [] +braille = [] default = [] # "debugprint" diff --git a/services/graphics-server/src/main.rs b/services/graphics-server/src/main.rs index 2ace2035c..89c9d5a61 100644 --- a/services/graphics-server/src/main.rs +++ b/services/graphics-server/src/main.rs @@ -480,7 +480,9 @@ fn xmain() -> ! { tv.text.as_str().unwrap().len() ); } - log::debug!("{}", tv); + if cfg!(feature = "braille") { + log::info!("{}", tv); + } let do_xor = tv.invert; blitstr::paint_str( display.native_buffer(), diff --git a/services/keyboard/Cargo.toml b/services/keyboard/Cargo.toml index cb5a6e0f8..105065ee0 100644 --- a/services/keyboard/Cargo.toml +++ b/services/keyboard/Cargo.toml @@ -25,4 +25,5 @@ utralib = {path = "../../utralib"} [features] debugprint = [] debuginject = [] # used only if you want key injection via the UART +braille = [] default = ["debuginject"] # "debugprint" diff --git a/services/keyboard/src/main.rs b/services/keyboard/src/main.rs index c5582fcce..69dd17428 100644 --- a/services/keyboard/src/main.rs +++ b/services/keyboard/src/main.rs @@ -293,13 +293,19 @@ mod implementation { let ticktimer = ticktimer_server::Ticktimer::new().expect("couldn't connect to ticktimer"); let timestamp = ticktimer.elapsed_ms(); + let default_map = if cfg!(feature = "braille") { + KeyMap::Braille + } else { + KeyMap::Qwerty + }; + let mut kbd = Keyboard { conn: xous::connect(sid).unwrap(), csr: CSR::new(csr.as_mut_ptr() as *mut u32), new_state: HashSet::with_capacity(16), // pre-allocate space since this has to work in an interrupt context last_state: HashSet::with_capacity(16), ticktimer, - map: KeyMap::Qwerty, + map: default_map, delay: 500, rate: 20, shift_down: false, diff --git a/services/status/Cargo.toml b/services/status/Cargo.toml index 7946168a8..05efab933 100644 --- a/services/status/Cargo.toml +++ b/services/status/Cargo.toml @@ -37,6 +37,6 @@ chrono = "0.4" [features] debugprint = [] -slowstatus = [] # used for braille mode, so console isn't overwhelmed with status +braille = [] # used for braille mode, so console isn't overwhelmed with status # default = ["debugprint"] # "debugprint" default = [] diff --git a/services/status/src/main.rs b/services/status/src/main.rs index 494624f01..39166570d 100644 --- a/services/status/src/main.rs +++ b/services/status/src/main.rs @@ -277,7 +277,7 @@ fn xmain() -> ! { let stats_interval; let batt_interval; let secnotes_interval; - if cfg!(feature = "slowstatus") { + if cfg!(feature = "braille") { // lower the status output rate for braille mode, debugging, etc. stats_interval = 30; batt_interval = 60;