Skip to content

Commit

Permalink
fix: delete pose
Browse files Browse the repository at this point in the history
  • Loading branch information
rise0chen committed Mar 6, 2024
1 parent 6f7adf0 commit b44322a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
license-file = "LICENSE"
name = "lebai_sdk"
repository = "https://github.com/lebai-robotics/lebai-sdk.rs"
version = "0.2.12"
version = "0.2.13"

[workspace]
members = [
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ pub mod lebai_sdk {
}
#[classmethod]
#[cmod::tags(args(pose))]
pub async fn save_pose(&self, name: String, pose: Pose, dir: Option<String>) -> Result<()> {
pub async fn save_pose(&self, name: String, pose: Option<Pose>, dir: Option<String>) -> Result<()> {
self.0.save_pose(name, pose, dir).await
}
#[classmethod]
Expand Down
4 changes: 2 additions & 2 deletions src/rpc/posture.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ impl Robot {
Ok(pose.into())
}

pub async fn save_pose(&self, name: String, pose: Pose, dir: Option<String>) -> Result<()> {
pub async fn save_pose(&self, name: String, pose: Option<Pose>, dir: Option<String>) -> Result<()> {
let req = SavePoseRequest {
name,
dir: dir.unwrap_or_default(),
data: Some(pose.into()),
data: pose.map(Into::into),
};
self.c.save_pose(Some(req)).await.map_err(|e| e.to_string())?;
Ok(())
Expand Down

0 comments on commit b44322a

Please sign in to comment.