Skip to content

Commit c42083a

Browse files
committed
test: add deviceType to test devices
1 parent 2758037 commit c42083a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/test-device/FakeNordicNrplus.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
import { Ulid } from 'id128'
22
import { useEffect, useRef } from 'preact/hooks'
33
import {
4+
DeviceType,
45
GeoLocationSource,
56
useDevices,
67
type Reported,
78
} from '../context/Devices.js'
89
import { useSettings } from '../context/Settings.js'
910

1011
export const FakeNordicNrplus = () => {
11-
const { updateState, updateLocation } = useDevices()
12+
const { updateState, updateLocation, updateType } = useDevices()
1213
const {
1314
settings: { enableTestDevice },
1415
} = useSettings()
@@ -108,11 +109,17 @@ export const FakeNordicNrplus = () => {
108109

109110
const updateDevices = () => {
110111
updateState(deviceIds.current.sink, createSinkState())
112+
updateType(deviceIds.current.sink, DeviceType.NORDIC_NRPLUS)
111113
updateState(deviceIds.current.leaf1, createLeafState(1))
114+
updateType(deviceIds.current.leaf1, DeviceType.NORDIC_NRPLUS)
112115
updateState(deviceIds.current.leaf2, createLeafState(2))
116+
updateType(deviceIds.current.leaf2, DeviceType.NORDIC_NRPLUS)
113117
updateState(deviceIds.current.leaf3, createLeafState(3))
118+
updateType(deviceIds.current.leaf3, DeviceType.NORDIC_NRPLUS)
114119
updateState(deviceIds.current.leaf4, createLeafState(4))
120+
updateType(deviceIds.current.leaf4, DeviceType.NORDIC_NRPLUS)
115121
updateState(deviceIds.current.leaf5, createLeafState(5))
122+
updateType(deviceIds.current.leaf5, DeviceType.NORDIC_NRPLUS)
116123

117124
// Center coordinates (Trondheim area)
118125
const centerLat = 63.42503380159108

0 commit comments

Comments
 (0)