Skip to content

Commit

Permalink
Add SatelliteIndicator mini-widget
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaellehmkuhl authored and patrickelectric committed Aug 23, 2023
1 parent a0df4b1 commit 32db669
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/MiniWidgetInstantiator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
<template v-if="widgetType === MiniWidgetType.ModeSelector">
<ModeSelector :options="options" />
</template>
<template v-if="widgetType === MiniWidgetType.SatelliteIndicator">
<SatelliteIndicator :options="options" />
</template>
<template v-if="widgetType === MiniWidgetType.ViewSelector">
<ViewSelector :options="options" />
</template>
Expand All @@ -41,6 +44,7 @@ import GenericIndicator from './mini-widgets/GenericIndicator.vue'
import JoystickCommIndicator from './mini-widgets/JoystickCommIndicator.vue'
import MiniVideoRecorder from './mini-widgets/MiniVideoRecorder.vue'
import ModeSelector from './mini-widgets/ModeSelector.vue'
import SatelliteIndicator from './mini-widgets/SatelliteIndicator.vue'
import ViewSelector from './mini-widgets/ViewSelector.vue'
const props = defineProps<{
Expand Down
15 changes: 15 additions & 0 deletions src/components/mini-widgets/SatelliteIndicator.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<template>
<div class="flex items-center w-fit min-w-[8rem] max-w-[9rem] h-12 p-1 text-white justify-center">
<span class="relative w-[2.25rem] mdi mdi-satellite-variant text-4xl"></span>
<div class="flex flex-col items-start justify-center ml-1 min-w-[4rem] max-w-[6rem] select-none">
<span class="font-mono font-semibold leading-4 text-end w-fit">{{ store.statusGPS.visibleSatellites }} sats</span>
<span class="font-mono text-sm font-semibold leading-4 text-end w-fit">{{ store.statusGPS.fixType }}</span>
</div>
</div>
</template>

<script setup lang="ts">
import { useMainVehicleStore } from '@/stores/mainVehicle'
const store = useMainVehicleStore()
</script>
1 change: 1 addition & 0 deletions src/types/miniWidgets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export enum MiniWidgetType {
JoystickCommIndicator = 'JoystickCommIndicator',
MiniVideoRecorder = 'MiniVideoRecorder',
ModeSelector = 'ModeSelector',
SatelliteIndicator = 'SatelliteIndicator',
ViewSelector = 'ViewSelector',
}

Expand Down

0 comments on commit 32db669

Please sign in to comment.