Skip to content

Commit

Permalink
fix prop use in analog array editor
Browse files Browse the repository at this point in the history
  • Loading branch information
steersbob committed Jul 1, 2024
1 parent 6554f68 commit 96ca097
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/plugins/spark/components/widget/AnalogArrayEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const props = defineProps<Props>();
const existingSensors = computed<{ [channelId: number]: Block[] }>(() => {
const sensors = sparkStore
.blocksByType(props.serviceId, BlockOrIntfType.TempSensorAnalog)
.blocksByType(props.address.serviceId, BlockOrIntfType.TempSensorAnalog)
.filter((block) => block.data.analogDevice.id === props.address.id);
return props.channels.reduce((acc, channel) => {
acc[channel.id] = sensors.filter(
Expand Down
7 changes: 3 additions & 4 deletions src/plugins/spark/features/GpioModule/GpioModuleWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import {
import { computed } from 'vue';
import { useContext } from '@/composables';
import { useBlockWidget } from '@/plugins/spark/composables';
import { asBlockAddress } from '@/plugins/spark/utils/configuration';
import { createDialogPromise } from '@/utils/dialog';
/**
Expand All @@ -19,8 +20,7 @@ function listedPins(pins: GpioPins): number[] {
}
const { context } = useContext.setup();
const { serviceId, block, patchBlock } =
useBlockWidget.setup<GpioModuleBlock>();
const { block, patchBlock } = useBlockWidget.setup<GpioModuleBlock>();
const power = computed<boolean>({
get: () => block.value.data.useExternalPower,
Expand Down Expand Up @@ -143,8 +143,7 @@ const errors = computed<string[]>(() => {
<q-separator />
<AnalogArrayEditor
v-model:channels="analogChannels"
:service-id="serviceId"
:block-id="block.id"
:address="asBlockAddress(block)"
/>
</template>
<div class="col-break" />
Expand Down

0 comments on commit 96ca097

Please sign in to comment.