diff options
| author | Damien George | 2014-05-19 19:08:12 +0100 |
|---|---|---|
| committer | Damien George | 2014-05-19 19:08:12 +0100 |
| commit | eee31288dd9cc81a648dc033b320c6ccaf803a71 (patch) | |
| tree | 65224b619f79ed502a0f1d08242229a8d9eb5138 | |
| parent | 2de4d5917172fcef180b6824da1da07fd8955b49 (diff) | |
stmhal: Fix DAC documentation: need to convert float to int for buf.
| -rw-r--r-- | stmhal/dac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/stmhal/dac.c b/stmhal/dac.c index 9b73b2dae..81ce993a8 100644 --- a/stmhal/dac.c +++ b/stmhal/dac.c @@ -62,7 +62,7 @@ /// # create a buffer containing a sine-wave /// buf = bytearray(100) /// for i in range(len(buf)): -/// buf[i] = 128 + 127 * math.sin(2 * math.pi * i / len(buf)) +/// buf[i] = 128 + int(127 * math.sin(2 * math.pi * i / len(buf))) /// /// # output the sine-wave at 400Hz /// dac = DAC(1) |
