Changes
This commit is contained in:
20
step.py
Normal file
20
step.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from algorithm import algorithm
|
||||
import json
|
||||
|
||||
|
||||
class step(algorithm):
|
||||
def __init__(self):
|
||||
self.config_dict_ = None
|
||||
self.config_ = None
|
||||
self.amplitude_base_ = 0.0
|
||||
|
||||
def set_config(self, config):
|
||||
self.config_ = config
|
||||
self.config_dict_ = json.loads(self.config_)
|
||||
self.amplitude_base_ = self.config_dict_["STEP_AMPLITUDE_BASE"]
|
||||
|
||||
def config(self):
|
||||
return self.config_
|
||||
|
||||
def eval(self, value):
|
||||
return value * self.amplitude_base_
|
||||
Reference in New Issue
Block a user