From 3b75d1609bdccb8c691e04f5f2e63908f23a1027 Mon Sep 17 00:00:00 2001 From: adragott Date: Thu, 31 Oct 2019 04:36:21 -0500 Subject: [PATCH] fixed cb_double --- CircularBuffer/bin/PCircularBuffer.o | Bin 4830 -> 4848 bytes CircularBuffer/bin/test.o | Bin 1375 -> 1596 bytes CircularBuffer/bin/tester.exe | Bin 349555 -> 349728 bytes CircularBuffer/src/PCircularBuffer.c | 6 ++++-- CircularBuffer/test/test.c | 16 +++++++++++----- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/CircularBuffer/bin/PCircularBuffer.o b/CircularBuffer/bin/PCircularBuffer.o index 182cbea589ec05c0a6873620529202d2631c8e03..bf5d5ae3ba19db66ba33eb5d6afcfca00fc3ee7d 100644 GIT binary patch delta 280 zcmcbo`azX9rH!2d1o(Iv7|b^E-eGYsYOGcG|DS=OoUOT5fuWT1xa%J#pn}&?9=*IW zK*kG@a*u9T0gvub36D;JZdZlQLm+-yX8;$NKJLK5z%ZGgRg7`hWHnYL#{H8&uu4o$ zWR+(0nOw{2!`JQl2dJZ$*MJddnjuhf32)D@|Nnu)9?eG#Vh>MV$tKU0nU`4tbQ2J4 zzQp#5Nz#jjfnf)b2cmBP@ev>!MAuHf%6V4vCNl$r4p4-J;U17>3T9aVWg%k6;H>P; nr@7X%FnUd{=2vFCF?l|}E@SQFv;4o=3Q9|gfmZDiP+|fA@SaY= delta 279 zcmeyMdQX)%rH!2d1o(Iv7)&?v-eFM-Y^+uI|DS=OoUOT5fuWT1xa%J#pn}(y-L49q zhdjDn1=2bLxF#F0iZNcE?9Qsh^x*eoduH*;O{~(4sgvii`e=aE@NakE;@^G%sG*lv z2B`f7$dYc?KVSg^MxcNtM4JFxkLZ+N|NjH!JerRf#2%gi1(R2@$#Z3-CZ<>^sHX68 zZN9|zib+zFg@IuQ&?FFj0f>(P*&w=f@>R~Wn&Lo~4p4-JVJ)1s3CJ=5i|vDpC2u~> fwVs7hb8iVHe0F)-*bGBCVh28%OrPc%(uGXS!4m?th$ViN(f z<}gn@rN*`as33}E;x{G6J(DFFWxSi;RCx5RQE31wcmc!=9-R+7IuEBEcYP(mz`xz~ zl}GanMvqR{2Ou{8_5+@sM;!Np)Is?koyYdWxRaY1bxdw}bcf#X=yl!TxI+MJ+(EFh z$6eoml)Wqjy0N+T4L^VXT99nF>xS;oHVv=!P_YjT0W77yn;C zk`H?W6up?{$zOM%^N>d`uNY7}*yNYn5C(Z9U-CHkh}on0P=g2Kg-`qf4Bf78nqLT{ zdGOaA0-EU2>AM0b>bt_DGZe&dT>-MR9;>CKn}x%H&8}}4fnJv9?`!?{|Njo4Yk`4$ z$D=p(M|51gV~k@gPwe3da4>l%lfE2C4WkH0s|YjCBMt-h1hxX!1I!l~13==&Op~RU z%`!!SOd%j@~ delta 502 zcmdnPbDxVhrH!2d1okmAFo;g%6&IYq$iScj!~sA75a5_-n$G3`Wb9#@xJZdj0?7Kq zH1U)gn+QpP*Z$$>@ALZq|9`XV4a^!g{Tk^voK@;NntSS4v++y#lr9qNQ!`2*1$-Ch&cdR5V3r?SP4jMawtnJ kYcG(+G5I=6I-}uadsbyeiOI>VwUa-w3NflrW@S?Y0QwJy&Hw-a diff --git a/CircularBuffer/bin/tester.exe b/CircularBuffer/bin/tester.exe index 9c0c97c1b162d2aca293dd8797e1f18ccecb082f..4dd108edad745f02d6b872ac77a2f942caaaba88 100644 GIT binary patch delta 13791 zcmcJ0dt6l2+W+2b?~MbBT!%ZuFf-h51Ky~-fQpVDQ#4Ui6O4;eXsBdrD0qztNpzP> z-`9#Rr_Ah);?$ULz2c>`j;Am^hDC~=@?cSsc}-69`>vS#RrtO?SjxiPkkc? zZ#T=d;VN0j)v zYV#O5-~%5pHU+7_dpu5J4C=B0^F>wte88Hqf&OS!=j|OL2zISh?J&_i7Q#w8G{Fwt z_J7&!9c9rlFalOAwMv0QuUuRSs3=-}TJsDUq*uc{_0dP7Sc`JeV*Rz_Jj#=-T^8&3 zZ_z05g2j5cYg`jS+is7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@y|Q41U9kDs83xW<=+~QryY(2OLLX=` zNcmuRNo7EM^ScvBv(LPJ4M?`nsQeuWyS(%EBoOw;L$BpFJ^rvh#i!XVM)E=Y3?4&h z$&()o#E6=Anxq1$^-1;JtQDGgyI%k#%BTB{K+4X>ci+z{0kyahBkybvkP|-RS_h<$ zkBjdDndgIi38L_f)6PWNGUZ9Q8LR?QJm?coC>7H zC+s31*L*k+0rB1YHvxIJE24!9*DYPR==ZbvDR2ZI%lk(FYL4$dFP%W<`E+&+NVO;N zJbj-7sW;J}p-RlqA5m`b;fwu1#_r}Fr3fH-z`BhsEf|V*Ivk36pYC%Q0xB%>&K3hH z@#&xx2-_@?WzN|KVJNT{3s{WYTqBS}UC9J2 zd<|qvS7U};0n+A!5bPb-x>h~ogaffag2pW;0y*H*YDix|^#}#da?(`#(l8{a2#VVH z&ao+ec=giKBK+mB3jtqv5S*DlVLk?gty1s&dlpEI&#=D)#Ll~8z6ruRK-lFSv(L+V zK;JXO-F>I0SAnea*~I+u%h(bh!~~?pCz%6*w09v3A6!|qZfU8&{yE@S7cVSWvS{^+MRekD zMO$_es*yek{s~BKS30pNmlUl865rkX-@qyF;;`=h@t=m(KD%o=5S`B~&IU5l$FX^3 zfV^2?hBgBE&S!sl21ve7XDY^fMtGo+gwZEZNEhId^-H2Lx Rp>yU4r775%a*uLd^S_Kg-J1Xa diff --git a/CircularBuffer/src/PCircularBuffer.c b/CircularBuffer/src/PCircularBuffer.c index 9303571..f34e2e1 100644 --- a/CircularBuffer/src/PCircularBuffer.c +++ b/CircularBuffer/src/PCircularBuffer.c @@ -354,7 +354,10 @@ PB_CB_STATUS p_cb_double_init(p_cb_double* circ_buffer, double* buff, uint32_t m ret = PB_CB_BAD_BUFFER_SIZE; break; } - circ_buffer->max_len = max_length; + printf("init\r\n"); + circ_buffer->buffer = buff; + circ_buffer->max_len = (uint16_t)max_length; + circ_buffer->head = 0; circ_buffer->push = p_cb_double_push; circ_buffer->empty = p_cb_double_empty; circ_buffer->empty(circ_buffer); @@ -381,7 +384,6 @@ PB_CB_STATUS p_cb_double_push(p_cb_double* cbuffer, double value) { cbuffer->buffer[cbuffer->head] = value; cbuffer->head = (cbuffer->head + 1) % cbuffer->max_len; - printf("head: %d\r\n", cbuffer->max_len); } // Debugging diff --git a/CircularBuffer/test/test.c b/CircularBuffer/test/test.c index e2ab91e..173d51a 100644 --- a/CircularBuffer/test/test.c +++ b/CircularBuffer/test/test.c @@ -1,21 +1,27 @@ #include +#include #include int main() { const uint16_t maxlength = 16; double my_buffer[maxlength]; p_cb_double data; - for(int ind = 0; ind < 2; ind++) + p_cb_double_init(&data, my_buffer, 16); + + for(int x = 0; x < 32; x++) { - for(int x = 0; x < 16; x++) + if( x < 16) { printf("[%02d] Before: %02lf\t", x, data.buffer[x]); data.push(&data, (double)x); printf("[%02d] After: %02lf\r\n", x, data.buffer[x]); } + else + { + printf("[%02d] Before: %02lf\t", x - 16, data.buffer[x - 16]); + data.push(&data, (double)x); + printf("[%02d] After: %02lf\r\n", x - 16, data.buffer[x - 16]); + } } - - int x = 5; - printf("%d\r\n", x); return 0; } \ No newline at end of file