chore: use on transition to paused to set charge to 0
Add new service / deploy (push) Successful in 24s
Add new service / deploy (push) Successful in 24s
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import time
|
||||
from typing import override
|
||||
|
||||
import numpy as np
|
||||
import typer
|
||||
@@ -184,6 +185,8 @@ class Service(BaseService[PVs]):
|
||||
self.ChargeArrayBPMs = np.empty(len(pvs.bpms))
|
||||
self.iter = 0
|
||||
|
||||
# TODO: decorator needs min python3.12
|
||||
@override
|
||||
def update(self):
|
||||
# set current to zero without beam
|
||||
if not self.pvs.dump_valve.get() == 1:
|
||||
@@ -238,11 +241,11 @@ class Service(BaseService[PVs]):
|
||||
elif self.pvs.recalibrate_apply.get():
|
||||
self.pvs.calibration.put(self.pvs.calibration_new.get())
|
||||
|
||||
def on_pause(self):
|
||||
# TODO: decorator needs min python3.12
|
||||
@override
|
||||
def on_transition_to_paused(self):
|
||||
"""
|
||||
Called when the service is transitioned to pause
|
||||
|
||||
Set current to zero when service is paused
|
||||
Set current to zero when service is transitioned to paused.
|
||||
"""
|
||||
self.pvs.charge.put(0.0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user