diff --git a/.gitignore b/.gitignore index 38adffa..f3432ba 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ coverage *.njsproj *.sln *.sw? +.lens/* \ No newline at end of file diff --git a/index.html b/index.html index 38ad202..3f4e04e 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,11 @@ + + + + TFR Mission Control diff --git a/public/android-chrome-192x192.png b/public/android-chrome-192x192.png new file mode 100644 index 0000000..3bd4078 Binary files /dev/null and b/public/android-chrome-192x192.png differ diff --git a/public/android-chrome-512x512.png b/public/android-chrome-512x512.png new file mode 100644 index 0000000..8ae8079 Binary files /dev/null and b/public/android-chrome-512x512.png differ diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png new file mode 100644 index 0000000..e66f5df Binary files /dev/null and b/public/apple-touch-icon.png differ diff --git a/public/connected-favicon.ico b/public/connected-favicon.ico new file mode 100644 index 0000000..52cda19 Binary files /dev/null and b/public/connected-favicon.ico differ diff --git a/public/favicon-16x16.png b/public/favicon-16x16.png new file mode 100644 index 0000000..b94466d Binary files /dev/null and b/public/favicon-16x16.png differ diff --git a/public/favicon-32x32.png b/public/favicon-32x32.png new file mode 100644 index 0000000..6693a2c Binary files /dev/null and b/public/favicon-32x32.png differ diff --git a/public/favicon.ico b/public/favicon.ico index df36fcf..7b37ffe 100644 Binary files a/public/favicon.ico and b/public/favicon.ico differ diff --git a/public/site.webmanifest b/public/site.webmanifest new file mode 100644 index 0000000..21b250a --- /dev/null +++ b/public/site.webmanifest @@ -0,0 +1,11 @@ +{ + "name": "Mission Control", + "short_name": "", + "icons": [ + { "src": "/android-chrome-192x192.png", "sizes": "192x192", "type": "image/png" }, + { "src": "/android-chrome-512x512.png", "sizes": "512x512", "type": "image/png" } + ], + "theme_color": "#ffffff", + "background_color": "#ffffff", + "display": "standalone" +} diff --git a/src/App.vue b/src/App.vue index 92e2747..80da0d2 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,8 +3,10 @@ import Navbar from '@/components/Navbar.vue'; import { useRoslibStore } from '@/store/roslibStore'; import { onBeforeUnmount, onMounted } from 'vue'; import { gamepadInit } from '@/lib/controller/gamepad'; - +import { useFavicon } from '@vueuse/core'; +import { computed } from 'vue'; const rosjs = useRoslibStore(); + // All global subscribers & publishers that do not belong in a component put in here. onMounted(() => { // Create a new connection if the current one is stopped. @@ -20,6 +22,13 @@ onBeforeUnmount(() => { // Stop the websocket when the app unloads. rosjs.stop = true; }); + +// changes favicon based on if web socket is connected or not +const favicon = computed(() => + rosjs.isWebSocketConnected ? 'connected-favicon.ico' : 'favicon.ico', +); + +useFavicon(favicon); diff --git a/src/pages/DevTab.vue b/src/pages/DevTab.vue index 338a6ac..000b3fe 100644 --- a/src/pages/DevTab.vue +++ b/src/pages/DevTab.vue @@ -8,11 +8,6 @@ import PublishTesterComponent from '@/components/PublishTesterComponent.vue';
-

Not yet Implemented

-

Not yet Implemented

-

Not yet Implemented

-

Not yet Implemented

-

Not yet Implemented

diff --git a/src/pages/Help.vue b/src/pages/Help.vue index 39a5c9a..60f9677 100644 --- a/src/pages/Help.vue +++ b/src/pages/Help.vue @@ -1,14 +1,7 @@ diff --git a/src/pages/Home.vue b/src/pages/Home.vue index 4984aa5..858484b 100644 --- a/src/pages/Home.vue +++ b/src/pages/Home.vue @@ -1,15 +1,15 @@ - + diff --git a/src/pages/Map.vue b/src/pages/Map.vue index df2a218..522f3b8 100644 --- a/src/pages/Map.vue +++ b/src/pages/Map.vue @@ -5,8 +5,6 @@ import InteractiveMap from '@/components/map/InteractiveMap.vue'; diff --git a/src/pages/Science.vue b/src/pages/Science.vue index 4ba0316..87e6127 100644 --- a/src/pages/Science.vue +++ b/src/pages/Science.vue @@ -1,14 +1,7 @@ diff --git a/src/pages/Settings.vue b/src/pages/Settings.vue index 524afe4..b2f5e81 100644 --- a/src/pages/Settings.vue +++ b/src/pages/Settings.vue @@ -6,11 +6,6 @@ import ConnectionSettings from '@/components/settings/ConnectionSettings.vue'; diff --git a/src/pages/Telemetry.vue b/src/pages/Telemetry.vue index dcdcd5e..ea969c3 100644 --- a/src/pages/Telemetry.vue +++ b/src/pages/Telemetry.vue @@ -145,10 +145,6 @@ function getMoteusStateProxy( -

Not yet Implemented

-

Not yet Implemented

-

Not yet Implemented

-

Not yet Implemented

diff --git a/src/store/mapStore.ts b/src/store/mapStore.ts new file mode 100644 index 0000000..8ac620c --- /dev/null +++ b/src/store/mapStore.ts @@ -0,0 +1,41 @@ +import { defineStore } from 'pinia'; +import { createSubscriber } from '@/lib/roslibUtils/createSubscriber'; +import { useRoslibStore } from '@/store/roslibStore'; + +// 0th Define any constants above +// const TOPIC_MESSAGE_TYPE: TopicType = 'sensor_msgs/NavSatFix'; + +export const useMapStore = defineStore('example', () => { + // 1st define any dependency stores + // This will most likely only be useRoslibStore + // 2nd define any state here in ref<>() + const mapNavSub = createSubscriber({ + topicName: '/fix', + topicType: 'sensor_msgs/msg/NavSatFix', + //startingDefaultValue: { data: 'Hello World' }, + }); + + function myFunction() { + const ros = useRoslibStore(); + console.log(mapNavSub.msg.value); + console.log(mapNavSub.msg); + ros.ros.getTopics((bob) => { + console.log(bob); + }); + } + + // Call `myFunction` every 1000 milliseconds (1 second) + setInterval(myFunction, 1000); + //3rd define any getters in computed + //const allCapsData = computed(() => helloWorldSub.msg.value?.data.toUpperCase()); + //4th define any functions + /* + const helloWorldPub = createPublisher({ + topicName: TOPIC_NAME, + topicType: TOPIC_MESSAGE_TYPE, + }); + */ + + // Return all state, getters and functions + return mapNavSub; +});