2
0
mirror of https://github.com/m-labs/artiq.git synced 2025-01-07 17:43:34 +08:00

examples/arguments_demo: demonstrate arguments from datasets (#368)

This commit is contained in:
Sebastien Bourdeauducq 2016-04-02 23:07:00 +08:00
parent b095c94919
commit f9db7e472b

View File

@ -37,7 +37,10 @@ class SubComponent2(HasEnvironment):
class ArgumentsDemo(EnvExperiment):
def build(self):
self.setattr_argument("pyon_value", PYONValue(None))
# change the "foo" dataset and click the "recompute argument"
# buttons.
self.setattr_argument("pyon_value",
PYONValue(self.get_dataset("foo", default=42)))
self.setattr_argument("number", NumberValue(42e-6,
unit="us", scale=1e-6,
ndecimals=4))