from nullptr.missions.base import BaseMission, MissionParam import time class IdleMission(BaseMission): def start_state(self): return 'start' def step_wait(self): self.next_step = int(time.time()) + self.st('seconds') def step_idle(self): pass @classmethod def params(cls): return { 'seconds': MissionParam(int, True) } def steps(self): return { 'start': (self.step_wait, 'wait'), 'wait': (self.step_idle, 'done') }