@viamrobotics/test-widgets 0.15.1 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -1
- package/dist/api-docs-href.d.ts +2 -2
- package/dist/api-docs-href.js +0 -1
- package/dist/components/api-section.svelte +58 -49
- package/dist/components/api-section.svelte.d.ts +24 -10
- package/dist/components/boundary.svelte +51 -0
- package/dist/components/boundary.svelte.d.ts +5 -0
- package/dist/components/connection-status.svelte +57 -61
- package/dist/components/connection-status.svelte.d.ts +5 -5
- package/dist/components/content-rect.svelte +10 -5
- package/dist/components/content-rect.svelte.d.ts +3 -1
- package/dist/components/error.svelte +15 -5
- package/dist/components/error.svelte.d.ts +8 -1
- package/dist/components/index.d.ts +4 -3
- package/dist/components/index.js +4 -3
- package/dist/components/is-moving.svelte +29 -35
- package/dist/components/is-moving.svelte.d.ts +6 -6
- package/dist/components/maplibre/index.svelte +5 -6
- package/dist/components/maplibre/index.svelte.d.ts +3 -1
- package/dist/components/pose-editor.svelte +83 -15
- package/dist/components/pose-editor.svelte.d.ts +11 -4
- package/dist/components/progress.svelte +1 -0
- package/dist/components/queries.svelte +14 -4
- package/dist/components/queries.svelte.d.ts +6 -1
- package/dist/components/query.svelte +11 -3
- package/dist/components/query.svelte.d.ts +6 -1
- package/dist/components/section/error-key.d.ts +2 -0
- package/dist/components/section/error-key.js +2 -0
- package/dist/components/section/index.d.ts +21 -0
- package/dist/components/section/index.js +21 -0
- package/dist/components/section/section-body.svelte +36 -0
- package/dist/components/section/section-body.svelte.d.ts +13 -0
- package/dist/components/section/section-error-reporter.d.ts +8 -0
- package/dist/components/section/section-error-reporter.js +7 -0
- package/dist/components/section/section-error.svelte +36 -0
- package/dist/components/section/section-error.svelte.d.ts +9 -0
- package/dist/components/section/section-errors.svelte +145 -0
- package/dist/components/section/section-errors.svelte.d.ts +6 -0
- package/dist/components/section/section-heading.svelte +21 -0
- package/dist/components/section/section-heading.svelte.d.ts +9 -0
- package/dist/components/section/section-loading.d.ts +4 -0
- package/dist/components/section/section-loading.js +10 -0
- package/dist/components/section/section-method.svelte +29 -0
- package/dist/components/section/section-method.svelte.d.ts +9 -0
- package/dist/components/section/section-placeholder.svelte +29 -0
- package/dist/components/section/section-placeholder.svelte.d.ts +7 -0
- package/dist/components/section/section-text.svelte +17 -0
- package/dist/components/section/section-text.svelte.d.ts +8 -0
- package/dist/components/section/section-tooltip.svelte +25 -0
- package/dist/components/section/section-tooltip.svelte.d.ts +7 -0
- package/dist/components/section/section.svelte +23 -0
- package/dist/components/section/section.svelte.d.ts +11 -0
- package/dist/components/section/use-section-errors.svelte.d.ts +19 -0
- package/dist/components/section/use-section-errors.svelte.js +49 -0
- package/dist/components/stop-button.svelte +1 -5
- package/dist/components/stop-button.svelte.d.ts +0 -1
- package/dist/components/stop.svelte +31 -14
- package/dist/components/stop.svelte.d.ts +6 -1
- package/dist/components/widgets/arm/arm.svelte +43 -40
- package/dist/components/widgets/arm/get-joint-positions-widget.svelte +10 -9
- package/dist/components/widgets/arm/joint-position-editor.svelte +105 -27
- package/dist/components/widgets/arm/joint-position-editor.svelte.d.ts +4 -3
- package/dist/components/widgets/arm/joint-position-slider.svelte +6 -2
- package/dist/components/widgets/arm/joint-position-slider.svelte.d.ts +2 -1
- package/dist/components/widgets/arm/manual-mode-widget.svelte +16 -6
- package/dist/components/widgets/arm/manual-mode.svelte +1 -5
- package/dist/components/widgets/arm/manual-mode.svelte.d.ts +0 -1
- package/dist/components/widgets/arm/move-to-joint-positions-widget.svelte +22 -8
- package/dist/components/widgets/arm/move-to-joint-positions.svelte +15 -17
- package/dist/components/widgets/arm/move-to-joint-positions.svelte.d.ts +0 -1
- package/dist/components/widgets/arm/move-to-position-control.svelte +45 -33
- package/dist/components/widgets/arm/move-to-position.svelte +97 -34
- package/dist/components/widgets/arm/move-to-position.svelte.d.ts +3 -2
- package/dist/components/widgets/arm/quick-move-widget.svelte +10 -4
- package/dist/components/widgets/arm/quick-move.svelte +1 -4
- package/dist/components/widgets/arm/quick-move.svelte.d.ts +0 -1
- package/dist/components/widgets/arm/use-arm-motion-tracking.svelte.d.ts +16 -0
- package/dist/components/widgets/arm/use-arm-motion-tracking.svelte.js +37 -0
- package/dist/components/widgets/arm/use-edited-targets.svelte.d.ts +9 -0
- package/dist/components/widgets/arm/use-edited-targets.svelte.js +24 -0
- package/dist/components/widgets/audio-input/audio-input.svelte +80 -77
- package/dist/components/widgets/audio-input/get-properties-widget.svelte +16 -16
- package/dist/components/widgets/audio-output/audio-output.svelte +87 -84
- package/dist/components/widgets/audio-output/get-properties-widget.svelte +16 -16
- package/dist/components/widgets/base/base.svelte +78 -43
- package/dist/components/widgets/base/move-straight-widget.svelte +16 -4
- package/dist/components/widgets/base/quick-move-widget.svelte +25 -9
- package/dist/components/widgets/base/quick-move.svelte +5 -6
- package/dist/components/widgets/base/set-power-widget.svelte +20 -8
- package/dist/components/widgets/base/set-power.svelte +6 -4
- package/dist/components/widgets/base/set-velocity-widget.svelte +20 -8
- package/dist/components/widgets/base/set-velocity.svelte +6 -4
- package/dist/components/widgets/base/spin-widget.svelte +20 -8
- package/dist/components/widgets/base/vec3-builder.svelte +3 -2
- package/dist/components/widgets/base/vec3-builder.svelte.d.ts +2 -1
- package/dist/components/widgets/board/analog-read.svelte +2 -4
- package/dist/components/widgets/board/analog-write.svelte +2 -4
- package/dist/components/widgets/board/gpio-read.svelte +2 -1
- package/dist/components/widgets/board/gpio-write.svelte +2 -1
- package/dist/components/widgets/board/pin-section.svelte +5 -6
- package/dist/components/widgets/board/pin-section.svelte.d.ts +3 -2
- package/dist/components/widgets/board/read-write-pins.svelte +2 -2
- package/dist/components/widgets/button/push.svelte +2 -2
- package/dist/components/widgets/camera/camera.svelte +17 -24
- package/dist/components/widgets/camera/live-or-polling-video.svelte +33 -30
- package/dist/components/widgets/custom-control/__tests__/__fixtures__/with-sibling.svelte +10 -0
- package/dist/components/widgets/custom-control/control-frame.svelte +60 -0
- package/dist/components/widgets/custom-control/control-frame.svelte.d.ts +10 -0
- package/dist/components/widgets/custom-control/create-control-host.svelte.d.ts +19 -0
- package/dist/components/widgets/custom-control/create-control-host.svelte.js +26 -0
- package/dist/components/widgets/custom-control/custom-control.d.ts +35 -0
- package/dist/components/widgets/custom-control/custom-control.js +85 -0
- package/dist/components/widgets/custom-control/custom-control.svelte +45 -0
- package/dist/components/widgets/custom-control/custom-control.svelte.d.ts +14 -0
- package/dist/components/widgets/discovery/discovery.svelte +13 -17
- package/dist/components/widgets/encoder/encoder.svelte +25 -21
- package/dist/components/widgets/encoder/get-position-widget.svelte +19 -16
- package/dist/components/widgets/gantry/gantry.svelte +58 -76
- package/dist/components/widgets/gantry/get-position-widget.svelte +15 -14
- package/dist/components/widgets/gantry/home.svelte +21 -10
- package/dist/components/widgets/gantry/move-to-position-widget.svelte +2 -1
- package/dist/components/widgets/gantry/move-to-position.svelte +1 -4
- package/dist/components/widgets/gantry/move-to-position.svelte.d.ts +0 -1
- package/dist/components/widgets/gantry/quick-move-widget.svelte +3 -2
- package/dist/components/widgets/gantry/quick-move.svelte +1 -5
- package/dist/components/widgets/gantry/quick-move.svelte.d.ts +0 -1
- package/dist/components/widgets/generic/generic.svelte +11 -6
- package/dist/components/widgets/gripper/grab-widget.svelte +26 -0
- package/dist/components/widgets/gripper/grab-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/gripper/grab.svelte +3 -19
- package/dist/components/widgets/gripper/grab.svelte.d.ts +1 -2
- package/dist/components/widgets/gripper/gripper.svelte +18 -18
- package/dist/components/widgets/gripper/is-holding-something.svelte +21 -21
- package/dist/components/widgets/gripper/open-widget.svelte +26 -0
- package/dist/components/widgets/gripper/open-widget.svelte.d.ts +7 -0
- package/dist/components/widgets/gripper/open.svelte +3 -19
- package/dist/components/widgets/gripper/open.svelte.d.ts +1 -2
- package/dist/components/widgets/input-controller/input-controller.svelte +10 -16
- package/dist/components/widgets/input-controller/webgamepad.svelte +2 -2
- package/dist/components/widgets/ml-model-service/ml-model-service.svelte +1 -1
- package/dist/components/widgets/motion/frame-select.svelte +4 -2
- package/dist/components/widgets/motion/frame-select.svelte.d.ts +2 -1
- package/dist/components/widgets/motion/motion.svelte +27 -31
- package/dist/components/widgets/motion/move-widget.svelte +32 -12
- package/dist/components/widgets/motion/move-widget.svelte.d.ts +6 -0
- package/dist/components/widgets/motion/move.svelte +6 -16
- package/dist/components/widgets/motion/move.svelte.d.ts +0 -1
- package/dist/components/widgets/motor/go-for-view.svelte +16 -8
- package/dist/components/widgets/motor/go-to-view.svelte +12 -4
- package/dist/components/widgets/motor/motor.svelte +100 -64
- package/dist/components/widgets/motor/quick-move-widget.svelte +16 -8
- package/dist/components/widgets/motor/set-power-widget.svelte +12 -4
- package/dist/components/widgets/motor/set-rpm-widget.svelte +12 -4
- package/dist/components/widgets/movement-sensor/get-accuracy-widget.svelte +8 -11
- package/dist/components/widgets/movement-sensor/get-compass-heading-widget.svelte +8 -11
- package/dist/components/widgets/movement-sensor/get-orientation-widget.svelte +8 -11
- package/dist/components/widgets/movement-sensor/get-position-widget.svelte +8 -11
- package/dist/components/widgets/movement-sensor/movement-sensor.svelte +64 -66
- package/dist/components/widgets/operations-and-sessions/operations-and-sessions.svelte +2 -1
- package/dist/components/widgets/power-sensor/get-current-widget.svelte +8 -11
- package/dist/components/widgets/power-sensor/get-power-widget.svelte +8 -11
- package/dist/components/widgets/power-sensor/get-voltage-widget.svelte +8 -11
- package/dist/components/widgets/power-sensor/power-sensor.svelte +35 -45
- package/dist/components/widgets/sensor/sensor.svelte +8 -12
- package/dist/components/widgets/servo/move-widget.svelte +2 -1
- package/dist/components/widgets/servo/move.svelte +1 -4
- package/dist/components/widgets/servo/move.svelte.d.ts +0 -1
- package/dist/components/widgets/servo/quick-move-widget.svelte +2 -1
- package/dist/components/widgets/servo/quick-move.svelte +1 -5
- package/dist/components/widgets/servo/quick-move.svelte.d.ts +0 -1
- package/dist/components/widgets/servo/servo.svelte +53 -37
- package/dist/components/widgets/slam/get-position-widget.svelte +8 -11
- package/dist/components/widgets/slam/move-on-map.svelte +9 -6
- package/dist/components/widgets/slam/move-on-map.svelte.d.ts +2 -1
- package/dist/components/widgets/slam/slam.svelte +65 -75
- package/dist/components/widgets/switch/position-view.svelte +1 -1
- package/dist/components/widgets/switch/position.svelte +2 -2
- package/dist/components/widgets/switch/switch.svelte +1 -1
- package/dist/components/widgets/vision-service/detection-row.svelte +4 -2
- package/dist/components/widgets/vision-service/detection-row.svelte.d.ts +2 -1
- package/dist/components/widgets/vision-service/fonts/public-sans.json +1 -0
- package/dist/components/widgets/vision-service/fonts/public-sans.png +0 -0
- package/dist/components/widgets/vision-service/image.svelte +4 -4
- package/dist/components/widgets/vision-service/legend.svelte +4 -4
- package/dist/components/widgets/vision-service/public-sans-font.d.ts +5 -0
- package/dist/components/widgets/vision-service/public-sans-font.js +14 -0
- package/dist/components/widgets/vision-service/vision-service.svelte +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +0 -1
- package/package.json +19 -5
- package/dist/components/board/pin-section.svelte +0 -28
- package/dist/components/board/pin-section.svelte.d.ts +0 -9
- package/dist/components/mutation-section.svelte +0 -73
- package/dist/components/mutation-section.svelte.d.ts +0 -16
- package/dist/components/mutation-view.svelte +0 -29
- package/dist/components/mutation-view.svelte.d.ts +0 -10
- package/dist/components/section-group.svelte +0 -64
- package/dist/components/section-group.svelte.d.ts +0 -14
- package/dist/components/section-title.svelte +0 -63
- package/dist/components/section-title.svelte.d.ts +0 -14
|
@@ -9,9 +9,8 @@
|
|
|
9
9
|
import ReadingsList from '../../readings-list.svelte'
|
|
10
10
|
import RefetchController from '../../refetch-controller.svelte'
|
|
11
11
|
import { createRefetchIntervalStore } from '../../refetch-interval-store.svelte'
|
|
12
|
-
import
|
|
13
|
-
|
|
14
|
-
const MS_API = 'rdk:component:movement_sensor'
|
|
12
|
+
import { Section } from '../../section'
|
|
13
|
+
import { ResourceTriplets } from '../../../resource-triplet'
|
|
15
14
|
|
|
16
15
|
import Accuracy from './accuracy.svelte'
|
|
17
16
|
import CompassHeading from './compass-heading.svelte'
|
|
@@ -86,8 +85,6 @@
|
|
|
86
85
|
enabled: showFullReadings,
|
|
87
86
|
refetchInterval: refetchInterval.current,
|
|
88
87
|
}))
|
|
89
|
-
|
|
90
|
-
const headingID = $props.id()
|
|
91
88
|
</script>
|
|
92
89
|
|
|
93
90
|
<ConnectionStatus {partID}>
|
|
@@ -101,20 +98,22 @@
|
|
|
101
98
|
|
|
102
99
|
<Query
|
|
103
100
|
query={propertiesQuery}
|
|
104
|
-
|
|
101
|
+
class="h-14 p-4"
|
|
105
102
|
>
|
|
106
103
|
<div class="@container">
|
|
107
104
|
<div class="flex flex-wrap text-xs @4xl:flex-nowrap">
|
|
108
105
|
<div class="flex w-full flex-col gap-5 py-4 pr-6 pl-4 @4xl:w-1/4">
|
|
109
106
|
{#if propertiesQuery.data?.positionSupported}
|
|
110
107
|
<div class="flex flex-col gap-2">
|
|
111
|
-
<
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
108
|
+
<Section.Heading>
|
|
109
|
+
<Section.Method
|
|
110
|
+
method="GetPosition"
|
|
111
|
+
api={ResourceTriplets.MovementSensor}
|
|
112
|
+
/>
|
|
113
|
+
</Section.Heading>
|
|
115
114
|
<Query
|
|
116
115
|
query={positionQuery}
|
|
117
|
-
|
|
116
|
+
class="h-6"
|
|
118
117
|
>
|
|
119
118
|
{#if positionQuery.data !== undefined}
|
|
120
119
|
<Position data={positionQuery.data} />
|
|
@@ -125,16 +124,16 @@
|
|
|
125
124
|
|
|
126
125
|
{#if propertiesQuery.data?.orientationSupported}
|
|
127
126
|
<div class="flex flex-col gap-2">
|
|
128
|
-
<
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
</
|
|
127
|
+
<Section.Heading>
|
|
128
|
+
<Section.Method
|
|
129
|
+
method="GetOrientation"
|
|
130
|
+
api={ResourceTriplets.MovementSensor}
|
|
131
|
+
/>
|
|
132
|
+
<span class="text-subtle-2 text-xs font-normal">(º)</span>
|
|
133
|
+
</Section.Heading>
|
|
135
134
|
<Query
|
|
136
135
|
query={orientationQuery}
|
|
137
|
-
|
|
136
|
+
class="h-6"
|
|
138
137
|
>
|
|
139
138
|
{#if orientationQuery.data !== undefined}
|
|
140
139
|
<Orientation data={orientationQuery.data} />
|
|
@@ -145,16 +144,16 @@
|
|
|
145
144
|
|
|
146
145
|
{#if propertiesQuery.data?.compassHeadingSupported}
|
|
147
146
|
<div class="flex flex-col gap-2">
|
|
148
|
-
<
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
</
|
|
147
|
+
<Section.Heading>
|
|
148
|
+
<Section.Method
|
|
149
|
+
method="GetCompassHeading"
|
|
150
|
+
api={ResourceTriplets.MovementSensor}
|
|
151
|
+
/>
|
|
152
|
+
<span class="text-subtle-2 text-xs font-normal">(º)</span>
|
|
153
|
+
</Section.Heading>
|
|
155
154
|
<Query
|
|
156
155
|
query={compassHeadingQuery}
|
|
157
|
-
|
|
156
|
+
class="h-6"
|
|
158
157
|
>
|
|
159
158
|
{#if compassHeadingQuery.data !== undefined}
|
|
160
159
|
<CompassHeading data={compassHeadingQuery.data} />
|
|
@@ -167,16 +166,16 @@
|
|
|
167
166
|
<div class="flex w-full flex-col gap-5 p-4 @4xl:w-1/4">
|
|
168
167
|
{#if propertiesQuery.data?.angularVelocitySupported}
|
|
169
168
|
<div class="flex flex-col gap-2">
|
|
170
|
-
<
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
</
|
|
169
|
+
<Section.Heading>
|
|
170
|
+
<Section.Method
|
|
171
|
+
method="GetAngularVelocity"
|
|
172
|
+
api={ResourceTriplets.MovementSensor}
|
|
173
|
+
/>
|
|
174
|
+
<span class="text-subtle-2 text-xs font-normal">(º/s)</span>
|
|
175
|
+
</Section.Heading>
|
|
177
176
|
<Query
|
|
178
177
|
query={angularVelocityQuery}
|
|
179
|
-
|
|
178
|
+
class="h-6"
|
|
180
179
|
>
|
|
181
180
|
{#if angularVelocityQuery.data !== undefined}
|
|
182
181
|
<Vector3 data={angularVelocityQuery.data} />
|
|
@@ -187,16 +186,16 @@
|
|
|
187
186
|
|
|
188
187
|
{#if propertiesQuery.data?.linearVelocitySupported}
|
|
189
188
|
<div class="flex flex-col gap-2">
|
|
190
|
-
<
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
</
|
|
189
|
+
<Section.Heading>
|
|
190
|
+
<Section.Method
|
|
191
|
+
method="GetLinearVelocity"
|
|
192
|
+
api={ResourceTriplets.MovementSensor}
|
|
193
|
+
/>
|
|
194
|
+
<span class="text-subtle-2 text-xs font-normal">(m/s)</span>
|
|
195
|
+
</Section.Heading>
|
|
197
196
|
<Query
|
|
198
197
|
query={linearVelocityQuery}
|
|
199
|
-
|
|
198
|
+
class="h-6"
|
|
200
199
|
>
|
|
201
200
|
{#if linearVelocityQuery.data !== undefined}
|
|
202
201
|
<Vector3 data={linearVelocityQuery.data} />
|
|
@@ -207,17 +206,16 @@
|
|
|
207
206
|
|
|
208
207
|
{#if propertiesQuery.data?.linearAccelerationSupported}
|
|
209
208
|
<div class="flex flex-col gap-2">
|
|
210
|
-
<
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
</SectionTitle>
|
|
209
|
+
<Section.Heading>
|
|
210
|
+
<Section.Method
|
|
211
|
+
method="GetLinearAcceleration"
|
|
212
|
+
api={ResourceTriplets.MovementSensor}
|
|
213
|
+
/>
|
|
214
|
+
<span class="text-subtle-2 text-xs font-normal">(m/s<sup>2</sup>)</span>
|
|
215
|
+
</Section.Heading>
|
|
218
216
|
<Query
|
|
219
217
|
query={linearAccelerationQuery}
|
|
220
|
-
|
|
218
|
+
class="h-6"
|
|
221
219
|
>
|
|
222
220
|
{#if linearAccelerationQuery.data !== undefined}
|
|
223
221
|
<Vector3 data={linearAccelerationQuery.data} />
|
|
@@ -227,13 +225,15 @@
|
|
|
227
225
|
{/if}
|
|
228
226
|
|
|
229
227
|
<div class="flex flex-col gap-2">
|
|
230
|
-
<
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
228
|
+
<Section.Heading>
|
|
229
|
+
<Section.Method
|
|
230
|
+
method="GetAccuracy"
|
|
231
|
+
api={ResourceTriplets.MovementSensor}
|
|
232
|
+
/>
|
|
233
|
+
</Section.Heading>
|
|
234
234
|
<Query
|
|
235
235
|
query={accuracyQuery}
|
|
236
|
-
|
|
236
|
+
class="h-6"
|
|
237
237
|
>
|
|
238
238
|
{#if accuracyQuery.data !== undefined}
|
|
239
239
|
<Accuracy data={accuracyQuery.data} />
|
|
@@ -252,16 +252,14 @@
|
|
|
252
252
|
</div>
|
|
253
253
|
</Query>
|
|
254
254
|
|
|
255
|
-
<section
|
|
256
|
-
class="flex flex-col gap-4 p-4"
|
|
257
|
-
aria-labelledby={headingID}
|
|
258
|
-
>
|
|
255
|
+
<section class="flex flex-col gap-4 p-4">
|
|
259
256
|
<div class="flex flex-col gap-0.5">
|
|
260
|
-
<
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
257
|
+
<Section.Heading>
|
|
258
|
+
<Section.Method
|
|
259
|
+
method="GetReadings"
|
|
260
|
+
api={ResourceTriplets.MovementSensor}
|
|
261
|
+
/>
|
|
262
|
+
</Section.Heading>
|
|
265
263
|
<p class="text-subtle-2 text-xs">Get all the measurements and data from the sensor</p>
|
|
266
264
|
</div>
|
|
267
265
|
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import { slide } from 'svelte/transition'
|
|
5
5
|
|
|
6
6
|
import ErrorDisplay from '../../error.svelte'
|
|
7
|
+
import { Section } from '../../section'
|
|
7
8
|
|
|
8
9
|
import OperationsTable from './operations-table.svelte'
|
|
9
10
|
import RttPill from './rtt-pill.svelte'
|
|
@@ -98,7 +99,7 @@
|
|
|
98
99
|
/>
|
|
99
100
|
{/if}
|
|
100
101
|
<ErrorDisplay lastError={operationsQuery.error} />
|
|
101
|
-
<
|
|
102
|
+
<Section.Error error={cancelOperationMutation.error} />
|
|
102
103
|
</div>
|
|
103
104
|
<div class="flex h-max flex-col gap-2">
|
|
104
105
|
<span class="text-default text-sm font-semibold">Sessions</span>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { createResourceClient, createResourceQuery } from '@viamrobotics/svelte-sdk'
|
|
4
4
|
|
|
5
5
|
import ApiSection from '../../api-section.svelte'
|
|
6
|
-
import
|
|
6
|
+
import { ResourceTriplets } from '../../../resource-triplet'
|
|
7
7
|
|
|
8
8
|
import CurrentReading from './current-reading.svelte'
|
|
9
9
|
|
|
@@ -24,15 +24,12 @@
|
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
<ApiSection
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
queries={[query]}
|
|
28
|
+
method="GetCurrent"
|
|
29
|
+
api={ResourceTriplets.PowerSensor}
|
|
30
|
+
class="grow flex-col gap-4"
|
|
29
31
|
>
|
|
30
|
-
|
|
31
|
-
{query}
|
|
32
|
-
|
|
33
|
-
>
|
|
34
|
-
{#if query.data !== undefined}
|
|
35
|
-
<CurrentReading data={query.data} />
|
|
36
|
-
{/if}
|
|
37
|
-
</Query>
|
|
32
|
+
{#if query.data !== undefined}
|
|
33
|
+
<CurrentReading data={query.data} />
|
|
34
|
+
{/if}
|
|
38
35
|
</ApiSection>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { createResourceClient, createResourceQuery } from '@viamrobotics/svelte-sdk'
|
|
4
4
|
|
|
5
5
|
import ApiSection from '../../api-section.svelte'
|
|
6
|
-
import
|
|
6
|
+
import { ResourceTriplets } from '../../../resource-triplet'
|
|
7
7
|
|
|
8
8
|
import PowerReading from './power-reading.svelte'
|
|
9
9
|
|
|
@@ -24,15 +24,12 @@
|
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
<ApiSection
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
queries={[query]}
|
|
28
|
+
method="GetPower"
|
|
29
|
+
api={ResourceTriplets.PowerSensor}
|
|
30
|
+
class="grow flex-col gap-4"
|
|
29
31
|
>
|
|
30
|
-
|
|
31
|
-
{query}
|
|
32
|
-
|
|
33
|
-
>
|
|
34
|
-
{#if query.data !== undefined}
|
|
35
|
-
<PowerReading data={query.data} />
|
|
36
|
-
{/if}
|
|
37
|
-
</Query>
|
|
32
|
+
{#if query.data !== undefined}
|
|
33
|
+
<PowerReading data={query.data} />
|
|
34
|
+
{/if}
|
|
38
35
|
</ApiSection>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { createResourceClient, createResourceQuery } from '@viamrobotics/svelte-sdk'
|
|
4
4
|
|
|
5
5
|
import ApiSection from '../../api-section.svelte'
|
|
6
|
-
import
|
|
6
|
+
import { ResourceTriplets } from '../../../resource-triplet'
|
|
7
7
|
|
|
8
8
|
import VoltageReading from './voltage-reading.svelte'
|
|
9
9
|
|
|
@@ -24,15 +24,12 @@
|
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
<ApiSection
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
queries={[query]}
|
|
28
|
+
method="GetVoltage"
|
|
29
|
+
api={ResourceTriplets.PowerSensor}
|
|
30
|
+
class="grow flex-col gap-4"
|
|
29
31
|
>
|
|
30
|
-
|
|
31
|
-
{query}
|
|
32
|
-
|
|
33
|
-
>
|
|
34
|
-
{#if query.data !== undefined}
|
|
35
|
-
<VoltageReading data={query.data} />
|
|
36
|
-
{/if}
|
|
37
|
-
</Query>
|
|
32
|
+
{#if query.data !== undefined}
|
|
33
|
+
<VoltageReading data={query.data} />
|
|
34
|
+
{/if}
|
|
38
35
|
</ApiSection>
|
|
@@ -6,10 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
import ApiSection from '../../api-section.svelte'
|
|
8
8
|
import ConnectionStatus from '../../connection-status.svelte'
|
|
9
|
-
import Query from '../../query.svelte'
|
|
10
9
|
import ReadingsList from '../../readings-list.svelte'
|
|
11
10
|
import RefetchController from '../../refetch-controller.svelte'
|
|
12
11
|
import { createRefetchIntervalStore } from '../../refetch-interval-store.svelte'
|
|
12
|
+
import { Section } from '../../section'
|
|
13
|
+
import { ResourceTriplets } from '../../../resource-triplet'
|
|
13
14
|
|
|
14
15
|
import CurrentReading from './current-reading.svelte'
|
|
15
16
|
import PowerReading from './power-reading.svelte'
|
|
@@ -66,55 +67,49 @@
|
|
|
66
67
|
<div class="@container">
|
|
67
68
|
<div class="grid w-full grid-cols-1 divide-y @2xl:grid-cols-3 @2xl:divide-x @2xl:divide-y-0">
|
|
68
69
|
<ApiSection
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
queries={[currentQuery]}
|
|
71
|
+
method="GetCurrent"
|
|
72
|
+
api={ResourceTriplets.PowerSensor}
|
|
73
|
+
class="grow flex-col gap-4 pb-5"
|
|
72
74
|
>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
>
|
|
77
|
-
{#if currentQuery.data !== undefined}
|
|
78
|
-
<CurrentReading data={currentQuery.data} />
|
|
79
|
-
{/if}
|
|
80
|
-
</Query>
|
|
75
|
+
{#if currentQuery.data !== undefined}
|
|
76
|
+
<CurrentReading data={currentQuery.data} />
|
|
77
|
+
{/if}
|
|
81
78
|
</ApiSection>
|
|
82
79
|
<ApiSection
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
80
|
+
queries={[voltageQuery]}
|
|
81
|
+
method="GetVoltage"
|
|
82
|
+
api={ResourceTriplets.PowerSensor}
|
|
83
|
+
class="grow flex-col gap-4 pb-5"
|
|
86
84
|
>
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
>
|
|
91
|
-
{#if voltageQuery.data !== undefined}
|
|
92
|
-
<VoltageReading data={voltageQuery.data} />
|
|
93
|
-
{/if}
|
|
94
|
-
</Query>
|
|
85
|
+
{#if voltageQuery.data !== undefined}
|
|
86
|
+
<VoltageReading data={voltageQuery.data} />
|
|
87
|
+
{/if}
|
|
95
88
|
</ApiSection>
|
|
96
89
|
<ApiSection
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
90
|
+
queries={[powerQuery]}
|
|
91
|
+
method="GetPower"
|
|
92
|
+
api={ResourceTriplets.PowerSensor}
|
|
93
|
+
class="grow flex-col gap-4 pb-5"
|
|
100
94
|
>
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
>
|
|
105
|
-
{#if powerQuery.data !== undefined}
|
|
106
|
-
<PowerReading data={powerQuery.data} />
|
|
107
|
-
{/if}
|
|
108
|
-
</Query>
|
|
95
|
+
{#if powerQuery.data !== undefined}
|
|
96
|
+
<PowerReading data={powerQuery.data} />
|
|
97
|
+
{/if}
|
|
109
98
|
</ApiSection>
|
|
110
99
|
</div>
|
|
111
100
|
</div>
|
|
112
101
|
|
|
113
102
|
<ApiSection
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
103
|
+
queries={[readingsQuery]}
|
|
104
|
+
class="grow flex-col gap-4"
|
|
105
|
+
method="GetReadings"
|
|
106
|
+
api={ResourceTriplets.PowerSensor}
|
|
117
107
|
>
|
|
108
|
+
{#snippet subheading()}
|
|
109
|
+
<Section.Text>
|
|
110
|
+
Get all the measurements and data that this power sensor provides
|
|
111
|
+
</Section.Text>
|
|
112
|
+
{/snippet}
|
|
118
113
|
<Switch
|
|
119
114
|
bind:on={isGetReadingsEnabled}
|
|
120
115
|
cx="text-subtle-2"
|
|
@@ -125,14 +120,9 @@
|
|
|
125
120
|
transition:slide={{ duration: 150 }}
|
|
126
121
|
class="pt-2"
|
|
127
122
|
>
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
>
|
|
132
|
-
{#if readingsQuery.data !== undefined}
|
|
133
|
-
<ReadingsList data={readingsQuery.data} />
|
|
134
|
-
{/if}
|
|
135
|
-
</Query>
|
|
123
|
+
{#if readingsQuery.data !== undefined}
|
|
124
|
+
<ReadingsList data={readingsQuery.data} />
|
|
125
|
+
{/if}
|
|
136
126
|
</div>
|
|
137
127
|
{/if}
|
|
138
128
|
</ApiSection>
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import ApiSection from '../../api-section.svelte'
|
|
6
6
|
import ConnectionStatus from '../../connection-status.svelte'
|
|
7
|
-
import Query from '../../query.svelte'
|
|
8
7
|
import ReadingsList from '../../readings-list.svelte'
|
|
9
8
|
import RefetchController from '../../refetch-controller.svelte'
|
|
10
9
|
import { createRefetchIntervalStore } from '../../refetch-interval-store.svelte'
|
|
10
|
+
import { ResourceTriplets } from '../../../resource-triplet'
|
|
11
11
|
|
|
12
12
|
interface Props {
|
|
13
13
|
partID: string
|
|
@@ -43,18 +43,14 @@
|
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
<ApiSection
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
46
|
+
queries={[readingsQuery]}
|
|
47
|
+
method="GetReadings"
|
|
48
|
+
api={ResourceTriplets.Sensor}
|
|
49
|
+
class="relative grow flex-col gap-4"
|
|
49
50
|
>
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
>
|
|
54
|
-
{#if readingsQuery.data !== undefined}
|
|
55
|
-
<ReadingsList data={readingsQuery.data} />
|
|
56
|
-
{/if}
|
|
57
|
-
</Query>
|
|
51
|
+
{#if readingsQuery.data !== undefined}
|
|
52
|
+
<ReadingsList data={readingsQuery.data} />
|
|
53
|
+
{/if}
|
|
58
54
|
</ApiSection>
|
|
59
55
|
{/snippet}
|
|
60
56
|
</ConnectionStatus>
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
} from '@viamrobotics/svelte-sdk'
|
|
8
8
|
|
|
9
9
|
import Query from '../../query.svelte'
|
|
10
|
+
import { Section } from '../../section'
|
|
10
11
|
|
|
11
12
|
import Move from './move.svelte'
|
|
12
13
|
|
|
@@ -38,7 +39,7 @@
|
|
|
38
39
|
<Move
|
|
39
40
|
currentPosition={positionQuery.data}
|
|
40
41
|
{moveTo}
|
|
41
|
-
lastError={moveMutation.error}
|
|
42
42
|
/>
|
|
43
43
|
{/if}
|
|
44
44
|
</Query>
|
|
45
|
+
<Section.Error error={moveMutation.error} />
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Button, Icon, Label, NumericInput, Tooltip } from '@viamrobotics/prime-core'
|
|
3
3
|
|
|
4
|
-
import ErrorDisplay from '../../error.svelte'
|
|
5
4
|
import { numberValueFromEvent } from '../../../event-handlers'
|
|
6
5
|
|
|
7
6
|
interface Props {
|
|
8
7
|
currentPosition: number
|
|
9
8
|
moveTo: (angle: number) => void
|
|
10
|
-
lastError: Error | null
|
|
11
9
|
}
|
|
12
10
|
|
|
13
|
-
const { currentPosition, moveTo
|
|
11
|
+
const { currentPosition, moveTo }: Props = $props()
|
|
14
12
|
|
|
15
13
|
let desiredAngle = $state(0)
|
|
16
14
|
|
|
@@ -99,4 +97,3 @@
|
|
|
99
97
|
Execute
|
|
100
98
|
</Button>
|
|
101
99
|
</div>
|
|
102
|
-
<ErrorDisplay {lastError} />
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
} from '@viamrobotics/svelte-sdk'
|
|
8
8
|
|
|
9
9
|
import Query from '../../query.svelte'
|
|
10
|
+
import { Section } from '../../section'
|
|
10
11
|
|
|
11
12
|
import QuickMove from './quick-move.svelte'
|
|
12
13
|
|
|
@@ -38,7 +39,7 @@
|
|
|
38
39
|
<QuickMove
|
|
39
40
|
currentPosition={positionQuery.data}
|
|
40
41
|
moveTo={quickMoveTo}
|
|
41
|
-
lastError={quickMoveMutation.error}
|
|
42
42
|
/>
|
|
43
43
|
{/if}
|
|
44
44
|
</Query>
|
|
45
|
+
<Section.Error error={quickMoveMutation.error} />
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { Button } from '@viamrobotics/prime-core'
|
|
3
3
|
|
|
4
|
-
import ErrorDisplay from '../../error.svelte'
|
|
5
|
-
|
|
6
4
|
interface Props {
|
|
7
5
|
currentPosition: number
|
|
8
6
|
moveTo: (angle: number) => void
|
|
9
|
-
lastError: Error | null
|
|
10
7
|
}
|
|
11
8
|
|
|
12
|
-
const { currentPosition, moveTo
|
|
9
|
+
const { currentPosition, moveTo }: Props = $props()
|
|
13
10
|
</script>
|
|
14
11
|
|
|
15
12
|
<div class="flex flex-row gap-4 text-xs">
|
|
@@ -31,4 +28,3 @@
|
|
|
31
28
|
<abbr class="text-subtle-2">º</abbr>
|
|
32
29
|
</Button>
|
|
33
30
|
</div>
|
|
34
|
-
<ErrorDisplay {lastError} />
|