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

Last change on this file since 1276 was 1185, checked in by Maciej Komosinski, 2 years ago

Renamed a module; new name is "evolalg_steps"

File size: 754 bytes
RevLine 
[1185]1from evolalg_steps.base.step import Step
[1113]2
3
4class FramsStep(Step):
[1139]5    def __init__(self, frams_lib, commands=None, *args, **kwargs):
6        super(FramsStep, self).__init__(*args, **kwargs)
[1113]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.