1. Си / Говнокод #28553

    0

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    if(((mFlags&0x80)==0)&&(mFlags&0x40)==0){if(samplesArr[_k]>dataAmplitudeHi)	//‚믮«­ï¥¬ ¨§¬¥à¥­¨¥ ¨¬¯ã«ìᮢ-¤¥â¥ªâ®à®¢. ’ ª¦¥ ¬¥à塞 ¯ ã§ã{
    			while(1){if(samplesArr[_k]>=dataAmplitudeHi){++_k;++_j;}else{break;}}
    			dMin=dMax=wideTable[pulseCnt]=_j;
    			++pulseCnt;
    			dataStack(1,_k);
    			_i=_j;_j=0;pauseTrig=1;}
    		while(1)
    		{if(samplesArr[_k]<=invertSample){++_k;++_j;}else{break;}}
    		pMin=pMax=pauseTable[pauseCnt]=_j;
    		++pauseCnt;_i=_j;_j=0;
    		if(pauseTrig==0){
    			while(1){
    				if(samplesArr[_k]>=dataAmplitudeHi){
    					++_k;
    					++_j;}else{break;}}
    			dMin=dMax=wideTable[pulseCnt]=_j;
    			++pulseCnt;_i=_j;_j=0;}
    		else{_k=dataStack(0,0);}
    			pauseTrig=0;
    			for(uint32_t i=_k;i<bufferLength;++i){
    				//printf("iteration %d 0x%02X\n",i,samplesArr[i]);
    				if((samplesArr[i]>dataAmplitudeHi)&&(_j>_p)&&(pauseTrig==0)&&(signalTrig==1)){
    					//printf("trig pulse up %d",i);if(_j<pMin){pMin=_j;}else if(_j>pMax){pMax=_j;}pauseTrig=1;signalTrig=0;pauseTable[pauseCnt]=_j;++pauseCnt;trigPause=0;_p=_j;_j=0;//printf("\n");}
    				else if((samplesArr[i]>dataAmplitudeHi)&&(_j<_p)&&(pauseTrig==0)&&(signalTrig==1))
    				{//printf("trig pulse down %d",i);if(_j<pMin){pMin=_j;}else if(_j>pMax){pMax=_j;}pauseTrig=1;signalTrig=0;pauseTable[pauseCnt]=_j;++pauseCnt;trigPause=0;_p=_j;_j=0;//printf("\n");}
    				else if((samplesArr[i]>dataAmplitudeHi)&&(_j==_p)&&(pauseTrig==0)&&(signalTrig==1))
    				{//printf("trig pulse non-change %d",i);if(_j<pMin){pMin=_j;}else if(_j>pMax){pMax=_j;}pauseTrig=1;signalTrig=0;pauseTable[pauseCnt]=_j;++pauseCnt;trigPause=0;_p=_j;_j=0;//printf("\n");}
    				if((samplesArr[i]<invertSample)&&(_j>dMin-(dMin/4))&&(_j>_i)&&(pauseTrig==1)&&(signalTrig==0))
    				{//printf("trig pause up %d",i);if(_j<dMin){dMin=_j;}else if(_j>dMax){dMax=_j;}pauseTrig=0;signalTrig=1;wideTable[pulseCnt]=_j;++pulseCnt;_i=_j;_j=0;//printf("\n");}
    				else if((samplesArr[i]<invertSample)&&(_j>dMin-(dMin/4))&&(_j<_i)&&(pauseTrig==1)&&(signalTrig==0))
    				{//printf("trig pause down %d",i);if(_j<dMin){dMin=_j;}else if(_j>dMax){dMax=_j;}pauseTrig=0;signalTrig=1;wideTable[pulseCnt]=_j;++pulseCnt;_i=_j;_j=0;//printf("\n");}
    				else if((samplesArr[i]<invertSample)&&(_j>=dMin-(dMin/4))&&(_j==_i)&&(pauseTrig==1)&&(signalTrig==0))
    				{//printf("trig pause non-change %d",i);if(samplesArr[i]<invertSample)pauseTrig=0;signalTrig=1;wideTable[pulseCnt]=_j;++pulseCnt;_i=_j;_j=0;//printf("\n");}
    				if((samplesArr[i]>dataAmplitudeHi)&&(_j>dMax)&&(pauseTrig==1)&&(signalTrig==0)){trigPause++;}
    				else if(trigPause>2){_k=i-_j-skipsBeforeTrig;_ovct=_j;mFlags=mFlags|0xC0;break;}
    				if((samplesArr[i]>dataAmplitudeHi)&&(trigKey==0x00)){trigKey=0xFF;}
    				if((samplesArr[i]>dataAmplitudeHi)&&(trigKey==0xFF)){trigKey=0x00;}
    				else if((pauseTrig==1)&&(trigPause>skipsBeforeTrig)){trigPause=0;_k=i;_ovct=_i-_p;mFlags=mFlags|0xC0;break;}
    				else if(pauseTrig==1){trigPause++;}
    				if((samplesArr[i]>dataAmplitudeHi)&&(pauseTrig==1)&&(signalTrig==0)){++_j;}
    				if((samplesArr[i]<invertSample)&&(pauseTrig==0)&&(signalTrig==1)){++_j;}}_k=_k-_ovct;
    		for(uint8_t i=0;i<pulseCnt;i++){divl=divl+wideTable[i];}
    		divl=divl/pulseCnt;
    		compTim.tSPavg=round(divl);}
    	memset(wideTable,0x00,sizeof(wideTable));

    Шизофрения

    Запостил: siclown, 12 Января 2023

    Комментарии (8) RSS

    Добавить комментарий