From 3d3d6f5cb5fe1b3972b1ee52e96b5ad69de16174 Mon Sep 17 00:00:00 2001 From: linuswck Date: Thu, 1 Feb 2024 16:28:25 +0800 Subject: [PATCH] ld: cleanup --- src/laser_diode/laser_diode.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/laser_diode/laser_diode.rs b/src/laser_diode/laser_diode.rs index 7282ce3..bcb687d 100644 --- a/src/laser_diode/laser_diode.rs +++ b/src/laser_diode/laser_diode.rs @@ -133,7 +133,7 @@ impl LdDrive{ -Settings::LD_CURRENT_STEP_SIZE }; - for _ in (0..num_of_step.abs()).rev() { + for _ in 0..num_of_step.abs() { prev_i_set = prev_i_set + current_step; let _ = self.ctrl.set_i(prev_i_set, Settings::LD_DRIVE_TRANSIMPEDANCE, Settings::DAC_OUT_V_MAX); sleep(Settings::LD_CURRENT_TIME_STEP_MS);