feat: add realtime dashboard control
This commit is contained in:
@@ -75,8 +75,20 @@ def main() -> None:
|
||||
sim = ReactorSimulation(reactor, timestep=5.0, duration=duration, realtime=realtime)
|
||||
load_path = os.getenv("FISSION_LOAD_STATE")
|
||||
save_path = os.getenv("FISSION_SAVE_STATE")
|
||||
dashboard_mode = os.getenv("FISSION_DASHBOARD", "0") == "1"
|
||||
if load_path:
|
||||
sim.start_state = reactor.load_state(load_path)
|
||||
if dashboard_mode:
|
||||
from .dashboard import ReactorDashboard
|
||||
|
||||
dashboard = ReactorDashboard(
|
||||
reactor,
|
||||
start_state=sim.start_state,
|
||||
timestep=sim.timestep,
|
||||
save_path=save_path,
|
||||
)
|
||||
dashboard.run()
|
||||
return
|
||||
try:
|
||||
if realtime:
|
||||
LOGGER.info("Running in real-time mode (Ctrl+C to stop)...")
|
||||
|
||||
Reference in New Issue
Block a user