We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 650ed5b commit 47c1472Copy full SHA for 47c1472
poulpe_ethercat_controller/src/lib.rs
@@ -528,7 +528,7 @@ impl PoulpeController {
528
&& (current_position
529
.iter()
530
.zip(target_position.iter())
531
- .all(|(a, b)| (a - b).abs() > 0.001))
+ .any(|(a, b)| (a - b).abs() > 0.001))
532
{
533
self.set_target_position(id, current_position.clone())
534
.unwrap();
@@ -537,6 +537,7 @@ impl PoulpeController {
537
self.get_current_target_position(id).unwrap().unwrap();
538
tries += 1;
539
}
540
+ std::thread::sleep(std::time::Duration::from_millis(5));
541
// throw error if the target position is not set correctly
542
if tries == 5 {
543
log::error!("Error setting target position!");
0 commit comments