mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +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]
|
[features]
|
||||||
debugprint = []
|
debugprint = []
|
||||||
slowstatus = [] # used for braille mode, so console isn't overwhelmed with status
|
|
||||||
# default = ["debugprint"] # "debugprint"
|
# default = ["debugprint"] # "debugprint"
|
||||||
default = []
|
default = []
|
||||||
|
|
|
||||||
|
|
@ -28,4 +28,5 @@ minifb = {version = "0.19.2", git = "https://github.com/xobs/rust_minifb.git", r
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
debugprint = []
|
debugprint = []
|
||||||
|
braille = []
|
||||||
default = [] # "debugprint"
|
default = [] # "debugprint"
|
||||||
|
|
|
||||||
|
|
@ -480,7 +480,9 @@ fn xmain() -> ! {
|
||||||
tv.text.as_str().unwrap().len()
|
tv.text.as_str().unwrap().len()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
log::debug!("{}", tv);
|
if cfg!(feature = "braille") {
|
||||||
|
log::info!("{}", tv);
|
||||||
|
}
|
||||||
let do_xor = tv.invert;
|
let do_xor = tv.invert;
|
||||||
blitstr::paint_str(
|
blitstr::paint_str(
|
||||||
display.native_buffer(),
|
display.native_buffer(),
|
||||||
|
|
|
||||||
|
|
@ -25,4 +25,5 @@ utralib = {path = "../../utralib"}
|
||||||
[features]
|
[features]
|
||||||
debugprint = []
|
debugprint = []
|
||||||
debuginject = [] # used only if you want key injection via the UART
|
debuginject = [] # used only if you want key injection via the UART
|
||||||
|
braille = []
|
||||||
default = ["debuginject"] # "debugprint"
|
default = ["debuginject"] # "debugprint"
|
||||||
|
|
|
||||||
|
|
@ -293,13 +293,19 @@ mod implementation {
|
||||||
let ticktimer = ticktimer_server::Ticktimer::new().expect("couldn't connect to ticktimer");
|
let ticktimer = ticktimer_server::Ticktimer::new().expect("couldn't connect to ticktimer");
|
||||||
let timestamp = ticktimer.elapsed_ms();
|
let timestamp = ticktimer.elapsed_ms();
|
||||||
|
|
||||||
|
let default_map = if cfg!(feature = "braille") {
|
||||||
|
KeyMap::Braille
|
||||||
|
} else {
|
||||||
|
KeyMap::Qwerty
|
||||||
|
};
|
||||||
|
|
||||||
let mut kbd = Keyboard {
|
let mut kbd = Keyboard {
|
||||||
conn: xous::connect(sid).unwrap(),
|
conn: xous::connect(sid).unwrap(),
|
||||||
csr: CSR::new(csr.as_mut_ptr() as *mut u32),
|
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
|
new_state: HashSet::with_capacity(16), // pre-allocate space since this has to work in an interrupt context
|
||||||
last_state: HashSet::with_capacity(16),
|
last_state: HashSet::with_capacity(16),
|
||||||
ticktimer,
|
ticktimer,
|
||||||
map: KeyMap::Qwerty,
|
map: default_map,
|
||||||
delay: 500,
|
delay: 500,
|
||||||
rate: 20,
|
rate: 20,
|
||||||
shift_down: false,
|
shift_down: false,
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,6 @@ chrono = "0.4"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
debugprint = []
|
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 = ["debugprint"] # "debugprint"
|
||||||
default = []
|
default = []
|
||||||
|
|
|
||||||
|
|
@ -277,7 +277,7 @@ fn xmain() -> ! {
|
||||||
let stats_interval;
|
let stats_interval;
|
||||||
let batt_interval;
|
let batt_interval;
|
||||||
let secnotes_interval;
|
let secnotes_interval;
|
||||||
if cfg!(feature = "slowstatus") {
|
if cfg!(feature = "braille") {
|
||||||
// lower the status output rate for braille mode, debugging, etc.
|
// lower the status output rate for braille mode, debugging, etc.
|
||||||
stats_interval = 30;
|
stats_interval = 30;
|
||||||
batt_interval = 60;
|
batt_interval = 60;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue