Commit ca108e7
committed
codal_port/modradio: Turn the radio on when importing radio module.
In all cases radio.on() is necessary to start using the radio, otherwise
functions like radio.send() or radio.receive() will throw an exception
"ValueError: radio is not enabled". The majority of the micro:bit
features, especially those that can be turned off like the display, are
"on" by default. So make the radio consistent in that regard.
Addresses issue #97.
Signed-off-by: Damien George <damien@micropython.org>1 parent abad747 commit ca108e7
1 file changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
43 | 52 | | |
44 | 53 | | |
45 | 54 | | |
| |||
253 | 262 | | |
254 | 263 | | |
255 | 264 | | |
256 | | - | |
| 265 | + | |
257 | 266 | | |
258 | 267 | | |
259 | 268 | | |
| |||
0 commit comments