This is the development version of the documentation. It may change before the next release. See 0.6.x for the latest release.
ForceFan
ForceFan is a command that forcibly turns the cooling fan on.
ForceFan { value };ForceFan(value)new ForceFan(value);| Field | Type | Description |
|---|---|---|
value |
bool |
Force the fan on when true |
Example
Section titled “Example”use autd3_rs::commands::ForceFan;use autd3_rs::geometry::{Autd3, Geometry};use autd3_rs::{Client, ClientConfig};use autd3_rs_link_nop::Nop;
let geometry = Geometry::new(vec![Autd3::default()]);let client = Client::open(&geometry, Nop, ClientConfig::default()).await?;
let mut builder = client.datagram_builder();builder.push(ForceFan { value: true });let frames = builder.build()?;for frame in &frames { client.send_checked(frame).await?;}
client.close().await?;import asyncio
from autd3 import Client, ClientConfigfrom autd3.commands import ForceFanfrom autd3.geometry import Autd3, Geometryfrom autd3_link_nop import Nop
async def main() -> None: geometry = Geometry([Autd3([0.0, 0.0, 0.0], [1.0, 0.0, 0.0, 0.0])]) client = await Client.open(geometry, Nop(), ClientConfig())
builder = client.datagram_builder() builder.push(ForceFan(value=True)) frames = builder.build() for frame in frames: await client.send_checked(frame)
await client.close()
asyncio.run(main())using System.Numerics;using System.Threading.Tasks;using AUTD3;using AUTD3.Link;using Nop = AUTD3.Link.Nop;
var geometry = new Geometry(new[] { new Autd3(Vector3.Zero) });var client = await Client.OpenAsync(geometry, new Nop(), new ClientConfig());
var builder = client.DatagramBuilder();builder.Push(new ForceFan(true));var frames = builder.Build();foreach (var frame in frames){ await client.SendCheckedAsync(frame);}
await client.CloseAsync();