Skip to content
This is the development version of the documentation. It may change before the next release. See 0.14.x for the latest release.

SetFpgaConfig

SetFpgaConfig is a command that changes the settings held by the FPGA.

let config = FpgaConfig {
sync_phase_lock,
sync_kp,
sync_ki,
sync_kf,
};
SetFpgaConfig::new(config);
Field Type Default Description
sync_phase_lock bool true Fine adjustment that phase-locks the FPGA clock to the sync pulse shared between devices. (enabled by default)
sync_kp u16 64 Proportional gain of the fine adjustment.
sync_ki u16 1024 Integral gain of the fine adjustment.
sync_kf u16 4096 Integral gain of the frequency estimation before the fine adjustment engages.
use autd3_rs::commands::{Clear, FpgaConfig, SetFpgaConfig, 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?;
client.send(SetFpgaConfig::new(FpgaConfig {
sync_phase_lock: false,
..Default::default()
})).await?;
client.send(SetFpgaConfig::default()).await?;