From eee31288dd9cc81a648dc033b320c6ccaf803a71 Mon Sep 17 00:00:00 2001 From: Damien George Date: Mon, 19 May 2014 19:08:12 +0100 Subject: [PATCH] stmhal: Fix DAC documentation: need to convert float to int for buf. --- stmhal/dac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stmhal/dac.c b/stmhal/dac.c index 9b73b2dae3..81ce993a8c 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)