![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Moving average for ST Nucleo F401RE. The number of average is controled by sw.
Diff: main.cpp
- Revision:
- 1:2b1ce47a1fd7
- Parent:
- 0:2e17a28353a0
- Child:
- 2:bf617231c9bd
--- a/main.cpp Wed Oct 29 13:16:24 2014 +0000 +++ b/main.cpp Wed Oct 29 23:46:29 2014 +0000 @@ -33,7 +33,7 @@ while (true) { - int sw = (sw4_ << 3) | (sw4_ << 2) | (sw2_ << 1) | sw1_; + int sw = (sw8_ << 3) | (sw4_ << 2) | (sw2_ << 1) | sw1_; int nAv = 1 << sw; if (nAv > 64) nAv = 64;