Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧼 Cleaner architecture #91

Merged
merged 34 commits into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b8beb5f
🃏 Adds adafruit lib dep
runeharlyk Aug 31, 2024
0e3a107
📷 Adds camera settings model
runeharlyk Aug 31, 2024
6bde606
⌚ Adds ntp model
runeharlyk Aug 31, 2024
14daea3
🛜 Adds ap model
runeharlyk Aug 31, 2024
4df03c0
🛜 Adds wifi model
runeharlyk Aug 31, 2024
316ae11
💫 Adds stateful service templates
runeharlyk Aug 31, 2024
3dc7dfc
📷 Adds camera model
runeharlyk Aug 31, 2024
2751657
⌚ Adds ntp service
runeharlyk Aug 31, 2024
5c293b4
📷 Adds camera service
runeharlyk Aug 31, 2024
dd5d5fa
🛜 Adds wifi services
runeharlyk Aug 31, 2024
b3371dc
🪶 Adds feature service
runeharlyk Aug 31, 2024
0996370
📂 Adds filesystem service
runeharlyk Aug 31, 2024
6553a36
💉 Adds system service
runeharlyk Aug 31, 2024
ee95448
🚨 Adds led service
runeharlyk Aug 31, 2024
ab2b2f3
🥣 Adds peripherals service
runeharlyk Aug 31, 2024
357f7db
🌃 Adds event socket
runeharlyk Aug 31, 2024
6804b58
🔖 Adds taskmanager
runeharlyk Aug 31, 2024
ba417be
🥣 Adds common utilities
runeharlyk Aug 31, 2024
e8d844a
🏎️ Adds servo controller
runeharlyk Aug 31, 2024
f088438
🐕 Adds gait utility
runeharlyk Aug 31, 2024
775b9ac
🐕 Adds kinematics service
runeharlyk Aug 31, 2024
55d0b26
🗄️ Adds espfs
runeharlyk Aug 31, 2024
1fc6fbb
🐕 Adds motion service
runeharlyk Aug 31, 2024
7c38221
⌛ Adds timing utilities
runeharlyk Aug 31, 2024
a61a1af
🪶 Adds common global macros
runeharlyk Aug 31, 2024
5ed0915
🔖 Adds feature defines
runeharlyk Aug 31, 2024
e60903e
🕸️ Adds web server
runeharlyk Aug 31, 2024
e59731f
🐕 Adds spot class
runeharlyk Aug 31, 2024
aac645b
🐕 Updates main to use Spot class
runeharlyk Aug 31, 2024
1f73f7a
🕸️ Updates api calls to use new api
runeharlyk Aug 31, 2024
5a0e5a4
3️⃣ Updates imu store
runeharlyk Aug 31, 2024
d099dd3
🌋 Formats error view
runeharlyk Aug 31, 2024
69f8111
🧼 Removes esp32 sveltekit
runeharlyk Aug 31, 2024
10260ee
🏗️ Updates web app build location
runeharlyk Aug 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 20 additions & 18 deletions app/src/lib/stores/imu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,26 @@ import type { IMU } from '$lib/types/models';
const maxIMUData = 100;

export const imu = (() => {
const { subscribe, update } = writable({
x: [] as number[],
y: [] as number[],
z: [] as number[],
imu_temp: [] as number[],
altitude: [] as number[],
pressure: [] as number[],
bmp_temp: [] as number[]
});
const { subscribe, update } = writable({
x: [] as number[],
y: [] as number[],
z: [] as number[],
imu_temp: [] as number[],
altitude: [] as number[],
pressure: [] as number[],
bmp_temp: [] as number[]
});

const addData = (content: IMU) => {
update((data) => {
(Object.keys(content) as (keyof IMU)[]).forEach((key) => {
data[key] = [...data[key], content[key]].slice(-maxIMUData);
});
return data;
});
};
const addData = (content: Partial<IMU>) => {
update(data => {
(Object.keys(data) as (keyof IMU)[]).forEach(key => {
if (key in content) {
data[key] = [...data[key], content[key]!].slice(-maxIMUData);
}
});
return data;
});
};

return { subscribe, addData };
return { subscribe, addData };
})();
6 changes: 1 addition & 5 deletions app/src/routes/+error.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
import { goto } from '$app/navigation';
import { onMount } from 'svelte';

onMount(() => {
setTimeout(() => {
goto('/');
}, 3000);
});
onMount(() => setTimeout(() => goto('/'), 3000));
</script>

<div class="flex justify-center items-center w-full h-full">
Expand Down
Loading
Loading