Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
s5suzuki committed Dec 14, 2023
2 parents 43e86c2 + 4f509a9 commit 5a3f8f4
Show file tree
Hide file tree
Showing 33 changed files with 1,345 additions and 400 deletions.
1 change: 0 additions & 1 deletion .github/actions/setup-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ runs:
using: "composite"
steps:
- name: Setup Python
if: needs.check-src.outputs.status
uses: actions/setup-python@v4
with:
python-version: "3.12"
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,13 @@ jobs:
- name: Rust cache
if: needs.check-src.outputs.status
uses: swatinem/rust-cache@v2
with:
workspaces: './src -> target'

- name: Setup
if: needs.check-src.outputs.status
uses: ./.github/actions/setup-build
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
os: ${{ matrix.os }}
shaderc: false

- name: Test src on ${{ matrix.os }}
if: needs.check-src.outputs.status
Expand All @@ -75,16 +72,13 @@ jobs:
- name: Rust cache
if: needs.check-src.outputs.status
uses: swatinem/rust-cache@v2
with:
workspaces: './src -> target'

- name: Setup
if: needs.check-src.outputs.status
uses: ./.github/actions/setup-build
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
os: ${{ matrix.os }}
shaderc: false

- name: Test src for unity on ${{ matrix.os }}
if: needs.check-src.outputs.status
Expand Down Expand Up @@ -112,8 +106,6 @@ jobs:
- name: Rust cache
if: needs.check-src.outputs.status
uses: swatinem/rust-cache@v2
with:
workspaces: './src -> target'

- name: Test src on ${{ matrix.os }}
if: needs.check-src.outputs.status
Expand All @@ -139,8 +131,6 @@ jobs:
- name: Rust cache
if: needs.check-src.outputs.status
uses: swatinem/rust-cache@v2
with:
workspaces: './src -> target'

- name: Test src on ${{ matrix.os }}
if: needs.check-src.outputs.status
Expand All @@ -159,13 +149,10 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
os: ubuntu-latest
shaderc: false

- name: Rust cache
if: needs.check-src.outputs.status
uses: swatinem/rust-cache@v2
with:
workspaces: './src -> target'

- name: lint src
if: needs.check-src.outputs.status
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
os: ubuntu-latest
shaderc: false
- uses: dtolnay/rust-toolchain@nightly
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
Expand Down
352 changes: 180 additions & 172 deletions CHANGELOG.md

Large diffs are not rendered by default.

28 changes: 2 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,15 @@
<h1 align="center">
AUTD3: Airborne Ultrasound Tactile Display 3
</h1>
# AUTD3

<div align="center">

![build](https://github.com/shinolab/autd3/workflows/build/badge.svg)
![build](https://github.com/shinolab/autd3-rs/workflows/build/badge.svg)
[![codecov](https://codecov.io/gh/shinolab/autd3-rs/graph/badge.svg)](https://codecov.io/gh/shinolab/autd3-rs)
[![Crate.io version](https://img.shields.io/crates/v/autd3)](https://crates.io/crates/autd3)

</div>

<p align="center">
Airborne Ultrasound Tactile Display (AUTD) is a midair haptic device that can remotely produce tactile sensation on a human skin surface without wearing devices.
Please see <a href="https://hapislab.org/en/airborne-ultrasound-tactile-display">our laboratory homepage</a> for more details on AUTD.
This repository contains a client library to drive AUTD version 3 devices.
This cross-platform library supports Windows, macOS, and Linux (including Single Board Computer such as Raspberry Pi).
</p>

> [!WARNING]
> From v17.0.0, the software is completely incompatible with v2.x and v3.x firmware.
> Before using this library, write the latest firmware in `firmware`. For more information, please see [autd3-firmware/README](https://github.com/shinolab/autd3-firmware).
## Example

* See [examples](./examples)

* If you are using Linux/macOS, you may need to run as root.

## Citing

* If you use this SDK in your research, please consider including the following citation in your publications:

* [S. Suzuki, S. Inoue, M. Fujiwara, Y. Makino, and H. Shinoda, "AUTD3: Scalable Airborne Ultrasound Tactile Display," in IEEE Transactions on Haptics, DOI: 10.1109/TOH.2021.3069976.](https://ieeexplore.ieee.org/document/9392322)
* S. Inoue, Y. Makino and H. Shinoda "Scalable Architecture for Airborne Ultrasound Tactile Display," Asia Haptics 2016

## LICENSE

* See [LICENSE](./LICENSE)
Expand Down
4 changes: 2 additions & 2 deletions autd3-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "autd3-derive"
version = "19.0.0"
version = "19.0.1"
authors = ["shun suzuki <suzuki@hapis.k.u-tokyo.ac.jp>"]
edition = "2021"

license = "MIT"
description = "Wav Modulation for AUTD."
repository = "https://github.com/shinolab/autd3"
repository = "https://github.com/shinolab/autd3-rs"
readme = "README.md"
keywords = ["autd"]

Expand Down
8 changes: 4 additions & 4 deletions autd3-derive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Created Date: 28/04/2022
* Author: Shun Suzuki
* -----
* Last Modified: 14/11/2023
* Last Modified: 13/12/2023
* Modified By: Shun Suzuki (suzuki@hapis.k.u-tokyo.ac.jp)
* -----
* Copyright (c) 2022-2023 Shun Suzuki. All rights reserved.
Expand All @@ -21,16 +21,16 @@ pub fn modulation_derive(input: TokenStream) -> TokenStream {

let freq_div_no_change = if let syn::Data::Struct(syn::DataStruct { fields, .. }) = input.data {
fields.iter().any(|field| {
let is_freq_div = field
let is_config = field
.ident
.as_ref()
.map(|ident| ident == "freq_div")
.map(|ident| ident == "config")
.unwrap_or(false);
let no_change = field
.attrs
.iter()
.any(|attr| matches!(&attr.meta, Meta::Path(path) if path.is_ident("no_change")));
is_freq_div && no_change
is_config && no_change
})
} else {
false
Expand Down
4 changes: 2 additions & 2 deletions autd3-driver/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "autd3-driver"
version = "19.0.0"
version = "19.0.1"
authors = ["shun suzuki <suzuki@hapis.k.u-tokyo.ac.jp>"]
edition = "2021"

license = "MIT"
description = "AUTD3 driver"
repository = "https://github.com/shinolab/autd3"
repository = "https://github.com/shinolab/autd3-rs"
readme = "README.md"
keywords = ["autd"]

Expand Down
3 changes: 2 additions & 1 deletion autd3-driver/src/datagram/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Created Date: 29/09/2023
* Author: Shun Suzuki
* -----
* Last Modified: 06/12/2023
* Last Modified: 13/12/2023
* Modified By: Shun Suzuki (suzuki@hapis.k.u-tokyo.ac.jp)
* -----
* Copyright (c) 2023 Shun Suzuki. All rights reserved.
Expand Down Expand Up @@ -33,6 +33,7 @@ pub use modulation::{Modulation, ModulationProperty};
pub use reads_fpga_info::ConfigureReadsFPGAInfo;
pub use silencer::Silencer;
pub use stm::{FocusSTM, GainSTM, STMProps};
#[allow(deprecated)]
pub use stop::Stop;
pub use synchronize::Synchronize;
pub use with_timeout::{DatagramT, DatagramWithTimeout};
Expand Down
10 changes: 9 additions & 1 deletion autd3-driver/src/datagram/stop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Created Date: 29/09/2023
* Author: Shun Suzuki
* -----
* Last Modified: 21/11/2023
* Last Modified: 13/12/2023
* Modified By: Shun Suzuki (suzuki@hapis.k.u-tokyo.ac.jp)
* -----
* Copyright (c) 2023 Shun Suzuki. All rights reserved.
Expand All @@ -20,14 +20,20 @@ use crate::{

/// Datagram to stop output
#[derive(Default)]
#[deprecated(
since = "19.0.1",
note = "Users should manually send Silencer and gain::Null."
)]
pub struct Stop {}

#[allow(deprecated)]
impl Stop {
pub const fn new() -> Self {
Self {}
}
}

#[allow(deprecated)]
impl Datagram for Stop {
type O1 = ConfigSilencerOp;
type O2 = StopOp;
Expand All @@ -42,6 +48,8 @@ impl Datagram for Stop {

#[cfg(test)]
mod tests {
#![allow(deprecated)]

use super::*;

#[test]
Expand Down
6 changes: 3 additions & 3 deletions autd3-driver/src/firmware_version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Created Date: 27/04/2022
* Author: Shun Suzuki
* -----
* Last Modified: 06/12/2023
* Last Modified: 14/12/2023
* Modified By: Shun Suzuki (suzuki@hapis.k.u-tokyo.ac.jp)
* -----
* Copyright (c) 2022-2023 Shun Suzuki. All rights reserved.
Expand All @@ -14,7 +14,7 @@
use std::fmt;

pub const LATEST_VERSION_NUM_MAJOR: u8 = 0x8C;
pub const LATEST_VERSION_NUM_MINOR: u8 = 0x00;
pub const LATEST_VERSION_NUM_MINOR: u8 = 0x02;

const ENABLED_EMULATOR_BIT: u8 = 1 << 7;

Expand Down Expand Up @@ -286,7 +286,7 @@ mod tests {

#[test]
fn latest_firmware_version() {
assert_eq!("v4.1.0", FirmwareInfo::latest_version());
assert_eq!("v4.1.2", FirmwareInfo::latest_version());
}

#[test]
Expand Down
6 changes: 3 additions & 3 deletions autd3-driver/src/operation/stm/focus/focus_stm_op.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Created Date: 06/10/2023
* Author: Shun Suzuki
* -----
* Last Modified: 27/11/2023
* Last Modified: 14/12/2023
* Modified By: Shun Suzuki (suzuki@hapis.k.u-tokyo.ac.jp)
* -----
* Copyright (c) 2023 Shun Suzuki. All rights reserved.
Expand Down Expand Up @@ -169,13 +169,13 @@ impl Operation for FocusSTMOp {
}

match self.start_idx {
Some(idx) if idx >= self.points.len() as u16 => {
Some(idx) if idx as usize >= self.points.len() => {
return Err(AUTDInternalError::STMStartIndexOutOfRange)
}
_ => {}
}
match self.finish_idx {
Some(idx) if idx >= self.points.len() as u16 => {
Some(idx) if idx as usize >= self.points.len() => {
return Err(AUTDInternalError::STMFinishIndexOutOfRange)
}
_ => {}
Expand Down
10 changes: 7 additions & 3 deletions autd3-firmware-emulator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
[package]
name = "autd3-firmware-emulator"
version = "19.0.0"
version = "19.0.1"
authors = ["shun suzuki <suzuki@hapis.k.u-tokyo.ac.jp>"]
edition = "2021"

license = "MIT"
description = "AUTD3 firmware emulator"
repository = "https://github.com/shinolab/autd3"
repository = "https://github.com/shinolab/autd3-rs"
readme = "README.md"
keywords = ["autd"]

[dependencies]
autd3-driver = { path = "../autd3-driver", version = "19.0.0" }
autd3-driver = { path = "../autd3-driver", version = "19.0.1" }
num-integer = "0.1.45"
thiserror = "1.0.40"

[dev-dependencies]
autd3-derive = { path = "../autd3-derive", version = "19.0.1" }
rand = "0.8.5"
Loading

0 comments on commit 5a3f8f4

Please sign in to comment.