|
1 | 1 | import { Ulid } from 'id128' |
2 | 2 | import { useEffect, useRef } from 'preact/hooks' |
3 | 3 | import { |
| 4 | + DeviceType, |
4 | 5 | GeoLocationSource, |
5 | 6 | useDevices, |
6 | 7 | type Reported, |
7 | 8 | } from '../context/Devices.js' |
8 | 9 | import { useSettings } from '../context/Settings.js' |
9 | 10 |
|
10 | 11 | export const FakeNordicNrplus = () => { |
11 | | - const { updateState, updateLocation } = useDevices() |
| 12 | + const { updateState, updateLocation, updateType } = useDevices() |
12 | 13 | const { |
13 | 14 | settings: { enableTestDevice }, |
14 | 15 | } = useSettings() |
@@ -108,11 +109,17 @@ export const FakeNordicNrplus = () => { |
108 | 109 |
|
109 | 110 | const updateDevices = () => { |
110 | 111 | updateState(deviceIds.current.sink, createSinkState()) |
| 112 | + updateType(deviceIds.current.sink, DeviceType.NORDIC_NRPLUS) |
111 | 113 | updateState(deviceIds.current.leaf1, createLeafState(1)) |
| 114 | + updateType(deviceIds.current.leaf1, DeviceType.NORDIC_NRPLUS) |
112 | 115 | updateState(deviceIds.current.leaf2, createLeafState(2)) |
| 116 | + updateType(deviceIds.current.leaf2, DeviceType.NORDIC_NRPLUS) |
113 | 117 | updateState(deviceIds.current.leaf3, createLeafState(3)) |
| 118 | + updateType(deviceIds.current.leaf3, DeviceType.NORDIC_NRPLUS) |
114 | 119 | updateState(deviceIds.current.leaf4, createLeafState(4)) |
| 120 | + updateType(deviceIds.current.leaf4, DeviceType.NORDIC_NRPLUS) |
115 | 121 | updateState(deviceIds.current.leaf5, createLeafState(5)) |
| 122 | + updateType(deviceIds.current.leaf5, DeviceType.NORDIC_NRPLUS) |
116 | 123 |
|
117 | 124 | // Center coordinates (Trondheim area) |
118 | 125 | const centerLat = 63.42503380159108 |
|
0 commit comments