mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +00:00
intermediate checkpoint of failing memory-passing for keyrawstates
This commit is contained in:
parent
dfc6444d78
commit
8ce0e8c789
8 changed files with 381 additions and 31 deletions
|
|
@ -88,7 +88,7 @@ pub(crate) struct UxContext {
|
|||
/// opcode ID for AudioFrame
|
||||
pub audioframe_id: Option<u32>,
|
||||
}
|
||||
const MAX_UX_CONTEXTS: usize = 6;
|
||||
const MAX_UX_CONTEXTS: usize = 7;
|
||||
// const BOOT_APP_NAME: &'static str = "shellchat"; // this is the app to display on boot -- we will eventually need this once we have more than one app?
|
||||
pub const ROOTKEY_MODAL_NAME: &'static str = "rootkeys modal";
|
||||
const BOOT_CONTEXT_TRUSTLEVEL: u8 = 254;
|
||||
|
|
|
|||
|
|
@ -12,8 +12,17 @@ use xous_ipc::String;
|
|||
*/
|
||||
|
||||
// if you add more UxContexts, and you want them authorized by the GAM, add their names here.
|
||||
const TOKEN_SLOTS: usize = 7;
|
||||
const EXPECTED_BOOT_CONTEXTS: [&'static str; TOKEN_SLOTS] = ["shellchat", "main menu", "status", "emoji menu", "rootkeys modal", "rtc modal", "rootkeys menu"];
|
||||
const TOKEN_SLOTS: usize = 8;
|
||||
const EXPECTED_BOOT_CONTEXTS: [&'static str; TOKEN_SLOTS] = [
|
||||
"shellchat",
|
||||
"main menu",
|
||||
"status",
|
||||
"emoji menu",
|
||||
"rootkeys modal",
|
||||
"rtc modal",
|
||||
"rootkeys menu",
|
||||
"test modal"
|
||||
];
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub(crate) struct NamedToken {
|
||||
|
|
|
|||
|
|
@ -509,8 +509,9 @@ fn xmain() -> ! {
|
|||
let xns = xous_names::XousNames::new().unwrap();
|
||||
// expect:
|
||||
// - one connection from the key server
|
||||
// - one connection from shellchat for testing
|
||||
let jtag_sid = xns.register_name(api::SERVER_NAME_JTAG, Some(2)).expect("can't register server");
|
||||
// - one connection from shellchat for command line
|
||||
// - another connection from shellchat for oqc testing
|
||||
let jtag_sid = xns.register_name(api::SERVER_NAME_JTAG, Some(3)).expect("can't register server");
|
||||
log::trace!("registered with NS -- {:?}", jtag_sid);
|
||||
|
||||
let mut jtag = JtagMach::new();
|
||||
|
|
|
|||
|
|
@ -54,6 +54,9 @@ pub(crate) enum Opcode {
|
|||
/// request for ScanCodes
|
||||
RegisterListener,
|
||||
|
||||
/// request for raw keyups/downs
|
||||
RegisterRawListener,
|
||||
|
||||
/// set repeat delay, rate; both in ms
|
||||
SetRepeat, //(u32, u32),
|
||||
|
||||
|
|
@ -80,4 +83,30 @@ pub(crate) enum Opcode {
|
|||
pub(crate) struct KeyboardRegistration {
|
||||
pub server_name: xous_ipc::String::<64>,
|
||||
pub listener_op_id: usize,
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub struct RowCol {
|
||||
pub r: u8,
|
||||
pub c: u8,
|
||||
}
|
||||
impl RowCol {
|
||||
#[allow(dead_code)]
|
||||
pub fn new(r: u8, c: u8) -> RowCol {
|
||||
RowCol { r, c }
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct KeyRawStates {
|
||||
pub keydowns: Vec::<RowCol>,
|
||||
pub keyups: Vec::<RowCol>,
|
||||
}
|
||||
impl KeyRawStates {
|
||||
pub fn new() -> Self {
|
||||
KeyRawStates {
|
||||
keydowns: Vec::with_capacity(16),
|
||||
keyups: Vec::with_capacity(16),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use num_traits::*;
|
|||
|
||||
pub mod api;
|
||||
|
||||
use api::{Opcode, KeyboardRegistration};
|
||||
pub use api::*;
|
||||
use xous::{send_message, Message};
|
||||
use xous_ipc::{Buffer, String};
|
||||
|
||||
|
|
@ -31,6 +31,16 @@ impl Keyboard {
|
|||
.expect("couldn't register listener");
|
||||
}
|
||||
|
||||
pub fn register_raw_listener(&self, server_name: &str, action_opcode: usize) {
|
||||
let kr = KeyboardRegistration {
|
||||
server_name: String::<64>::from_str(server_name),
|
||||
listener_op_id: action_opcode
|
||||
};
|
||||
let buf = Buffer::into_buf(kr).unwrap();
|
||||
buf.lend(self.conn, Opcode::RegisterRawListener.to_u32().unwrap())
|
||||
.expect("couldn't register listener");
|
||||
}
|
||||
|
||||
pub fn set_vibe(&self, enable: bool) -> Result<(), xous::Error> {
|
||||
let ena =
|
||||
if enable { 1 }
|
||||
|
|
|
|||
|
|
@ -10,27 +10,6 @@ use num_traits::*;
|
|||
use xous_ipc::Buffer;
|
||||
use xous::{CID, msg_scalar_unpack};
|
||||
|
||||
#[derive(Debug, Default, Copy, Clone, PartialEq, Eq, Hash)]
|
||||
pub(crate) struct RowCol {
|
||||
pub r: u8,
|
||||
pub c: u8,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub (crate) struct KeyRawStates {
|
||||
pub keydowns: Vec::<RowCol>,
|
||||
pub keyups: Vec::<RowCol>,
|
||||
}
|
||||
impl KeyRawStates {
|
||||
pub fn new() -> Self {
|
||||
KeyRawStates {
|
||||
keydowns: Vec::with_capacity(16),
|
||||
keyups: Vec::with_capacity(16),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// Compute the dvorak key mapping of row/col to key tuples
|
||||
#[allow(dead_code)]
|
||||
fn map_dvorak(code: RowCol) -> ScanCode {
|
||||
|
|
@ -842,10 +821,11 @@ fn xmain() -> ! {
|
|||
// connections expected:
|
||||
// - GAM
|
||||
// - graphics (if building for hosted mode)
|
||||
// - shellchat (for factory test)
|
||||
#[cfg(any(target_os = "none", target_os = "xous"))]
|
||||
let kbd_sid = xns.register_name(api::SERVER_NAME_KBD, Some(1)).expect("can't register server");
|
||||
#[cfg(not(any(target_os = "none", target_os = "xous")))]
|
||||
let kbd_sid = xns.register_name(api::SERVER_NAME_KBD, Some(2)).expect("can't register server");
|
||||
#[cfg(not(any(target_os = "none", target_os = "xous")))]
|
||||
let kbd_sid = xns.register_name(api::SERVER_NAME_KBD, Some(3)).expect("can't register server");
|
||||
log::trace!("registered with NS -- {:?}", kbd_sid);
|
||||
|
||||
// Create a new kbd object
|
||||
|
|
@ -860,6 +840,8 @@ fn xmain() -> ! {
|
|||
|
||||
let mut listener_conn: Option<CID> = None;
|
||||
let mut listener_op: Option<usize> = None;
|
||||
let mut raw_listener_conn: Option<CID> = None;
|
||||
let mut raw_listener_op: Option<u32> = None;
|
||||
|
||||
let mut vibe = false;
|
||||
let llio = llio::Llio::new(&xns).unwrap();
|
||||
|
|
@ -898,6 +880,21 @@ fn xmain() -> ! {
|
|||
}
|
||||
}
|
||||
},
|
||||
Some(Opcode::RegisterRawListener) => {
|
||||
let buffer = unsafe{Buffer::from_memory_message(msg.body.memory_message().unwrap())};
|
||||
let kr = buffer.as_flat::<KeyboardRegistration, _>().unwrap();
|
||||
match xns.request_connection_blocking(kr.server_name.as_str()) {
|
||||
Ok(cid) => {
|
||||
raw_listener_conn = Some(cid);
|
||||
raw_listener_op = Some(kr.listener_op_id as u32);
|
||||
}
|
||||
Err(e) => {
|
||||
log::error!("couldn't connect to listener: {:?}", e);
|
||||
raw_listener_conn = None;
|
||||
raw_listener_op = None;
|
||||
}
|
||||
}
|
||||
},
|
||||
Some(Opcode::SelectKeyMap) => msg_scalar_unpack!(msg, km, _, _, _, {
|
||||
kbd.set_map(KeyMap::from(km))
|
||||
}),
|
||||
|
|
@ -960,6 +957,24 @@ fn xmain() -> ! {
|
|||
Some(Opcode::HandlerTrigger) => {
|
||||
let rawstates = kbd.update();
|
||||
|
||||
if raw_listener_conn.is_some() && raw_listener_op.is_some()
|
||||
&& (rawstates.keydowns.len() > 0 || rawstates.keyups.len() > 0)
|
||||
{
|
||||
// manual serialization of KeyRawStates, because rkyv can't derive a serializer.
|
||||
let mut krs_ser: [(u8, u8); 32] = [(255, 255); 32];
|
||||
for (&src, (r, c)) in rawstates.keydowns.iter().zip(krs_ser[..16].iter_mut()) {
|
||||
*r = src.r;
|
||||
*c = src.c;
|
||||
}
|
||||
for (&src, (r, c)) in rawstates.keyups.iter().zip(krs_ser[16..].iter_mut()) {
|
||||
*r = src.r;
|
||||
*c = src.c;
|
||||
}
|
||||
|
||||
let buf = Buffer::into_buf(krs_ser).or(Err(xous::Error::InternalError)).expect("couldn't serialize krs buffer");
|
||||
buf.send(raw_listener_conn.unwrap(), raw_listener_op.unwrap()).expect("couldn't send raw scancodes");
|
||||
}
|
||||
|
||||
// interpret scancodes
|
||||
// the track_* functions track the keyup/keydowns to modify keys with shift, hold, and chord state
|
||||
let kc: Vec<char> = match kbd.get_map() {
|
||||
|
|
|
|||
|
|
@ -7,6 +7,12 @@ use codec::*;
|
|||
use spectrum_analyzer::{FrequencyLimit, FrequencySpectrum, samples_fft_to_spectrum};
|
||||
use spectrum_analyzer::windows::hann_window;
|
||||
use rtc::{DateTime, Weekday};
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::thread;
|
||||
use keyboard::RowCol;
|
||||
use std::collections::HashMap;
|
||||
use gam::modal::*;
|
||||
use num_traits::*;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Test {
|
||||
|
|
@ -28,6 +34,8 @@ pub struct Test {
|
|||
end_time: Option<DateTime>,
|
||||
start_elapsed: Option<u64>,
|
||||
end_elapsed: Option<u64>,
|
||||
kbd: Arc<Mutex<keyboard::Keyboard>>,
|
||||
jtag: jtag::Jtag,
|
||||
}
|
||||
impl Test {
|
||||
pub fn new(xns: &xous_names::XousNames) -> Self {
|
||||
|
|
@ -60,6 +68,8 @@ impl Test {
|
|||
end_time: None,
|
||||
start_elapsed: None,
|
||||
end_elapsed: None,
|
||||
kbd: Arc::new(Mutex::new(keyboard::Keyboard::new(&xns).unwrap())),
|
||||
jtag: jtag::Jtag::new(&xns).unwrap(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -67,6 +77,16 @@ impl Test {
|
|||
const SAMPLE_RATE_HZ: f32 = 8000.0;
|
||||
// note to self: A4 = 440.0, E4 = 329.63, C4 = 261.63
|
||||
|
||||
#[derive(num_derive::FromPrimitive, num_derive::ToPrimitive, Debug)]
|
||||
enum TestOp {
|
||||
KeyCode,
|
||||
UxGutter,
|
||||
ModalRedraw,
|
||||
ModalKeys,
|
||||
ModalDrop,
|
||||
}
|
||||
|
||||
|
||||
impl<'a> ShellCmdApi<'a> for Test {
|
||||
cmd_api!(test);
|
||||
|
||||
|
|
@ -378,6 +398,150 @@ impl<'a> ShellCmdApi<'a> for Test {
|
|||
log::debug!("off-target 2 {}", analyze(&spectrum_right, 261.63));
|
||||
log::info!("{}|ASTOP|", SENTINEL);
|
||||
}
|
||||
"oqc" => {
|
||||
env.llio.wfi_override(true).unwrap();
|
||||
//xous::rsyscall(xous::SysCall::IncreaseHeap(65536, xous::MemoryFlags::R | xous::MemoryFlags::W)).expect("couldn't increase our heap");
|
||||
ret.clear();
|
||||
if 0x362f093 != self.jtag.get_id().unwrap() {
|
||||
write!(ret, "FAIL: JTAG self access").unwrap();
|
||||
return Ok(Some(ret));
|
||||
}
|
||||
env.com.set_backlight(196, 196).unwrap();
|
||||
|
||||
log::info!("building modal");
|
||||
const OQC_SERVER: &str = "_OQC server_";
|
||||
let kbdtest_sid = env.xns.register_name(OQC_SERVER, Some(1)).unwrap();
|
||||
let test_cid = xous::connect(kbdtest_sid).unwrap();
|
||||
let mut test_action = Notification::new(
|
||||
test_cid,
|
||||
TestOp::UxGutter.to_u32().unwrap()
|
||||
);
|
||||
test_action.manual_dismiss = false;
|
||||
let mut bot_str = std::string::String::from("test");
|
||||
let mut test_modal = Modal::new(
|
||||
"test modal",
|
||||
ActionType::Notification(test_action),
|
||||
Some("Keyboard Test"),
|
||||
Some(&bot_str),
|
||||
GlyphStyle::Small,
|
||||
8
|
||||
);
|
||||
log::info!("making helper");
|
||||
test_modal.spawn_helper(kbdtest_sid, test_modal.sid,
|
||||
TestOp::ModalRedraw.to_u32().unwrap(),
|
||||
TestOp::ModalKeys.to_u32().unwrap(),
|
||||
TestOp::ModalDrop.to_u32().unwrap(),
|
||||
);
|
||||
log::info!("raising modal");
|
||||
test_modal.activate();
|
||||
test_modal.redraw();
|
||||
|
||||
log::info!("spawning helper thread");
|
||||
let handle = thread::spawn({
|
||||
log::info!("clone kbd");
|
||||
let kbd = Arc::clone(&self.kbd);
|
||||
log::info!("move kbd");
|
||||
move || {
|
||||
log::info!("oqc server starting");
|
||||
kbd.lock().unwrap()
|
||||
.register_raw_listener(
|
||||
OQC_SERVER,
|
||||
TestOp::KeyCode.to_usize().unwrap()
|
||||
);
|
||||
let mut count = 0;
|
||||
let mut remaining = populate_vectors();
|
||||
|
||||
loop {
|
||||
let msg = xous::receive_message(kbdtest_sid).unwrap();
|
||||
log::info!("got msg: {:?}", msg);
|
||||
match FromPrimitive::from_usize(msg.body.id()) {
|
||||
Some(TestOp::KeyCode) => {
|
||||
log::info!("keycode: {:?}", msg.body);
|
||||
let buffer = unsafe {
|
||||
xous_ipc::Buffer::from_memory_message(msg.body.memory_message().unwrap())
|
||||
};
|
||||
log::info!("deserialize");
|
||||
let krs = buffer.to_original::<[(u8, u8); 32],_>().unwrap();
|
||||
let mut rawstates = keyboard::KeyRawStates::new();
|
||||
for &(r, c) in krs[..16].iter() {
|
||||
if r != 255 || c != 255 {
|
||||
rawstates.keydowns.push(RowCol{r, c});
|
||||
}
|
||||
}
|
||||
for &(r, c) in krs[16..].iter() {
|
||||
if r!= 255 || c != 255 {
|
||||
rawstates.keyups.push(RowCol{r, c});
|
||||
}
|
||||
}
|
||||
log::info!("rawstates");
|
||||
if rawstates.keydowns.len() > 0 {
|
||||
for &key in rawstates.keydowns.iter() {
|
||||
match remaining.get(&key) {
|
||||
Some(_hit) => {
|
||||
log::info!("got {}", map_codes(key));
|
||||
remaining.insert(key, true);
|
||||
bot_str.push_str(map_codes(key));
|
||||
},
|
||||
None => log::warn!("got unexpected r/c: {:?}", key),
|
||||
};
|
||||
}
|
||||
log::info!("update modal");
|
||||
test_modal.modify(None, None, false,
|
||||
Some(&bot_str), false, None);
|
||||
log::info!("redraw modal");
|
||||
test_modal.redraw();
|
||||
xous::yield_slice();
|
||||
}
|
||||
log::info!("epilogue");
|
||||
// iterate and see if all keys have been hit
|
||||
let mut finished = true;
|
||||
for &vals in remaining.values() {
|
||||
if vals == false {
|
||||
log::info!("short-circuit remaining eval");
|
||||
finished = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if finished {
|
||||
log::info!("all keys hit, exiting");
|
||||
break;
|
||||
}
|
||||
|
||||
count += 1;
|
||||
if count > 10 {
|
||||
log::info!("test threshold hit, exiting");
|
||||
break;
|
||||
}
|
||||
},
|
||||
Some(TestOp::UxGutter) => {
|
||||
log::info!("gutter");
|
||||
// an intentional NOP for UX actions that require a destintation but need no action
|
||||
},
|
||||
Some(TestOp::ModalRedraw) => {
|
||||
log::info!("modal redraw handler");
|
||||
test_modal.redraw();
|
||||
},
|
||||
Some(TestOp::ModalKeys) => xous::msg_scalar_unpack!(msg, _k1, _k2, _k3, _k4, {
|
||||
log::info!("modal keys message, ignoring");
|
||||
// ignore keys, we have our own key routine
|
||||
}),
|
||||
Some(TestOp::ModalDrop) => {
|
||||
log::error!("test modal quit unexpectedly");
|
||||
}
|
||||
_ => {
|
||||
log::error!("unrecognized message: {:?}", msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
test_modal.gam.relinquish_focus().unwrap();
|
||||
}
|
||||
});
|
||||
handle.join().unwrap();
|
||||
|
||||
write!(ret, "CHECK: was backlight on?\nIf so, then PASS").unwrap();
|
||||
env.com.set_backlight(0, 0).unwrap();
|
||||
env.llio.wfi_override(false).unwrap();
|
||||
}
|
||||
"devboot" => {
|
||||
env.gam.set_devboot(true).unwrap();
|
||||
write!(ret, "devboot on").unwrap();
|
||||
|
|
@ -611,3 +775,125 @@ fn rtc_get(llio: &mut llio::Llio) -> Option<DateTime> {
|
|||
_ => None
|
||||
}
|
||||
}
|
||||
|
||||
fn populate_vectors() -> HashMap::<RowCol, bool> {
|
||||
let mut vectors = HashMap::<RowCol, bool>::new();
|
||||
vectors.insert(RowCol::new(0, 0), false);
|
||||
vectors.insert(RowCol::new(0, 1), false);
|
||||
vectors.insert(RowCol::new(0, 2), false);
|
||||
vectors.insert(RowCol::new(0, 3), false);
|
||||
vectors.insert(RowCol::new(0, 4), false);
|
||||
vectors.insert(RowCol::new(4, 5), false);
|
||||
vectors.insert(RowCol::new(4, 6), false);
|
||||
vectors.insert(RowCol::new(4, 7), false);
|
||||
vectors.insert(RowCol::new(4, 8), false);
|
||||
vectors.insert(RowCol::new(4, 9), false);
|
||||
vectors.insert(RowCol::new(1, 0), false);
|
||||
vectors.insert(RowCol::new(1, 1), false);
|
||||
vectors.insert(RowCol::new(1, 2), false);
|
||||
vectors.insert(RowCol::new(1, 3), false);
|
||||
vectors.insert(RowCol::new(1, 4), false);
|
||||
vectors.insert(RowCol::new(5, 5), false);
|
||||
vectors.insert(RowCol::new(5, 6), false);
|
||||
vectors.insert(RowCol::new(5, 7), false);
|
||||
vectors.insert(RowCol::new(5, 8), false);
|
||||
vectors.insert(RowCol::new(5, 9), false);
|
||||
vectors.insert(RowCol::new(2, 0), false);
|
||||
vectors.insert(RowCol::new(2, 1), false);
|
||||
vectors.insert(RowCol::new(2, 2), false);
|
||||
vectors.insert(RowCol::new(2, 3), false);
|
||||
vectors.insert(RowCol::new(2, 4), false);
|
||||
vectors.insert(RowCol::new(6, 5), false);
|
||||
vectors.insert(RowCol::new(6, 6), false);
|
||||
vectors.insert(RowCol::new(6, 7), false);
|
||||
vectors.insert(RowCol::new(6, 8), false);
|
||||
vectors.insert(RowCol::new(6, 9), false);
|
||||
vectors.insert(RowCol::new(3, 0), false);
|
||||
vectors.insert(RowCol::new(3, 1), false);
|
||||
vectors.insert(RowCol::new(3, 2), false);
|
||||
vectors.insert(RowCol::new(3, 3), false);
|
||||
vectors.insert(RowCol::new(3, 4), false);
|
||||
vectors.insert(RowCol::new(7, 5), false);
|
||||
vectors.insert(RowCol::new(7, 6), false);
|
||||
vectors.insert(RowCol::new(7, 7), false);
|
||||
vectors.insert(RowCol::new(7, 8), false);
|
||||
vectors.insert(RowCol::new(7, 9), false);
|
||||
vectors.insert(RowCol::new(8, 5), false);
|
||||
vectors.insert(RowCol::new(8, 6), false);
|
||||
vectors.insert(RowCol::new(8, 7), false);
|
||||
vectors.insert(RowCol::new(8, 8), false);
|
||||
vectors.insert(RowCol::new(8, 9), false);
|
||||
vectors.insert(RowCol::new(8, 0), false);
|
||||
vectors.insert(RowCol::new(8, 1), false);
|
||||
vectors.insert(RowCol::new(3, 8), false);
|
||||
vectors.insert(RowCol::new(3, 9), false);
|
||||
vectors.insert(RowCol::new(8, 3), false);
|
||||
vectors.insert(RowCol::new(3, 6), false);
|
||||
vectors.insert(RowCol::new(6, 4), false);
|
||||
vectors.insert(RowCol::new(8, 2), false);
|
||||
vectors.insert(RowCol::new(5, 2), false);
|
||||
|
||||
vectors
|
||||
}
|
||||
|
||||
fn map_codes(code: RowCol) -> &'static str {
|
||||
let rc = (code.r, code.c);
|
||||
|
||||
match rc {
|
||||
(0, 0) => "1",
|
||||
(0, 1) => "2",
|
||||
(0, 2) => "3",
|
||||
(0, 3) => "4",
|
||||
(0, 4) => "5",
|
||||
(4, 5) => "6",
|
||||
(4, 6) => "7",
|
||||
(4, 7) => "8",
|
||||
(4, 8) => "9",
|
||||
(4, 9) => "0",
|
||||
(1, 0) => "q",
|
||||
(1, 1) => "w",
|
||||
(1, 2) => "e",
|
||||
(1, 3) => "r",
|
||||
(1, 4) => "t",
|
||||
(5, 5) => "y",
|
||||
(5, 6) => "u",
|
||||
(5, 7) => "i",
|
||||
(5, 8) => "o",
|
||||
(5, 9) => "p",
|
||||
(2, 0) => "a",
|
||||
(2, 1) => "s",
|
||||
(2, 2) => "d",
|
||||
(2, 3) => "f",
|
||||
(2, 4) => "g",
|
||||
(6, 5) => "h",
|
||||
(6, 6) => "j",
|
||||
(6, 7) => "k",
|
||||
(6, 8) => "l",
|
||||
(6, 9) => "BS",
|
||||
(3, 0) => "!",
|
||||
(3, 1) => "z",
|
||||
(3, 2) => "x",
|
||||
(3, 3) => "c",
|
||||
(3, 4) => "v",
|
||||
(7, 5) => "b",
|
||||
(7, 6) => "n",
|
||||
(7, 7) => "m",
|
||||
(7, 8) => "?",
|
||||
(7, 9) => "↩️",
|
||||
(8, 5) => "LS",
|
||||
(8, 6) => ",",
|
||||
(8, 7) => "SP",
|
||||
(8, 8) => ".",
|
||||
(8, 9) => "RS",
|
||||
(8, 0) => "F1",
|
||||
(8, 1) => "F2",
|
||||
(3, 8) => "F3",
|
||||
(3, 9) => "F4",
|
||||
(8, 3) => "⬅️",
|
||||
(3, 6) => "➡️",
|
||||
(6, 4) => "⬆️",
|
||||
(8, 2) => "⬇️",
|
||||
(5, 2) => "MID",
|
||||
_ => "ERR!",
|
||||
}
|
||||
}
|
||||
|
|
@ -23,6 +23,6 @@ utralib = {path = "../../utralib"}
|
|||
debug-print = []
|
||||
watchdog = []
|
||||
# generally you want to disable watchdog if you're doing development
|
||||
default = ["watchdog"]
|
||||
default = []
|
||||
# default = []
|
||||
# default = ["debug-print"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue