Skip to content

Commit

Permalink
RSDK-1847 update typescript wrappers (viamrobotics#1985)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximpertsov authored and biotinker committed Mar 16, 2023
1 parent 96c9bf5 commit 547ce31
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 22 deletions.
22 changes: 15 additions & 7 deletions web/frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@mdi/js": "^6.9.96",
"@viamrobotics/prime": "^0.1.2",
"@viamrobotics/rpc": "^0.1.34",
"@viamrobotics/sdk": "^0.0.25",
"@viamrobotics/sdk": "^0.0.26",
"@vitejs/plugin-vue": "^3.1.2",
"@vueuse/core": "^9.3.1",
"eslint-import-resolver-custom-alias": "^1.3.0",
Expand Down
12 changes: 4 additions & 8 deletions web/frontend/src/components/base.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,8 @@ const digestInput = async () => {
}
}
const linear = new commonApi.Vector3();
const angular = new commonApi.Vector3();
linear.setY(linearValue);
angular.setZ(angularValue);
const linear = { x: 0, y: linearValue, z: 0 };
const angular = { x: 0, y: 0, z: angularValue };
try {
await baseClient.setPower(linear, angular);
} catch (error) {
Expand Down Expand Up @@ -161,9 +158,8 @@ const handleBaseStraight = async (event: {
movementType: MovementTypes
}) => {
if (event.movementType === 'Continuous') {
const linear = new commonApi.Vector3();
const angular = new commonApi.Vector3();
linear.setY(event.speed * event.direction);
const linear = { x: 0, y: event.speed * event.direction, z: 0 };
const angular = { x: 0, y: 0, z: 0 };
try {
await baseClient.setVelocity(linear, angular);
Expand Down
5 changes: 2 additions & 3 deletions web/frontend/src/components/camera/camera.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { displayError } from '../../lib/error';
import {
StreamClient,
CameraClient,
Camera,
Client,
commonApi,
ServiceError,
Expand Down Expand Up @@ -84,7 +83,7 @@ const viewCamera = async (isOn: boolean) => {
const viewFrame = async (cameraName: string) => {
let blob;
try {
blob = await new CameraClient(props.client, cameraName).renderFrame(Camera.MimeType.JPEG);
blob = await new CameraClient(props.client, cameraName).renderFrame('image/jpeg');
} catch (error) {
displayError(error as ServiceError);
return;
Expand Down Expand Up @@ -137,7 +136,7 @@ const exportScreenshot = async (cameraName: string) => {
let blob;
try {
blob = await new CameraClient(props.client, cameraName).renderFrame(
Camera.MimeType.JPEG
'image/jpeg'
);
} catch (error) {
displayError(error as ServiceError);
Expand Down
2 changes: 1 addition & 1 deletion web/frontend/src/components/motor-detail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const motorRun = () => {
const motorStop = async () => {
try {
await motorClient.motorStop();
await motorClient.stop();
} catch (error) {
displayError(error as ServiceError);
}
Expand Down
2 changes: 1 addition & 1 deletion web/runtime-shared/static/control.js

Large diffs are not rendered by default.

Loading

0 comments on commit 547ce31

Please sign in to comment.