]> sigrok.org Git - libsigrok.git/commit
demo: Cast to double while calculating the pattern frequency.
authorpoljar (Damir Jelić) <redacted>
Sun, 26 Jan 2014 20:30:57 +0000 (21:30 +0100)
committerBert Vermeulen <redacted>
Tue, 28 Jan 2014 20:23:54 +0000 (21:23 +0100)
commit9d156555a557aa079056d42fbc9ddd12338e842e
tree4565533bc06949aa3942a7dc35b6215d7955918f
parent464d49360a02c6b378ebaf5ef38f4bb4536dd5ee
demo: Cast to double while calculating the pattern frequency.

Without the cast non integer frequencies weren't possible (e.g. with a sampling
frequency of 50Hz we would end up with a signal frequency of 2Hz instead of
2.5Hz). The result were signals which had an incorrect number of samples per
period.

BugLink: http://sigrok.org/bugzilla/show_bug.cgi?id=297
hardware/demo/demo.c