Quantize manual rod steps to 0.025
This commit is contained in:
@@ -45,7 +45,7 @@ class ControlSystem:
|
||||
return self.rod_fraction
|
||||
|
||||
def set_rods(self, fraction: float) -> float:
|
||||
self.rod_target = clamp(fraction, 0.0, 0.95)
|
||||
self.rod_target = self._quantize_manual(fraction)
|
||||
self._advance_banks(self.rod_target, 0.0)
|
||||
LOGGER.info("Manual rod target set to %.3f", self.rod_target)
|
||||
return self.rod_target
|
||||
@@ -127,6 +127,11 @@ class ControlSystem:
|
||||
def _sync_fraction(self) -> None:
|
||||
self.rod_fraction = self.effective_insertion()
|
||||
|
||||
def _quantize_manual(self, fraction: float) -> float:
|
||||
step = constants.ROD_MANUAL_STEP
|
||||
quantized = round(fraction / step) * step
|
||||
return clamp(quantized, 0.0, 0.95)
|
||||
|
||||
|
||||
def save_state(
|
||||
self,
|
||||
|
||||
Reference in New Issue
Block a user