now sending chars yay

This commit is contained in:
Yehowshua Immanuel 2024-12-24 18:34:47 -05:00
parent f992a24719
commit e08c673e86
5 changed files with 9 additions and 10 deletions

View file

@ -74,8 +74,8 @@ pub async fn unload_signal(signal_ref: wellen::SignalRef) {
platform::unload_signal(signal_ref).await
}
pub async fn send_char() {
platform::send_char().await
pub async fn send_char(c : String) {
platform::send_char(c).await
}
pub async fn add_decoders(decoder_paths: Vec<DecoderPath>) -> AddedDecodersCount {

View file

@ -58,8 +58,8 @@ pub(super) async fn unload_signal(signal_ref: wellen::SignalRef) {
.unwrap_throw()
}
pub(super) async fn send_char() {
tauri_glue::send_char()
pub(super) async fn send_char(c : String) {
tauri_glue::send_char(c)
.await
.unwrap_throw()
}
@ -158,7 +158,7 @@ mod tauri_glue {
pub async fn unload_signal(signal_ref_index: usize) -> Result<(), JsValue>;
#[wasm_bindgen(catch)]
pub async fn send_char() -> Result<(), JsValue>;
pub async fn send_char(c : String) -> Result<(), JsValue>;
#[wasm_bindgen(catch)]
pub async fn add_decoders(

View file

@ -71,7 +71,7 @@ fn send_char(
let send_c = c.clone();
Task::start(async move {
println!("Sending char: {}", &c);
crate::platform::send_char().await;
crate::platform::send_char(send_c.to_string()).await;
// crate::platform::unload_signal().await;
println!("Sent char: {}", &c);
});

File diff suppressed because one or more lines are too long

View file

@ -59,9 +59,8 @@ export async function unload_signal(signal_ref_index: number): Promise<void> {
return await invoke("unload_signal", { signal_ref_index });
}
export async function send_char(): Promise<void> {
const char = "a";
return await invoke("send_char", { char });
export async function send_char(c : string): Promise<void> {
return await invoke("send_char", { c });
}
export async function add_decoders(decoder_paths: Array<DecoderPath>): Promise<AddedDecodersCount> {