merge: resolve conflicts with main

This commit is contained in:
q9i 2024-03-09 15:10:40 -08:00 committed by GitButler
commit 3806047604
5 changed files with 24 additions and 27 deletions

View file

@ -32,7 +32,7 @@ pub async fn create_client(
Ok(client) => {
println!("Client created");
app_handle
.emit_all("telemetry_connected", "connected")
.emit_all("telemetry_status", "connected")
.expect("Failed to emit telemetry_status connected event");
break client; // Exit the loop if the client is successfully created
}

View file

@ -28,7 +28,12 @@ pub async fn subscribe_topics(
let client = create_client(&app_handle, &ntable_ip, &ntable_port).await;
let mut subscription: Subscription = match create_subscription(&client).await {
Ok(subscription) => subscription,
Ok(subscription) => {
app_handle
.emit_all("telemetry_status", "connected")
.expect("Failed to emit telemetry_connected event");
subscription
}
Err(_) => {
app_handle
.emit_all("telemetry_status", "disconnected")
@ -40,11 +45,19 @@ pub async fn subscribe_topics(
while let Some(mut message) = subscription.next().await {
process_message(&mut message);
let json_message = to_string(&message).expect("Failed to serialize message");
let json_message = match to_string(&message) {
Ok(json) => json,
Err(_) => continue,
};
app_handle
.emit_all("telemetry_data", json_message.clone())
.expect("Failed to send telemetry message");
app_handle
.emit_all("telemetry_status", "connected")
.expect("Failed to emit telemetry_connected event");
check_triggers(
&app_handle,
&message.topic_name,

View file

@ -76,17 +76,9 @@
}
.infotainment-container {
background: #2c3e50; /* fallback for old browsers */
background: -webkit-linear-gradient(
to right,
#2c3e50,
#fd746c
); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(
to right,
#2c3e50,
#fd746c
); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
background-image: url('./assets/wallpaper.jpg');
background-repeat: no-repeat;
background-size: cover;
/* hide scrollbar */
-ms-overflow-style: none;
scrollbar-width: none;

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 KiB

View file

@ -1,7 +1,7 @@
<script lang="ts">
import { blur } from "svelte/transition";
import { blur } from 'svelte/transition'
import SvelteLogo from "./SvelteLogo.svelte";
import SvelteLogo from './SvelteLogo.svelte'
</script>
<div
@ -15,16 +15,8 @@
<style lang="postcss">
.bg {
background: #2c3e50; /* fallback for old browsers */
background: -webkit-linear-gradient(
to right,
#2c3e50,
#fd746c
); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(
to right,
#2c3e50,
#fd746c
); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
background-image: url('../../assets/wallpaper.jpg');
background-repeat: no-repeat;
background-size: cover;
}
</style>