Skip to content

Commit

Permalink
Merge pull request #299 from BitsAndDroids/main
Browse files Browse the repository at this point in the history
App v0.9.10
  • Loading branch information
BitsAndDroids authored Jan 10, 2025
2 parents 8f1fa53 + 2597c17 commit 8e491d4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -882,9 +882,10 @@ void BitsAndDroidsFlightConnector::switchHandling() {
// START CASE TEMPLATE

// END CASE TEMPLATE
default:
default: {
break;
}
}
}

void BitsAndDroidsFlightConnector::propsInputHandling(int propPin1,
Expand Down
4 changes: 2 additions & 2 deletions crates/connector/src-tauri/src/utils/library_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ pub fn generate_library(
}

#[tauri::command]
pub fn get_library_outputs(app: tauri::AppHandle) -> HashMap<u32, WasmEvent> {
pub fn get_library_outputs(app: tauri::AppHandle) -> Vec<WasmEvent> {
let mut outputs = HashMap::new();
let mut wasm_registry = events::wasm_registry::WASMRegistry::new();
wasm_registry.load_wasm(&app);
let wasm_outputs = wasm_registry.get_wasm_outputs();
for output in wasm_outputs.values() {
outputs.insert(output.id, output.clone());
}
outputs
outputs.values().cloned().collect()
}
2 changes: 1 addition & 1 deletion crates/connector/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9.9",
"version": "0.9.10",
"build": {
"beforeDevCommand": "pnpm dev",
"beforeBuildCommand": "pnpm run build",
Expand Down
6 changes: 3 additions & 3 deletions frontend/library/utils/CustomWasmGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { WASMEvent } from "@/model/WASMEvent";

import { invoke } from "@tauri-apps/api/core";
const generateVariables = (variables: WASMEvent[]): string => {
if (!variables.length) {
if (variables?.length == 0) {
return "";
}
return variables.map(generateVariable).join("\n");
Expand Down Expand Up @@ -101,14 +101,14 @@ const insertVariables = (variableString: string, templateString: string) => {
};

const generateGetters = (variables: WASMEvent[]): string => {
if (!variables.length) {
if (variables?.length == 0) {
return "";
}
return variables.map(generateGetter).join("\n");
};

const generateCases = (variables: WASMEvent[]): string => {
if (!variables.length) {
if (variables?.length == 0) {
return "";
}
return variables.map(generateCase).join("\n");
Expand Down

0 comments on commit 8e491d4

Please sign in to comment.