Implement basic saved point editor
This commit is contained in:
parent
bb390d50dc
commit
0f79cefdac
12 changed files with 414 additions and 41 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { writable } from "svelte/store";
|
||||
import type { FlightParameters, RawTelemetry, Telemetry } from "./types";
|
||||
import type { RawPrediction, Prediction } from "./types";
|
||||
import type { SavedPoint } from "./types";
|
||||
|
||||
export const readLocalStorage = <T>(key: string, defaultValue: T): T => {
|
||||
const item = localStorage.getItem(key);
|
||||
|
|
@ -67,3 +68,5 @@ export const RawPredictionStore = writable<RawPrediction>(
|
|||
export const PredictionStore = writable<Prediction>(
|
||||
readLocalStorage<Prediction>("prediction", {} as Prediction)
|
||||
);
|
||||
|
||||
export const SavedPointsStore = writable<SavedPoint[]>([]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue