source: framspy/evolalg_steps/base/frams_step.py @ 1185

Last change on this file since 1185 was 1185, checked in by Maciej Komosinski, 17 months ago

Renamed a module; new name is "evolalg_steps"

File size: 754 bytes
Line 
1from evolalg_steps.base.step import Step
2
3
4class FramsStep(Step):
5    def __init__(self, frams_lib, commands=None, *args, **kwargs):
6        super(FramsStep, self).__init__(*args, **kwargs)
7        if commands is None:
8            commands = []
9        self.frams = frams_lib
10        self.commands = commands
11
12    def pre(self):
13        for c in self.commands:
14            self.frams.sendDirectCommand(c) #TODO update to use FramsticksLib when needed, pass lambda, import frams module? Maybe pre-lambda returns old value, post-lambda restores what pre-lambda returned. Or pass ExtValue or list of ExtValues and their new values (and either caller saves original values to be restored, or pre() returns a list of original values to be restored in post())
Note: See TracBrowser for help on using the repository browser.