ReleaseFailsafe
ReleaseFailsafe is a command that resumes the output stopped by the failsafe (loss of communication with the host, loss of the PTP lock, or the CPU watchdog).
See SetCpuConfig for the failsafe conditions and defaults.
The output from before the stop resumes as it was.
It does nothing to devices that are not stopped by the failsafe.
A device whose firing condition still holds (for example, one that is still without the PTP lock) rejects it with an error (ERR_FAILSAFE_CONDITION_ACTIVE) and stays stopped.
Whether the output is stopped can be checked with failsafe_active of the DeviceStatus returned by device_status() of a reply (Response) (see State Monitoring).
Clear also releases it, but it resets every state to the defaults.
ReleaseFailsafe;ReleaseFailsafe()new ReleaseFailsafe();Example
Section titled “Example”use autd3_rs::commands::{Clear, ReleaseFailsafe, Synchronize};use autd3_rs::geometry::{Autd3, Geometry};use autd3_rs::Client;use autd3_rs::udp::TransportOption;
let geometry = Geometry::new(vec![Autd3::default()]);let option = TransportOption::default();let mut client = Client::open(&geometry, &option).await?;client.send(Clear).await?;client.send(Synchronize).await?;
let status = client.read_state().await?.device_status();if status.iter().any(|s| s.failsafe_active) { client.send(ReleaseFailsafe).await?;}import asyncio
from autd3 import Client, TransportOptionfrom autd3.commands import Clear, ReleaseFailsafe, Synchronizefrom autd3.geometry import Autd3, Geometry
async def main() -> None: geometry = Geometry([Autd3()]) with await Client.open(geometry, TransportOption()) as client: await client.send(Clear()) await client.send(Synchronize())
status = (await client.read_state()).device_status() if any(s.failsafe_active for s in status): await client.send(ReleaseFailsafe())
asyncio.run(main())using System.Linq;using System.Threading.Tasks;using AUTD3;
var geometry = new Geometry(new[] { new Autd3() });using var client = await Client.OpenAsync(geometry, new TransportOption());await client.SendAsync(new Clear());await client.SendAsync(new Synchronize());
var status = (await client.ReadStateAsync()).DeviceStatus();if (status.Any(s => s.FailsafeActive)){ await client.SendAsync(new ReleaseFailsafe());}