push_filt_strmbuf ( std_buf_type& a_buf , int width=indent_filter<Ch>::width_default ) { filt_type my_filter(width); this->push(my_filter,0,0); this->push(a_buf); }
void computeContent(void) { if(cntTimeCode == (STORE_SIZE - 1)){ cntTimeCode = 0; if(refreshRawData){ for(i = 0; i < STORE_SIZE; ++i){ rawStoreTimeCode[i] = storeTimeCode[i]; } refreshRawData=0; } /*Par.timeCodA = my_filter(storeTimeCode, STORE_SIZE, 10);*/ timeCode = my_filter(storeTimeCode, STORE_SIZE, 10); deadTime = (double) Par.deadTime / 100000000; //0.01 uS 2400 = 24 us timePropagation = (double)timeCode * IMPULSE_ZAP; speedCurrent = Par.acusticBase / ((timePropagation - deadTime) * 1000) ; // *1000 because BASE mm /*Par.speedCurrent = speedCurrent;*/ speedResin = (double)Par.speedResin; if (speedCurrent < speedBase){ resinContent = calc_sod(speedCurrent,speedBase,speedResin); } else{ resinContent = 0; } if(beginInitialisation == true){ speedBase = speedCurrent; /*Par.timeCod = Par.timeCodA;*/ /*Par.speedDry = speedBase;*/ save_parametrs(PARAMETRS_ADDR,Par.BUF); //Сохранение параметров beginInitialisation = 0; } if (PORT_ReadInputDataBit(MD2_PORT, MD2_PIN_F) == Bit_SET){ if( resinContent != 0) Par.resinContent = resinContent; } else{ Par.resinContent = resinContent; } dac_out = Par.resinContent * 37.52; //0x0EA8 = 100 % (3752) } }