Skip to content

Commit a4eeecd

Browse files
authored
Fix Some Simulation Mode Bugs (#97)
* fix some simulation bugs * Bump versioin to 0.19.10
1 parent 731e463 commit a4eeecd

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

tools/base_server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -259,9 +259,9 @@ def _estimateDuration(self, command: message.Message) -> tuple[Optional[int], t.
259259
method_name = f"Estimate{command.__class__.__name__}"
260260
try:
261261
method = getattr(self, method_name)
262-
except AttributeError as e:
263-
logging.error(str(e))
264-
return None, tool_base_pb2.UNRECOGNIZED_COMMAND
262+
except AttributeError:
263+
# No estimate method defined for this command, use default duration
264+
return 0, None
265265

266266
return method(command), None
267267

tools/bravo/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,10 @@ def run_op(driver: BravoDriver) -> None:
198198
self._execute_with_retry("RunRunset", run_op)
199199

200200
def EstimateRunProtocol(self, params: Command.RunProtocol) -> int:
201-
return 60 # Return a more realistic estimate in seconds
201+
return 1 # Quick return in simulation mode
202202

203203
def EstimateRunRunset(self, params: Command.RunRunset) -> int:
204-
return 120 # Return a more realistic estimate in seconds
204+
return 1 # Quick return in simulation mode
205205

206206

207207
if __name__ == "__main__":

tools/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55

66
# Version information
7-
__version__ = '0.19.9' # Update this version string as needed
7+
__version__ = '0.19.10' # Update this version string as needed
88

99
# Parse version components for easier access
1010
VERSION_PARTS = __version__.split('.')

tools/vprep/server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,10 @@ def run_op(driver: VPrepDriver) -> None:
188188
self._execute_with_retry("RunRunset", run_op)
189189

190190
def EstimateRunProtocol(self, params: Command.RunProtocol) -> int:
191-
return 60 # Return a more realistic estimate in seconds
192-
191+
return 1 # Quick return in simulation mode
192+
193193
def EstimateRunRunset(self, params: Command.RunRunset) -> int:
194-
return 120 # Return a more realistic estimate in seconds
194+
return 1 # Quick return in simulation mode
195195

196196
if __name__ == "__main__":
197197
logging.basicConfig(level=logging.DEBUG)

0 commit comments

Comments
 (0)