forked from M-Labs/artiq
doc: fix bool input
This commit is contained in:
parent
ba98ac1dcc
commit
3ddb1e4201
|
@ -44,7 +44,7 @@ A method or function running on the core device (which we call a "kernel") may c
|
||||||
Modify the code as follows: ::
|
Modify the code as follows: ::
|
||||||
|
|
||||||
def input_led_state() -> TBool:
|
def input_led_state() -> TBool:
|
||||||
return bool(input("Enter desired LED state: "))
|
return input("Enter desired LED state: ") == "1"
|
||||||
|
|
||||||
class LED(EnvExperiment):
|
class LED(EnvExperiment):
|
||||||
def build(self):
|
def build(self):
|
||||||
|
|
Loading…
Reference in New Issue