succd: remove redundant if

This commit is contained in:
zdmx 2024-09-28 11:20:25 +02:00
parent fbf41203de
commit f5d80a335f

View file

@ -104,10 +104,8 @@ func (d *daemon) processOnce(_ context.Context) error {
mbar := d.piraniMbar3.mbar
if !d.safety.failsafe && mbar < 4e-6 {
// Unrealistic result, Pirani probe probably disconnected. Failsafe mode.
if !d.safety.failsafe {
d.safety.failsafe = true
klog.Errorf("SAFETY: Pirani probe seems disconnected; enabling failsafe mode")
}
d.safety.failsafe = true
klog.Errorf("SAFETY: Pirani probe seems disconnected; enabling failsafe mode")
}
if d.safety.failsafe && mbar > 1e2 {
d.safety.failsafe = false