mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
improve braille testing flags, make them more consistent
i wonder if there isn't a workspace-level way to flip a flag...
This commit is contained in:
parent
3f998dd6e4
commit
ccbe7c479f
7 changed files with 14 additions and 5 deletions
|
|
@ -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 = []
|
||||
|
|
|
|||
|
|
@ -28,4 +28,5 @@ minifb = {version = "0.19.2", git = "https://github.com/xobs/rust_minifb.git", r
|
|||
|
||||
[features]
|
||||
debugprint = []
|
||||
braille = []
|
||||
default = [] # "debugprint"
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -25,4 +25,5 @@ utralib = {path = "../../utralib"}
|
|||
[features]
|
||||
debugprint = []
|
||||
debuginject = [] # used only if you want key injection via the UART
|
||||
braille = []
|
||||
default = ["debuginject"] # "debugprint"
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 = []
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue