From 12c8246fcdb961e87af6965831f32f1ea1bee363 Mon Sep 17 00:00:00 2001 From: beni69 <73666440+beni69@users.noreply.github.com> Date: Sun, 6 Aug 2023 17:28:55 +0200 Subject: [PATCH] release: v0.0.2 --- node-ffi/index.d.ts | 1 + node-ffi/npm/darwin-x64/package.json | 2 +- node-ffi/npm/linux-arm-gnueabihf/package.json | 2 +- node-ffi/npm/linux-arm64-gnu/package.json | 2 +- node-ffi/npm/linux-x64-gnu/package.json | 2 +- node-ffi/npm/linux-x64-musl/package.json | 2 +- node-ffi/npm/win32-x64-msvc/package.json | 2 +- node-ffi/package.json | 6 ++++-- node-ffi/src/lib.rs | 5 +++++ 9 files changed, 16 insertions(+), 8 deletions(-) diff --git a/node-ffi/index.d.ts b/node-ffi/index.d.ts index be6273a..b449657 100644 --- a/node-ffi/index.d.ts +++ b/node-ffi/index.d.ts @@ -33,6 +33,7 @@ export class Robot { nop(): Promise getUptime(): Promise drive(left: number, right: number): Promise + stop(): Promise led(r: boolean, g: boolean, b: boolean): Promise rolandServo(degree: number): Promise buzzer(pw: number): Promise diff --git a/node-ffi/npm/darwin-x64/package.json b/node-ffi/npm/darwin-x64/package.json index 0d7513e..e3ad627 100644 --- a/node-ffi/npm/darwin-x64/package.json +++ b/node-ffi/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@kareszklub/roblib-client-node-darwin-x64", - "version": "0.0.1", + "version": "0.0.2", "repository": { "url": "https://github.com/kareszklub/roblib-rs" }, diff --git a/node-ffi/npm/linux-arm-gnueabihf/package.json b/node-ffi/npm/linux-arm-gnueabihf/package.json index b34a11c..1bf8e85 100644 --- a/node-ffi/npm/linux-arm-gnueabihf/package.json +++ b/node-ffi/npm/linux-arm-gnueabihf/package.json @@ -1,6 +1,6 @@ { "name": "@kareszklub/roblib-client-node-linux-arm-gnueabihf", - "version": "0.0.1", + "version": "0.0.2", "repository": { "url": "https://github.com/kareszklub/roblib-rs" }, diff --git a/node-ffi/npm/linux-arm64-gnu/package.json b/node-ffi/npm/linux-arm64-gnu/package.json index 578f69e..cbba51f 100644 --- a/node-ffi/npm/linux-arm64-gnu/package.json +++ b/node-ffi/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@kareszklub/roblib-client-node-linux-arm64-gnu", - "version": "0.0.1", + "version": "0.0.2", "repository": { "url": "https://github.com/kareszklub/roblib-rs" }, diff --git a/node-ffi/npm/linux-x64-gnu/package.json b/node-ffi/npm/linux-x64-gnu/package.json index 662e55e..c314dbc 100644 --- a/node-ffi/npm/linux-x64-gnu/package.json +++ b/node-ffi/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@kareszklub/roblib-client-node-linux-x64-gnu", - "version": "0.0.1", + "version": "0.0.2", "repository": { "url": "https://github.com/kareszklub/roblib-rs" }, diff --git a/node-ffi/npm/linux-x64-musl/package.json b/node-ffi/npm/linux-x64-musl/package.json index 11e069f..0a27115 100644 --- a/node-ffi/npm/linux-x64-musl/package.json +++ b/node-ffi/npm/linux-x64-musl/package.json @@ -1,6 +1,6 @@ { "name": "@kareszklub/roblib-client-node-linux-x64-musl", - "version": "0.0.1", + "version": "0.0.2", "repository": { "url": "https://github.com/kareszklub/roblib-rs" }, diff --git a/node-ffi/npm/win32-x64-msvc/package.json b/node-ffi/npm/win32-x64-msvc/package.json index d11997b..02a9f42 100644 --- a/node-ffi/npm/win32-x64-msvc/package.json +++ b/node-ffi/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@kareszklub/roblib-client-node-win32-x64-msvc", - "version": "0.0.1", + "version": "0.0.2", "repository": { "url": "https://github.com/kareszklub/roblib-rs" }, diff --git a/node-ffi/package.json b/node-ffi/package.json index 4cbf804..f58d7db 100644 --- a/node-ffi/package.json +++ b/node-ffi/package.json @@ -1,6 +1,6 @@ { "name": "@kareszklub/roblib-client-node", - "version": "0.0.1", + "version": "0.0.2", "main": "index.js", "types": "index.d.ts", "repository": { @@ -32,5 +32,7 @@ "universal": "napi universal", "version": "napi version" }, - "exclude": ["test.*js"] + "exclude": [ + "test.*js" + ] } diff --git a/node-ffi/src/lib.rs b/node-ffi/src/lib.rs index ca4e660..d06e02d 100644 --- a/node-ffi/src/lib.rs +++ b/node-ffi/src/lib.rs @@ -146,6 +146,11 @@ impl JsRobot { Ok(self.robot.drive(left, right).await?) } + #[napi] + pub async fn stop(&self) -> Result<()> { + Ok(self.robot.stop().await?) + } + #[napi] pub async fn led(&self, r: bool, g: bool, b: bool) -> Result<()> { Ok(self.robot.led(r, g, b).await?)